| 1 | --- |
| 2 | title: "Continue CLI (cn) Overview" |
| 3 | description: "Command-line interface for automated coding tasks, scripting, and headless development workflows with Continue's AI coding capabilities" |
| 4 | sidebarTitle: "Overview" |
| 5 | --- |
| 6 | |
| 7 | <Frame> |
| 8 | <img src="/images/cn-demo.gif" /> |
| 9 | </Frame> |
| 10 | |
| 11 | **Continue enables developers to ship faster with Continuous AI.** |
| 12 | |
| 13 | <Tip> |
| 14 | Build features from descriptions. Debug and fix issues. Navigate any codebase. |
| 15 | Automate tedious tasks. |
| 16 | </Tip> |
| 17 | |
| 18 | ## Get started in 30 seconds |
| 19 | |
| 20 | Prerequisites: |
| 21 | |
| 22 | - [Node.js 18 or newer](https://nodejs.org/en/download/) |
| 23 | - A [Continue Hub](https://hub.continue.dev) account (recommended) or local configuration |
| 24 | |
| 25 | ```bash npm |
| 26 | # Install Continue CLI |
| 27 | npm install -g @continuedev/cli |
| 28 | |
| 29 | # Navigate to your project |
| 30 | |
| 31 | cd your-awesome-project |
| 32 | |
| 33 | # Start coding with Continue |
| 34 | |
| 35 | cn |
| 36 | |
| 37 | # You'll be prompted to set up on first use |
| 38 | |
| 39 | ``` |
| 40 | |
| 41 | That's it! You're ready to start automating with Continue CLI. |
| 42 | |
| 43 | [Continue with CLI Quickstart →](/cli/quick-start) |
| 44 | |
| 45 | ## Two Ways to Use Continue CLI |
| 46 | |
| 47 | Continue CLI offers two distinct modes designed for different workflows: |
| 48 | |
| 49 | ### TUI Mode: Interactive Development |
| 50 | |
| 51 | **Perfect for exploration, debugging, and iterating on AI workflows** |
| 52 | |
| 53 | ```bash |
| 54 | cn |
| 55 | > @src/components/UserProfile.js Review this component for security issues |
| 56 | > Generate comprehensive unit tests |
| 57 | > Suggest performance improvements |
| 58 | ``` |
| 59 | |
| 60 | - **Interactive conversations** with your codebase |
| 61 | - **Iterate and refine** prompts and approaches |
| 62 | - **Explore and understand** complex codebases |
| 63 | - **Perfect for experimentation** and learning |
| 64 | |
| 65 | ### Headless Mode: Production Automation |
| 66 | |
| 67 | **Perfect for CI/CD, automation, and reliable workflows** |
| 68 | |
| 69 | ```bash |
| 70 | cn -p "Generate a conventional commit message for staged changes" |
| 71 | cn -p "Review pull request changes for security vulnerabilities" |
| 72 | cn -p "Update documentation based on recent code changes" |
| 73 | ``` |
| 74 | |
| 75 | - **Single-command execution** for automation |
| 76 | - **Reliable, repeatable results** for production use |
| 77 | - **CI/CD and pipeline integration** |
| 78 | - **Git hooks and automated workflows** |
| 79 | |
| 80 | ### Development Workflow: TUI → Headless |
| 81 | |
| 82 | <Tip> |
| 83 | **Pro Tip**: Start in TUI mode to iterate on your AI agent and prompts. Once |
| 84 | you have a workflow that works reliably, deploy it as a Continuous AI |
| 85 | automation. |
| 86 | </Tip> |
| 87 | |
| 88 | 1. **Experiment in TUI mode** to perfect your prompts and agent configuration |
| 89 | 2. **Test different approaches** interactively until you get consistent results |
| 90 | 3. **Convert successful workflows** to automated Continuous AI commands |
| 91 | 4. **Deploy in production** with confidence in your proven approach |
| 92 | |
| 93 | ## Why developers love Continue CLI |
| 94 | |
| 95 | - **Works in your terminal**: Not another chat window. Not another IDE. Continue CLI meets you where you already work, with the tools you already love. |
| 96 | - **Takes action**: Continue CLI can directly edit files, run commands, and create commits. Need more? Check out our [MCPs](/customize/deep-dives/mcp). |
| 97 | - **Automate tasks**: Create issues from PostHog data, automatically assign labels to issues, and more. Do all this in a single command from your developer machines, or automatically in CI. |
| 98 | - **Flexible development flow**: Start interactive, then automate proven workflows. |
| 99 | |
| 100 | ## Key Capabilities |
| 101 | |
| 102 | ### Context Engineering |
| 103 | |
| 104 | - Use `@` to reference files and provide context |
| 105 | - Use `/` to run slash commands for specific tasks |
| 106 | - Access the same context providers as IDE extensions |
| 107 | |
| 108 | ### Tool Integration |
| 109 | |
| 110 | - File editing and creation |
| 111 | - Terminal command execution |
| 112 | - Codebase understanding and analysis |
| 113 | - Git integration |
| 114 | - Web search and documentation access |
| 115 | |
| 116 | ### Model Flexibility |
| 117 | |
| 118 | - Switch between models with `/model` command |
| 119 | - Use any model configured in your `config.yaml` |
| 120 | - Access Continue Hub models and configurations |
| 121 | |
| 122 | ## Continue Hub Integration |
| 123 | |
| 124 | Continue CLI integrates seamlessly with [Continue Hub](https://hub.continue.dev) for: |
| 125 | |
| 126 | ### API Access |
| 127 | |
| 128 | Get an API key for automation workflows: |
| 129 | |
| 130 | 1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys) |
| 131 | 2. Create a new API key |
| 132 | 3. Use with `cn login` or in your automation scripts |
| 133 | |
| 134 | ### Secrets Management |
| 135 | |
| 136 | Store secure credentials for CLI workflows: |
| 137 | |
| 138 | 1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets) |
| 139 | 2. Add your API keys and sensitive data |
| 140 | 3. Reference in configurations with `${{ secrets.SECRET_NAME }}` |
| 141 | |
| 142 | ### Configuration Sync |
| 143 | |
| 144 | - Cloud-managed configurations automatically sync |
| 145 | - Share configurations across team members |
| 146 | - Version control for your AI workflows |
| 147 | |
| 148 | ## Common Use Cases |
| 149 | |
| 150 | ### TUI Mode Examples |
| 151 | |
| 152 | **Interactive development and exploration:** |
| 153 | |
| 154 | <CodeGroup> |
| 155 | ```bash Codebase Exploration |
| 156 | # Start interactive session |
| 157 | cn |
| 158 | > @src/components Find all unused React components |
| 159 | > /explain How does authentication work in this codebase? |
| 160 | > @auth/ What security patterns are used here? |
| 161 | ``` |
| 162 | |
| 163 | ```bash Iterative Debugging |
| 164 | # Debug issues interactively |
| 165 | cn |
| 166 | > @tests/auth.test.js This test is failing, help me understand why |
| 167 | > @src/auth/middleware.js Let's examine this middleware |
| 168 | > /debug What could be causing the timeout error? |
| 169 | ``` |
| 170 | |
| 171 | ```bash Workflow Development |
| 172 | # Develop and test automation workflows |
| 173 | cn |
| 174 | > @package.json @CHANGELOG.md Generate a release notes template |
| 175 | > # Test and refine the approach |
| 176 | > # Once working, convert to: cn -p "Generate release notes" |
| 177 | ``` |
| 178 | |
| 179 | </CodeGroup> |
| 180 | |
| 181 | ### Headless Mode Examples |
| 182 | |
| 183 | **Production automation and scripting:** |
| 184 | |
| 185 | <CodeGroup> |
| 186 | ```bash Git Automation |
| 187 | # Generate commit messages |
| 188 | cn -p "Generate a conventional commit message for the current changes" |
| 189 | |
| 190 | # Code review automation |
| 191 | |
| 192 | cn -p "Review the current git changes for bugs and suggest improvements" |
| 193 | |
| 194 | ```` |
| 195 | |
| 196 | ```bash CI/CD Integration |
| 197 | # In your pipeline scripts |
| 198 | cn -p "Analyze test failures and suggest fixes" |
| 199 | |
| 200 | # Automated documentation updates |
| 201 | cn -p "@README.md Update this documentation based on recent changes" |
| 202 | ```` |
| 203 | |
| 204 | ```bash Issue Management |
| 205 | # Create GitHub issues from PostHog data |
| 206 | cn -p "@posthog-data.json Create GitHub issues for UX problems found in this session data" |
| 207 | |
| 208 | # Automated security audits |
| 209 | cn -p "Scan the codebase for potential security vulnerabilities" |
| 210 | ``` |
| 211 | |
| 212 | </CodeGroup> |
| 213 | |
| 214 | ## Next steps |
| 215 | |
| 216 | <CardGroup cols={3}> |
| 217 | <Card title="CLI Quickstart" href="/cli/quick-start"> |
| 218 | Learn basic commands and common workflows |
| 219 | </Card> |
| 220 | |
| 221 | <Card title="Installation Guide" href="/cli/install"> |
| 222 | Install Continue CLI and set up your environment |
| 223 | </Card> |
| 224 | |
| 225 | <Card title="CLI Workflows" href="/guides/overview#continuous-ai"> |
| 226 | Task-specific tutorials and examples |
| 227 | </Card> |
| 228 | </CardGroup> |