composio login command authenticates your CLI with the Composio platform.
Usage
Authentication Modes
Browser-Based Login (Default)
Opens your browser for OAuth authentication:- Creates a CLI session
- Opens your browser to the login URL
- Polls for authentication completion
- Stores your credentials in
~/.composio/user-config.json
No-Browser Mode
For headless environments or SSH sessions:Non-Interactive Login
For CI/CD, automation, or agent environments:--api-key- Your user API key (starts withuak_)--org-id- Organization ID--project-id- Project nano ID (starts withpr_)
Non-interactive login validates credentials against the Composio API. If validation fails (400/401/403), the login will fail.
Options
Login without browser interaction. Displays the login URL without opening it.
API key for non-interactive login (agents/CI). Must be used with
--org-id and --project-id.Organization ID for non-interactive login. Must be used with
--api-key and --project-id.Project ID for non-interactive login. Must be used with
--api-key and --org-id.Examples
Interactive Login
Headless Login
CI/CD Login
Scripted Login with JSON Output
Configuration Storage
Credentials are stored in~/.composio/user-config.json:
Session Scope
Thelogin command creates a user-scoped session, which provides global credentials for all projects.
Multi-Project Support
The login flow enriches your credentials with organization and project metadata:- OAuth flow completes and provides a user API key
- Session info API fetches org/project details
- Credentials stored for multi-tenant support
Troubleshooting
Already Logged In
If you’re already authenticated:~/.composio/user-config.json and run composio login again.
Browser Doesn’t Open
If the browser fails to open automatically:--no-browser and copy the URL manually.
Login Timeout
If authentication takes too long:composio login again.
Validation Errors (Non-Interactive)
For non-interactive login with invalid credentials:Related Commands
composio whoami- Display your account informationcomposio generate- Generate type definitions for your project
Next Steps
whoami
Check your logged-in account
generate
Generate type-safe code