Cline CLI brings the full power of Cline to your terminal. In just a few minutes, you can install the CLI, authenticate with your preferred AI provider, and start running tasks from any directory on your machine.Documentation Index
Fetch the complete documentation index at: https://docs.cline.bot/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Cline CLI requires Node.js version 20 or higher. We recommend Node.js 22 for the best experience. Check your Node.js version:Install Cline CLI
Install globally via npm:Authenticate
After installation, run the authentication wizard:Option 1: Sign in with Cline (Recommended)
Select “Sign in with Cline” to authenticate with your Cline account via OAuth. Your browser opens automatically to complete sign-in.Option 2: Sign in with ChatGPT Subscription
If you have a ChatGPT Plus or Pro subscription, select “Sign in with ChatGPT Subscription”. This uses OpenAI’s Codex OAuth to authenticate with your existing subscription.Option 3: Import from Existing Tools
Already using another AI coding CLI? Cline can import your existing configuration:- Import from Codex CLI - Imports credentials from
~/.codex/auth.json - Import from OpenCode - Imports configuration from
~/.local/share/opencode/auth.json
Option 4: Bring Your Own API Key
Select “Bring your own API key” to manually configure any supported provider. Or skip the wizard entirely with flags:| Flag | Description |
|---|---|
-p, --provider <id> | Provider ID (e.g., anthropic, openai-native, openrouter, moonshot) |
-k, --apikey <key> | Your API key |
-m, --modelid <id> | Model ID (e.g., claude-sonnet-4-5-20250929, gpt-4o) |
-b, --baseurl <url> | Base URL for OpenAI-compatible providers |
Supported Providers
| Provider | Provider ID | Notes |
|---|---|---|
| Anthropic | anthropic | Direct Claude API access |
| OpenAI | openai-native | GPT-4o, GPT-4, etc. |
| OpenAI Codex | openai-codex | ChatGPT subscription OAuth |
| OpenRouter | openrouter | Access multiple providers |
| AWS Bedrock | bedrock | Claude via AWS |
| Google Gemini | gemini | Gemini Pro, etc. |
| X AI (Grok) | xai | Grok models |
| Cerebras | cerebras | Fast inference |
| DeepSeek | deepseek | DeepSeek models |
| Moonshot | moonshot | Kimi models via Moonshot AI |
| Ollama | ollama | Local models |
| LM Studio | lmstudio | Local models |
| OpenAI Compatible | openai | Any OpenAI-compatible API |
Verify Your Setup
Confirm everything is working with a simple test:Quick Start
Now you’re ready to use Cline. Choose how you want to work:Interactive Mode
Launch the interactive CLI for development:Tabto toggle between Plan and Act modesShift+Tabto enable auto-approve/helpfor available commands
Direct Task Execution
Run a task directly from your shell:Switching Providers
To change your configured provider at any time:Updating
Check for updates and install the latest version:Troubleshooting
Command Not Found
Ifcline is not found after installation:
-
Ensure npm global bin is in your PATH:
-
Add the path to your shell configuration (
.bashrc,.zshrc, etc.): - Restart your terminal or source your shell config.
Permission Errors
If you get permission errors during installation:OAuth Flow Issues
If the browser doesn’t open automatically during OAuth:- Copy the URL from the terminal
- Paste it in your browser manually
- Complete the sign-in flow
- Return to the terminal
API Key Validation
If your API key is rejected:- Verify the key is correct and hasn’t expired
- Check that you’ve selected the correct provider
- Ensure your API account has the necessary permissions
- Anthropic: Keys start with
sk-ant- - OpenAI: Keys start with
sk- - AWS Bedrock: Requires AWS credentials configured separately. See AWS Bedrock documentation.
Uninstallation
To remove Cline CLI:Next Steps
Interactive Mode
Master the interactive CLI with shortcuts and slash commands.
Headless Mode
Run Cline autonomously in scripts, CI/CD pipelines, and automated workflows.
Configuration
Configure settings, rules, workflows, and environment variables.
CLI Reference
Complete command documentation with all flags and options.

