| 1 | --- |
| 2 | title: "Install Continue CLI" |
| 3 | description: "Get Continue CLI installed and configured for command-line AI coding assistance and automation" |
| 4 | sidebarTitle: "Install" |
| 5 | --- |
| 6 | |
| 7 | <Info> |
| 8 | Make sure you have [Node.js 18 or higher |
| 9 | installed](https://nodejs.org/en/download/). |
| 10 | </Info> |
| 11 | |
| 12 | ## Installation |
| 13 | |
| 14 | Install Continue CLI globally using npm: |
| 15 | |
| 16 | ```bash |
| 17 | npm i -g @continuedev/cli |
| 18 | ``` |
| 19 | |
| 20 | Verify installation: |
| 21 | |
| 22 | ```bash |
| 23 | cn --version |
| 24 | ``` |
| 25 | |
| 26 | ## Initial Setup |
| 27 | |
| 28 | Get started is by logging in to Continue Hub for cloud-managed configurations: |
| 29 | |
| 30 | <Steps> |
| 31 | <Step title="Login to Continue CLI"> |
| 32 | ```bash |
| 33 | cn login |
| 34 | ``` |
| 35 | This will open your browser to authenticate with Continue Hub. |
| 36 | </Step> |
| 37 | |
| 38 | <Step title="Get API Key for Automation"> |
| 39 | |
| 40 | For automation workflows, get an API key: |
| 41 | 1. Visit [Continue Hub API |
| 42 | Keys](https://hub.continue.dev/settings/api-keys) |
| 43 | 2. Click **"+ New API Key"** |
| 44 | 3. Copy the API key immediately (you won't see it again!) |
| 45 | 4. Login using your Continue account. |
| 46 | 4. Use it in headless mode: `cn -p "your prompt"` |
| 47 | |
| 48 | </Step> |
| 49 | |
| 50 | <Step title="Add Secrets (Optional)"> |
| 51 | Store secure credentials for CLI workflows: |
| 52 | 1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets) |
| 53 | 2. Add your API keys and sensitive data |
| 54 | 3. Reference in configurations with `${{ secrets.SECRET_NAME }}` |
| 55 | </Step> |
| 56 | </Steps> |
| 57 | |
| 58 | ## First Test Run |
| 59 | |
| 60 | Try Continue CLI in interactive mode: |
| 61 | |
| 62 | ```bash |
| 63 | cn "Tell me about the CLI" |
| 64 | ``` |
| 65 | |
| 66 | Or test headless mode: |
| 67 | |
| 68 | ```bash |
| 69 | cn -p "Generate a conventional commit message for the current git changes" |
| 70 | ``` |
| 71 | |
| 72 | ## What's Next? |
| 73 | |
| 74 | <CardGroup cols={2}> |
| 75 | <Card title="Quick Start Guide" icon="rocket" href="/cli/quick-start"> |
| 76 | Learn basic usage with practical examples |
| 77 | </Card> |
| 78 | |
| 79 | <Card title="Create your first workflow" icon="gear" href="/guides/posthog-github-continuous-ai"> |
| 80 | Customize models, rules, and tools |
| 81 | </Card> |
| 82 | </CardGroup> |
| 83 | |
| 84 | ### Getting Help |
| 85 | |
| 86 | If you encounter issues: |
| 87 | |
| 88 | - Ask for help in [our discussions](https://github.com/continuedev/continue/discussions) |
| 89 | - Report bugs on [GitHub](https://github.com/continuedev/continue) |