From 56e3096ebfc3c81f475e6bf3ef9e827b02bd98e6 Mon Sep 17 00:00:00 2001 From: BekahHW Date: Tue, 16 Sep 2025 19:33:02 -0400 Subject: [PATCH] Add CLI docs --- docs/cli/install.mdx | 89 +++++++++++++++++++ docs/cli/overview.mdx | 183 +++++++++++++++++++++++++++++++++++++++ docs/cli/quick-start.mdx | 76 ++++++++++++++++ 3 files changed, 348 insertions(+) create mode 100644 docs/cli/install.mdx create mode 100644 docs/cli/overview.mdx create mode 100644 docs/cli/quick-start.mdx diff --git a/docs/cli/install.mdx b/docs/cli/install.mdx new file mode 100644 index 000000000..fb26543ba --- /dev/null +++ b/docs/cli/install.mdx @@ -0,0 +1,89 @@ +--- +title: "Install Continue CLI" +description: "Get Continue CLI installed and configured for command-line AI coding assistance and automation" +sidebarTitle: "Install" +--- + + + Make sure you have [Node.js 18 or higher + installed](https://nodejs.org/en/download/). + + +## Installation + +Install Continue CLI globally using npm: + +```bash +npm i -g @continuedev/cli +``` + +Verify installation: + +```bash +cn --version +``` + +## Initial Setup + +Get started is by logging in to Continue Hub for cloud-managed configurations: + + + +```bash +cn login +``` +This will open your browser to authenticate with Continue Hub. + + + + + 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"` + + + + +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: + +```bash +cn -p "Generate a conventional commit message for the current git changes" +``` + +## What's Next? + + + + Learn basic usage with practical examples + + + + Customize models, rules, and tools + + + +### Getting Help + +If you encounter issues: + +- Ask for help in [our discussions](https://github.com/continuedev/continue/discussions) +- Report bugs on [GitHub](https://github.com/continuedev/continue) diff --git a/docs/cli/overview.mdx b/docs/cli/overview.mdx new file mode 100644 index 000000000..5bf5b1a17 --- /dev/null +++ b/docs/cli/overview.mdx @@ -0,0 +1,183 @@ +--- +title: "Continue CLI (cn) Overview" +description: "Command-line interface for automated coding tasks, scripting, and headless development workflows with Continue's AI coding capabilities" +sidebarTitle: "Overview" +--- + + + + + +**Continue enables developers to ship faster with Continuous AI.** + + + Build features from descriptions. Debug and fix issues. Navigate any codebase. + Automate tedious tasks. + + +## Get started in 30 seconds + +Prerequisites: + +- [Node.js 18 or newer](https://nodejs.org/en/download/) +- A [Continue Hub](https://hub.continue.dev) account (recommended) or local configuration + +```bash npm +# Install Continue CLI +npm install -g @continuedev/cli + +# Navigate to your project + +cd your-awesome-project + +# Start coding with Continue + +cn + +# You'll be prompted to set up on first use + +``` + +That's it! You're ready to start automating with Continue CLI. + +[Continue with CLI Quickstart →](/cli/quick-start) + +## Why developers love Continue CLI + +- **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. +- **Takes action**: Continue CLI can directly edit files, run commands, and create commits. Need more? Check out our [MCPs](/integrations/mcp). +- **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. +- **Flexible interfaces**: Use interactive mode for back-and-forth conversations, or headless mode for automation and scripting. + +## Key Capabilities + +### Context Engineering + +- Use `@` to reference files and provide context +- Use `/` to run slash commands for specific tasks +- Access the same context providers as IDE extensions + +### Tool Integration + +- File editing and creation +- Terminal command execution +- Codebase understanding and analysis +- Git integration +- Web search and documentation access + +### Model Flexibility + +- Switch between models with `/model` command +- Use any model configured in your `config.yaml` +- Access Continue Hub models and configurations + +## Continue Hub Integration + +Continue CLI integrates seamlessly with [Continue Hub](https://hub.continue.dev) for: + +### API Access + +Get an API key for automation workflows: + +1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys) +2. Create a new API key +3. Use with `cn login` or in your automation scripts + +### Secrets Management + +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 }}` + +### Configuration Sync + +- Cloud-managed configurations automatically sync +- Share configurations across team members +- Version control for your AI workflows + +## Common Use Cases + +### Development Automation + + +```bash Generate Commit Messages +# Generate commit messages +cn -p "Generate a conventional commit message for the current changes" +``` + +```bash Code Review +# Code review automation +cn -p "Review the current git changes for bugs and suggest improvements" +``` + +```bash Test Generation +# Test generation +cn "@src/utils.js Generate comprehensive unit tests for this file" +``` + + + +### CI/CD Integration + + +```bash Pipeline Scripts +# In your pipeline scripts +cn -p "Analyze test failures and suggest fixes" +``` + +```bash Documentation Updates +# Automated documentation updates +cn "@README.md Update this documentation based on recent changes" +``` + + + +### Codebase Analysis + + +```bash Interactive Exploration +# Interactive exploration +cn +> @src/components Find all unused React components. How does authentication work in this codebase? +``` + +```bash Security Audits +# Security audits +cn -p "Scan the codebase for potential security vulnerabilities" +``` + + + +## Next steps + + + + Learn basic commands and common workflows + + + + Install Continue CLI and set up your environment + + + + Task-specific tutorials and examples + + + +## Additional resources + + + + Customize Continue CLI to fit your workflow + + + + Discover models, tools, and community configurations + + + + Join our Discord community for support and discussions + + diff --git a/docs/cli/quick-start.mdx b/docs/cli/quick-start.mdx new file mode 100644 index 000000000..5c2916ac3 --- /dev/null +++ b/docs/cli/quick-start.mdx @@ -0,0 +1,76 @@ +--- +title: "Continue CLI Quick Start" +description: "Get hands-on experience with Continue CLI through practical examples and common use cases" +sidebarTitle: "Quick Start" +--- + +Get hands-on experience with Continue CLI through common development scenarios. + + + + Interactive mode (`cn` command) lets you have a back-and-forth conversation + with Continue about your codebase. You can ask questions, get explanations, + and request code changes. + + + Headless mode (`-p` flag) is designed for automation and scripting. It + allows you to run commands without user interaction, making it suitable for + CI/CD pipelines and other automated workflows. + + + +## Get Started + +Make sure you have [Continue CLI installed](/cli/install) and are in a project directory. + +```bash +# Navigate to your project directory +cd your-awesome-project + +# Start Continue CLI in interactive mode +cn +``` + +This will launch an interactive chat session. You can also run commands directly in headless mode: + +```bash +# Run a command in headless mode +cn -p "Fix lint issues in the src/ directory" +``` + +### Available Slash Commands + +Common slash commands available in CLI: + +- `/clear` - Clear the chat history +- `/compact` - Summarize chat history into a compact form +- `/config` - Switch configuration or organization +- `/exit` - Exit the chat +- `/fork` - Start a forked chat session from the current history +- `/help` - Show help message +- `/info` - Show session information +- `/init` - Create an AGENTS.md file +- `/login` - Authenticate with your account +- `/logout` - Sign out of your current session +- `/mcp` - Manage MCP server connections +- `/model` - Switch between available chat models +- `/resume` - Resume a previous chat session +- `/whoami` - Check who you're currently logged in as + +Use `/help` to see all available commands. + +## Guides to Continuous AI with CLI + + + + Automate issue creation and labeling with PostHog data + + + + Learn more about Continue CLI features and capabilities + + + + Build custom tools and integrations using `cn` + +