CLI
The Composio CLI lets you manage toolkits, execute tools, handle auth, inspect logs, and generate type-safe code from the terminal.
Installation
curl -fsSL https://composio.dev/install | bashGetting started
# Authenticate with Composio
composio login
# Initialize a project in the current directory
composio init
# Check your account
composio whoamicomposio login opens a browser-based flow, then prompts you to choose your default organization and project. Use composio login -y to skip the picker and use session defaults for non-interactive runs.
composio whoami shows account and workspace context, and does not include API keys in display or JSON output.
Search and execute a tool
# Connect your GitHub account
composio manage connected-accounts link github
# Print connect URL + JSON and exit immediately (no wait)
composio manage connected-accounts link github --no-wait
# Search for tools
composio manage tools search "star a github repo"
# Look up a tool's input schema
composio manage tools info GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER
# Execute a tool (star the Composio repo!)
composio manage tools execute GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER -d '{"owner":"composiohq","repo":"composio"}'Set up and listen to triggers
# Find your connected account ID
composio manage connected-accounts list --toolkits github
# Create a trigger for star events on your repo
composio manage triggers create GITHUB_STAR_ADDED_EVENT --connected-account-id your-connected-account-id --trigger-config '{"owner":"your-username","repo":"your-repo"}'
# Listen to all GitHub trigger events on your account in real time
composio manage triggers listen --toolkits github --tableAvailable commands
Run composio <command> --help for detailed usage and flags.
| Command | Subcommands | Description |
|---|---|---|
composio login | Authenticate with your Composio account and select default org/project | |
composio logout | Remove stored authentication | |
composio whoami | Display your account and workspace information (without API keys) | |
composio init | Initialize a Composio project in the current directory | |
composio manage toolkits | list, search, info, version | Discover and inspect toolkits |
composio manage tools | list, search, info, execute | Discover, inspect, and execute tools |
composio manage connected-accounts | list, info, whoami, link, delete | Manage connected accounts |
composio manage auth-configs | list, info, create, delete | Manage auth configurations |
composio manage triggers | list, info, create, status, listen, enable, disable, delete | Subscribe to events and manage trigger instances |
composio manage logs | tools, triggers | Inspect tool and trigger execution logs |
composio generate ts | (options) | Generate TypeScript type stubs |
composio generate py | (options) | Generate Python type stubs |
composio upgrade | Upgrade CLI to the latest version | |
composio version | Display the current CLI version |
Global flags
| Flag | Description |
|---|---|
--log-level <level> | Set log level: silent, error, warn, info, debug |
--help | Show help for any command |
Environment variables
| Variable | Description |
|---|---|
COMPOSIO_API_KEY | Your Composio API key |
COMPOSIO_BASE_URL | Custom API base URL |
COMPOSIO_LOG_LEVEL | Logging level: silent, error, warn, info, debug |
COMPOSIO_DISABLE_TELEMETRY | Set to "true" to disable telemetry |
COMPOSIO_TOOLKIT_VERSION_{TOOLKIT} | Override toolkit version (e.g., COMPOSIO_TOOLKIT_VERSION_GMAIL=20250901_00) |
COMPOSIO_WEBHOOK_SECRET | Signing secret for trigger webhook forwarding |
Generate type definitions
Type generation is only useful if you're using direct tool execution. If you're using sessions with meta tools, you don't need this.
Generate TypeScript or Python type definitions for Composio tools. These types provide autocomplete and type safety when using direct tool execution (composio.tools.execute()).
composio generateThe CLI auto-detects your project language. For explicit control, use composio generate ts or composio generate py.
composio generate ts| Flag | Description |
|---|---|
-o, --output-dir <dir> | Output directory |
--compact | Emit a single TypeScript file |
--transpiled | Emit transpiled JavaScript alongside TypeScript |
--type-tools | Generate typed schemas for each tool (slower) |
--toolkits <names> | Only generate for specific toolkits (repeatable) |
composio generate py| Flag | Description |
|---|---|
-o, --output-dir <dir> | Output directory |
--toolkits <names> | Only generate for specific toolkits (repeatable) |