Skip to main content
The Composio CLI supports configuration via environment variables for flexible deployment across different environments.

Configuration Overview

The CLI uses a two-tier configuration system:
  1. Environment variables - Runtime configuration (highest precedence)
  2. User config file - Persistent storage (~/.composio/user-config.json)
Environment variables always override values in the user config file.

Core Configuration

COMPOSIO_API_KEY

string
Your Composio backend API key (starts with uak_ for user API keys or ak_ for account keys).User config key: api_keyDefault: None
Example:
When set, this overrides the API key stored from composio login.

COMPOSIO_BASE_URL

string
default:"https://backend.composio.dev"
The base URL of the Composio backend API.User config key: base_url
Example:
Useful for:
  • Testing against staging environments
  • Using a self-hosted Composio instance
  • Development/debugging

COMPOSIO_WEB_URL

string
default:"https://platform.composio.dev"
The base URL of the Composio web app (used during login flow).User config key: web_url
Example:

COMPOSIO_CACHE_DIR

string
default:"~/.composio"
Directory where the CLI stores cache files and user configuration.
Example:
Cached files include:
  • user-config.json - User authentication and settings
  • toolkits.json - Toolkit metadata
  • tools.json - Tool definitions
  • tools-as-enums.json - Tool name enums
  • trigger-types.json - Trigger type definitions

COMPOSIO_LOG_LEVEL

string
Log verbosity level for the CLI.Accepted values: all, trace, debug, info, warning, error, fatal, noneDefault: None (minimal output)
Example:
Or use the global flag:
The --log-level flag takes precedence over the environment variable.

Cache Control

FORCE_USE_CACHE

boolean
Force the CLI to use cached API responses when available.Default: false
Example:
When enabled:
  • CLI checks cache first before making API calls
  • Works offline if cache is available
  • Useful for CI/CD with pre-warmed cache
Use cases:

Toolkit Version Overrides

COMPOSIO_TOOLKIT_VERSION_<TOOLKIT>

string
Override the version for a specific toolkit.Format: COMPOSIO_TOOLKIT_VERSION_<TOOLKIT_SLUG>=<version>Values:
  • Specific version (e.g., 20250901_00)
  • latest (use the latest available version)
  • Unset (defaults to latest)
Example:
Toolkit version overrides only apply when using --type-tools with composio generate or composio ts generate.
See Toolkit Versions for more details.

GitHub Integration (Upgrade)

COMPOSIO_GITHUB_API_BASE_URL

string
default:"https://api.github.com"
GitHub API base URL for fetching releases.
Example:
Useful for GitHub Enterprise instances.

COMPOSIO_GITHUB_OWNER

string
default:"ComposioHQ"
GitHub repository owner.

COMPOSIO_GITHUB_REPO

string
default:"composio"
GitHub repository name.

COMPOSIO_GITHUB_TAG

string
default:"latest"
Specific release tag to upgrade to.
Example:
Downloads version 0.1.24 instead of the latest.

COMPOSIO_GITHUB_ACCESS_TOKEN

string
GitHub access token for API requests (avoids rate limiting).
Example:
Useful during development to avoid GitHub’s rate limits (60 requests/hour for unauthenticated users).

Terminal Configuration

NO_COLOR

boolean
Disable colored output in the CLI.Standard: no-color.org
Example:
Outputs plain text without ANSI color codes (useful for logging systems).

Development/Debugging

DEBUG_OVERRIDE_VERSION

string
Override the CLI version for debugging upgrade behavior.Development use only.
Example:
Forces the CLI to think it’s running version 0.1.0, triggering an upgrade.

User Config File

The CLI stores persistent configuration in ~/.composio/user-config.json:
This file is created and updated by:
  • composio login - Stores API key and org/project IDs
  • composio logout - Clears API key
  • composio orgs switch - Updates default org/project
The user-config.json file contains your API key. Keep it secure and never commit it to version control.

Configuration Precedence

When the same setting is defined in multiple places:
  1. CLI flags (highest precedence)
  2. Environment variables
  3. User config file (~/.composio/user-config.json)
  4. Default values (lowest precedence)
Example:

Examples

CI/CD Configuration

Staging Environment

Offline Development

Custom Cache Location

Toolkit Versions

Pin toolkit versions

Login

Authentication guide