Composio CLI

CLI agent and terminal workflows

Install and log in before running these commands.

The CLI executes tools, connects accounts, scripts workflows, calls authenticated APIs, and inspects trigger events without you wiring up a custom integration first. Native Codex and Claude Code plugins expose these capabilities to the agent; the same commands work directly in your terminal.

Search, connect, and execute tools

Use this flow when you or your agent needs to act in one of your connected apps:

# Find the right tool
composio search "summarize my unread gmail"

# Inspect the required input schema
composio execute GMAIL_FETCH_EMAILS --get-schema

# Connect the app if needed
composio link gmail

# Execute the tool
composio execute GMAIL_FETCH_EMAILS \
  -d '{ query: "is:unread newer_than:1d", max_results: 10 }'

Use composio execute <slug> --get-schema to print the tool's input schema as JSON. composio execute <slug> --help now shows command options and examples.

The commands you'll reach for most:

CommandUse it for
composio searchFind relevant tools by natural language
composio executeExecute a known tool slug
composio linkConnect an app account
composio proxyCall provider APIs with Composio-managed auth

Use composio proxy when the agent already knows the provider's API endpoint and just needs Composio to inject auth from your connected account:

composio proxy https://gmail.googleapis.com/gmail/v1/users/me/profile --toolkit gmail

Local file inputs

Run the command from a directory that contains any local files you pass to it. composio execute and composio dev playground-execute apply this rule to local uploads and -d @file arguments. It also applies to composio proxy -d @file and composio listen --params @file.

Symlinks must resolve inside the current working directory. The CLI blocks sensitive paths and fails before running the tool if it rejects a file.

Pass arguments or request bodies through stdin

Pass -d - to read from stdin and wait for input. For composio proxy, -d @- also reads the request body from stdin. When you omit -d, proxy sends the request without a body. For a non-GET request with piped stdin, proxy also warns on stderr.

With piped stdin and no -d, composio execute waits up to one second for JSON input to start arriving. If no input arrives, it exits 1 before running the tool. Pass arguments directly with -d '{...}' to avoid waiting on an idle pipe.

Run scripts

Reach for composio run when the agent needs a multi-step workflow: loops, parallel fan-out, or data transformation. It runs inline TS/JS or a file, with execute(), search(), proxy(), result.prompt(), and z injected.

If a tool execution fails, execute() rejects with the tool's error message and the failed result.

execute() writes File and Blob inputs to a private temporary directory and removes it when the call finishes. When composio run has a session directory, execute() also writes the argument JSON to a private file. Otherwise, it passes the JSON on the child process's command line, where sensitive values may appear in process listings.

Run a single scripted workflow:

composio run '
const messages = await execute("GMAIL_FETCH_EMAILS", {
  query: "is:unread newer_than:1d",
  max_results: 10,
});
console.log(messages);
'

Fan out across multiple tools:

composio run '
const [emails, issues, events] = await Promise.all([
  execute("GMAIL_FETCH_EMAILS", { max_results: 5 }),
  execute("GITHUB_LIST_REPOSITORY_ISSUES", { owner: "composiohq", repo: "composio", state: "open" }),
  execute("GOOGLECALENDAR_FIND_EVENT", { calendar_id: "primary" }),
]);
console.log({ emails: emails.data, issues: issues.data, events: events.data });
'

Run a checked-in script:

composio run --file ./workflow.ts -- --repo composiohq/composio

Listen to trigger events

Use trigger listening when the agent needs to wait for new events, inspect incoming payloads, or forward events while debugging. Event streaming lives in the developer namespace:

# Compact table view for matching events
composio dev listen --toolkits gmail --table

# Raw JSON payloads, then stop after five events
composio dev listen --trigger-slug GMAIL_NEW_GMAIL_MESSAGE --json --max-events 5

# Forward each matching event to a local or hosted webhook
composio dev listen --toolkits github --forward https://example.com/webhook

# Append matching events to a local file for an agent to inspect
composio dev listen --toolkits slack --out ./events.jsonl

Filter by toolkit, trigger slug, trigger ID, connected account ID, or userID to focus Claude on a single event source. Press Ctrl+C or send SIGTERM to stop a subscribed listener.

The CLI escapes control characters from streamed events, execution and proxy responses, and API errors in terminal output. Parsing JSON output recovers the original values.

See configuration and execution behavior for exit codes, timeouts, and telemetry.

Help

Use --help on the root command or any subcommand:

composio --help
composio help
composio execute --help
composio run --help
composio dev projects switch --help