CLI

Markdown

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 | bash

Getting started

# Authenticate with Composio
composio login

# Initialize a project in the current directory
composio init

# Check your account
composio whoami

composio 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 --table

Available commands

Run composio <command> --help for detailed usage and flags.

CommandSubcommandsDescription
composio loginAuthenticate with your Composio account and select default org/project
composio logoutRemove stored authentication
composio whoamiDisplay your account and workspace information (without API keys)
composio initInitialize a Composio project in the current directory
composio manage toolkitslist, search, info, versionDiscover and inspect toolkits
composio manage toolslist, search, info, executeDiscover, inspect, and execute tools
composio manage connected-accountslist, info, whoami, link, deleteManage connected accounts
composio manage auth-configslist, info, create, deleteManage auth configurations
composio manage triggerslist, info, create, status, listen, enable, disable, deleteSubscribe to events and manage trigger instances
composio manage logstools, triggersInspect tool and trigger execution logs
composio generate ts(options)Generate TypeScript type stubs
composio generate py(options)Generate Python type stubs
composio upgradeUpgrade CLI to the latest version
composio versionDisplay the current CLI version

Global flags

FlagDescription
--log-level <level>Set log level: silent, error, warn, info, debug
--helpShow help for any command

Environment variables

VariableDescription
COMPOSIO_API_KEYYour Composio API key
COMPOSIO_BASE_URLCustom API base URL
COMPOSIO_LOG_LEVELLogging level: silent, error, warn, info, debug
COMPOSIO_DISABLE_TELEMETRYSet to "true" to disable telemetry
COMPOSIO_TOOLKIT_VERSION_{TOOLKIT}Override toolkit version (e.g., COMPOSIO_TOOLKIT_VERSION_GMAIL=20250901_00)
COMPOSIO_WEBHOOK_SECRETSigning 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 generate

The CLI auto-detects your project language. For explicit control, use composio generate ts or composio generate py.

composio generate ts
FlagDescription
-o, --output-dir <dir>Output directory
--compactEmit a single TypeScript file
--transpiledEmit transpiled JavaScript alongside TypeScript
--type-toolsGenerate typed schemas for each tool (slower)
--toolkits <names>Only generate for specific toolkits (repeatable)
composio generate py
FlagDescription
-o, --output-dir <dir>Output directory
--toolkits <names>Only generate for specific toolkits (repeatable)