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

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

Available commands

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

CommandSubcommandsDescription
composio loginAuthenticate with your Composio account
composio logoutRemove stored authentication
composio whoamiDisplay your account information
composio initInitialize a Composio project in the current directory
composio toolkitslist, search, info, versionDiscover and inspect toolkits
composio toolslist, search, info, executeDiscover, inspect, and execute tools
composio connected-accountslist, info, whoami, link, deleteManage connected accounts
composio auth-configslist, info, create, deleteManage auth configurations
composio triggerslist, info, create, status, listen, enable, disable, deleteSubscribe to events and manage trigger instances
composio logstools, triggersInspect tool and trigger execution logs
composio generateGenerate type stubs (auto-detects language)
composio tsgenerateGenerate TypeScript type stubs
composio pygenerateGenerate 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

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 ts generate or composio py generate.

composio ts generate
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 py generate
FlagDescription
-o, --output-dir <dir>Output directory
--toolkits <names>Only generate for specific toolkits (repeatable)