| 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 | ## Two Ways to Use Continue CLI |
| 27 | |
| 28 | <Tabs> |
| 29 | <Tab title="REPL Mode"> |
| 30 | **Interactive development sessions** |
| 31 | |
| 32 | Start a conversation with AI in your terminal: |
| 33 | |
| 34 | ```bash |
| 35 | cn |
| 36 | > @src/app.js Generate unit tests for this component |
| 37 | ``` |
| 38 | |
| 39 | Perfect for exploration, debugging, and iterative development. |
| 40 | |
| 41 | </Tab> |
| 42 | |
| 43 | <Tab title="Continuous AI Mode"> |
| 44 | **Automation and scripting** |
| 45 | |
| 46 | Single commands that return results: |
| 47 | |
| 48 | ```bash |
| 49 | cn -p "Generate a commit message for current changes" |
| 50 | cn -p "Review the last 5 commits for issues" |
| 51 | ``` |
| 52 | |
| 53 | Perfect for CI/CD, git hooks, and automated workflows. |
| 54 | |
| 55 | </Tab> |
| 56 | </Tabs> |
| 57 | |
| 58 | ## Setup for CLI (REPL Mode) |
| 59 | |
| 60 | For interactive development and exploration: |
| 61 | |
| 62 | <Steps> |
| 63 | <Step title="Login to Continue CLI"> |
| 64 | ```bash |
| 65 | cn login |
| 66 | ``` |
| 67 | This will open your browser to authenticate with Continue Hub. |
| 68 | </Step> |
| 69 | |
| 70 | <Step title="Test Interactive Mode"> |
| 71 | Start an interactive session: |
| 72 | ```bash |
| 73 | cn |
| 74 | ``` |
| 75 | |
| 76 | Try asking a question: |
| 77 | |
| 78 | ``` |
| 79 | > Tell me about the CLI |
| 80 | ``` |
| 81 | |
| 82 | </Step> |
| 83 | </Steps> |
| 84 | |
| 85 | ## Setup for CLI (Continuous AI Mode) |
| 86 | |
| 87 | For automation workflows and scripting: |
| 88 | |
| 89 | <Steps> |
| 90 | <Step title="Get API Key for Automation"> |
| 91 | For automation workflows, get an API key: |
| 92 | 1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys) |
| 93 | 2. Click **"+ New API Key"** |
| 94 | 3. Copy the API key immediately (you won't see it again!) |
| 95 | 4. Login using your Continue account |
| 96 | </Step> |
| 97 | |
| 98 | <Step title="Add Secrets for Workflows"> |
| 99 | Store secure credentials for CLI workflows: |
| 100 | 1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets) |
| 101 | 2. Add your API keys and sensitive data |
| 102 | 3. Reference in configurations with `${{ secrets.SECRET_NAME }}` |
| 103 | </Step> |
| 104 | |
| 105 | <Step title="Test Async Mode"> |
| 106 | Try async mode for automation: |
| 107 | ```bash |
| 108 | cn -p "Generate a conventional commit message for the current git changes" |
| 109 | ``` |
| 110 | </Step> |
| 111 | </Steps> |
| 112 | |
| 113 | ## What's Next? |
| 114 | |
| 115 | <CardGroup cols={2}> |
| 116 | <Card title="Quick Start Guide" icon="rocket" href="/cli/quick-start"> |
| 117 | Learn basic usage with practical examples |
| 118 | </Card> |
| 119 | |
| 120 | <Card title="Create your first workflow" icon="gear" href="/guides/posthog-github-continuous-ai"> |
| 121 | Build automated workflows with Continue CLI |
| 122 | </Card> |
| 123 | </CardGroup> |
| 124 | |
| 125 | ## Getting Help |
| 126 | |
| 127 | If you encounter issues: |
| 128 | |
| 129 | - Ask for help in [our discussions](https://github.com/continuedev/continue/discussions) |
| 130 | - Report bugs on [GitHub](https://github.com/continuedev/continue) |