From eac364f94ffc5cac82faecd484322dd0d6c72ffa Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 18 Sep 2025 08:03:51 -0400 Subject: [PATCH] Separate async and interactive modes --- docs/cli/install.mdx | 89 ++++++++++++++++++++++++++++++++------------ 1 file changed, 65 insertions(+), 24 deletions(-) diff --git a/docs/cli/install.mdx b/docs/cli/install.mdx index fb26543ba..e7c9274e5 100644 --- a/docs/cli/install.mdx +++ b/docs/cli/install.mdx @@ -23,9 +23,41 @@ Verify installation: cn --version ``` -## Initial Setup +## Two Ways to Use Continue CLI -Get started is by logging in to Continue Hub for cloud-managed configurations: + + +**Interactive development sessions** + +Start a conversation with AI in your terminal: + +```bash +cn +> @src/app.js Generate unit tests for this component +``` + +Perfect for exploration, debugging, and iterative development. + + + + +**Automation and scripting** + +Single commands that return results: + +```bash +cn -p "Generate a commit message for current changes" +cn -p "Review the last 5 commits for issues" +``` + +Perfect for CI/CD, git hooks, and automated workflows. + + + + +## Setup for CLI (REPL Mode) + +For interactive development and exploration: @@ -35,39 +67,48 @@ cn login This will open your browser to authenticate with Continue Hub. - + +Start an interactive session: +```bash +cn +``` - For automation workflows, get an API key: - 1. Visit [Continue Hub API - Keys](https://hub.continue.dev/settings/api-keys) - 2. Click **"+ New API Key"** - 3. Copy the API key immediately (you won't see it again!) - 4. Login using your Continue account. - 4. Use it in headless mode: `cn -p "your prompt"` +Try asking a question: + +``` +> Tell me about the CLI +``` + - +## Setup for CLI (Continuous AI Mode) + +For automation workflows and scripting: + + + +For automation workflows, get an API key: +1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys) +2. Click **"+ New API Key"** +3. Copy the API key immediately (you won't see it again!) +4. Login using your Continue account + + + Store secure credentials for CLI workflows: 1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets) 2. Add your API keys and sensitive data 3. Reference in configurations with `${{ secrets.SECRET_NAME }}` - - -## First Test Run - -Try Continue CLI in interactive mode: - -```bash -cn "Tell me about the CLI" -``` - -Or test headless mode: + +Try async mode for automation: ```bash cn -p "Generate a conventional commit message for the current git changes" ``` + + ## What's Next? @@ -77,11 +118,11 @@ cn -p "Generate a conventional commit message for the current git changes" - Customize models, rules, and tools + Build automated workflows with Continue CLI -### Getting Help +## Getting Help If you encounter issues: