CLI
The Composio CLI helps you generate type-safe code and manage your Composio workspace.
Installation
Install the Composio CLI using the installation script:
Or using wget:
Authentication
Manage your Composio authentication directly from the terminal.
Login
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.
Check authentication status
Verify your current authentication:
This displays your current API key or indicates if you’re not authenticated.
Logout
Remove stored authentication:
Generate type definitions
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.
Auto-detect and generate
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
Specify output directory
Language-specific commands
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: