CLI Test

verified

Build the CLI binary from source and test it locally by running commands against the built binary.

>_composiohq/composio/.claude/skills/cli-test·commit cd46a72

description: Build the CLI binary from source and test it locally by running commands against the built binary.

CLI Test

Build the Composio CLI binary from source and test it by running commands directly.

Build Steps

Run these commands sequentially from the monorepo root:

# 1. Install dependencies
pnpm install

# 2. Build all packages (CLI depends on core, client, ts-builders, etc.)
pnpm turbo build

# 3. Build the standalone binary
pnpm --dir ts/packages/cli build:binary

The binary is output to ts/packages/cli/dist/composio.

Testing the Binary

Run commands directly against the built binary:

./ts/packages/cli/dist/composio version
./ts/packages/cli/dist/composio whoami
./ts/packages/cli/dist/composio --help

By default the binary uses your existing Composio CLI auth (stored in ~/.composio/user-config.json). No extra setup needed — just build and run.

Testing Against Staging or Preview Environments

To test against staging instead of production, export these env vars before running the binary:

export COMPOSIO_BASE_URL=https://staging-backend.composio.dev
export COMPOSIO_WEB_URL=https://staging-platform.composio.dev

Or use the shorthand:

export COMPOSIO_ENVIRONMENT=staging

For a preview environment, set the URLs to the preview backend and dashboard:

export COMPOSIO_BASE_URL=<preview-backend-url>
export COMPOSIO_WEB_URL=<preview-dashboard-url>

Then re-authenticate against that environment:

./ts/packages/cli/dist/composio login

Reference Files

FilePurpose
ts/packages/cli/scripts/build-binary.tsBinary build script
ts/packages/cli/dist/composioBuilt binary output
ts/packages/cli/src/effects/app-config.tsEnv var config resolution
ts/packages/cli/src/constants.tsDefault and staging URLs