Skip to main content
The Composio CLI supports pinning specific toolkit versions using environment variables. This allows you to control which version of each toolkit is used when generating type definitions.

Overview

Toolkit versions determine the available tools and their schemas for each integration. By default, the CLI uses the latest version for all toolkits. You can override this behavior to:
  • Pin specific versions for reproducible builds
  • Test against older versions for compatibility
  • Preview new features in specific toolkit versions
Toolkit version overrides only apply when using the --type-tools flag with composio generate or composio ts generate.

Environment Variable Format

To override a toolkit version, set an environment variable:
Format:
  • <TOOLKIT_SLUG> - Uppercase toolkit name (e.g., GMAIL, GITHUB, SLACK)
  • <version> - Version identifier or latest

Examples

Pin a Single Toolkit

Generates types using Gmail toolkit version 20250901_00 and latest for all others.

Pin Multiple Toolkits

Use Latest Version Explicitly

Explicitly uses the latest version (same as not setting the variable).

Mixed Versions

Version Discovery

To find available versions for a toolkit:
Example:
Output:

Validation

The CLI validates toolkit version overrides before fetching data:
  1. Detects overrides from environment variables
  2. Logs detected versions for transparency
  3. Validates against API to ensure versions exist
  4. Warns about unused overrides when using --toolkits filter
Example output:

Behavior with —type-tools

With —type-tools (Versions Apply)

When using --type-tools, the CLI fetches full tool schemas with version support:
What happens:
  1. Fetches Gmail toolkit version 20250901_00
  2. Generates full type definitions for tools in that version
  3. Includes input/output schemas

Without —type-tools (Versions Ignored)

Without --type-tools, the CLI only fetches tool names (not full schemas), so versions don’t apply:
What happens:
  1. Fetches Gmail toolkit metadata (no version)
  2. Generates tool name enums only (e.g., GMAIL_SEND_EMAIL)
  3. No input/output schemas
Toolkit version overrides are only meaningful when using --type-tools. Without it, all toolkits use the latest version implicitly.

Version Map Output

When version overrides are applied, the generated code includes a version map: TypeScript output:
This allows you to track which versions were used during generation.

Use Cases

Reproducible Builds

Pin toolkit versions in CI/CD for consistent builds:

Testing Against Older Versions

Test compatibility with a previous toolkit version:

Preview New Features

Test new toolkit features before they’re widely available:

Version Lock File

Create a version lock file for your project:
Load it before generation:

Filtering and Versions

When using --toolkits to filter generation, the CLI warns about unused version overrides:
Output:
The slack override is ignored because slack is not in the --toolkits filter.

Version Naming Convention

Composio toolkit versions follow the format:
  • YYYYMMDD - Release date (e.g., 20250901 = September 1, 2025)
  • NN - Revision number (e.g., 00, 01)
Examples:
  • 20250901_00 - First release on September 1, 2025
  • 20250901_01 - Second release on September 1, 2025
  • latest - Most recent version

Troubleshooting

Invalid Version

If you specify a non-existent version:
Error:
Solution: Use composio toolkits version gmail to list available versions.

Version Override Ignored

If your version override doesn’t apply:
Reason: --type-tools flag is missing. Solution: Add --type-tools:

Case Sensitivity

Environment variable names are case-sensitive:

Next Steps

Environment Variables

Configure the CLI

Generate Command

Generate type-safe code