Skip to main content
Continue CLI (cn) is a terminal-based coding agent. It can edit files, run commands, and work through multi-step tasks β€” the same agent that powers the Continue IDE extensions, running in your terminal.

Install

curl -fsSL https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.sh | bash

First run

cd your-project
cn
On first launch you’ll be asked to log in with Continue or enter an Anthropic API key. After that, you’re in a session and can start typing.

Two modes

TUI mode β€” run cn to start an interactive session. You type messages, reference files with @, approve tool calls, and iterate with the agent. This is the default. Headless mode β€” run cn -p "your prompt" for single-shot automation. The agent runs to completion and prints its response to stdout. Use this in scripts, CI/CD, and git hooks.

Common flags

FlagEffect
-p "prompt"Headless mode β€” run prompt and exit
--config <path or slug>Use a specific config file or assistant
--resumeResume the most recent session
--autoAllow all tools without prompting
--readonlyPlan mode β€” read-only tools only
--allow <tool>Allow a specific tool (repeatable)
--exclude <tool>Exclude a specific tool (repeatable)
--rule <rule>Add a rule β€” file path, hub slug, or string (repeatable)
--mcp <slug>Add an MCP server from the hub (repeatable)
--model <slug>Add a model from the hub (repeatable)
--agent <slug>Load an agent file from the hub
--verboseEnable verbose logging
Run cn --help for the full list.