Elffuss BraidHub

kikocis/continue public

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