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 whoamiSearch and execute a tool
# Connect your GitHub account
composio connected-accounts link github
# Search for tools
composio tools search "star a github repo"
# Look up a tool's input schema
composio tools info GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER
# Execute a tool (star the Composio repo!)
composio 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 connected-accounts list --toolkits github
# Create a trigger for star events on your repo
composio 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 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 | |
composio logout | Remove stored authentication | |
composio whoami | Display your account information | |
composio init | Initialize a Composio project in the current directory | |
composio toolkits | list, search, info, version | Discover and inspect toolkits |
composio tools | list, search, info, execute | Discover, inspect, and execute tools |
composio connected-accounts | list, info, whoami, link, delete | Manage connected accounts |
composio auth-configs | list, info, create, delete | Manage auth configurations |
composio triggers | list, info, create, status, listen, enable, disable, delete | Subscribe to events and manage trigger instances |
composio logs | tools, triggers | Inspect tool and trigger execution logs |
composio generate | Generate type stubs (auto-detects language) | |
composio ts | generate | Generate TypeScript type stubs |
composio py | generate | 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 ts generate or composio py generate.
composio ts generate| 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 py generate| Flag | Description |
|---|---|
-o, --output-dir <dir> | Output directory |
--toolkits <names> | Only generate for specific toolkits (repeatable) |