CLI
The Composio CLI helps you generate type-safe code and manage your Composio workspace.
Install the Composio CLI using the installation script:
Or using wget:
Manage your Composio authentication directly from the terminal.
Authenticate with your Composio account:
This opens your browser to complete authentication and stores your API key locally.
To authenticate without opening a browser (useful for SSH/remote sessions):
This displays a URL to manually open in your browser.
Verify your current authentication:
This displays your current API key or indicates if you’re not authenticated.
Remove stored authentication:
Generate TypeScript or Python type definitions for all Composio tools. These types provide type safety when using direct tool execution (composio.tools.execute()), helping you pass the correct parameters and catch errors early.
The CLI auto-detects your project language. In your project directory:
For TypeScript projects only, include individual tool types:
The CLI automatically:
- Detects your project type (Python or TypeScript)
- Generates appropriate type definitions
For explicit control, use language-specific commands:
TypeScript
Python
Basic generation:
Generate as single file:
Include individual tool types:
Generate both .ts and .js files:
Custom output directory: