Add CLI docs
This commit is contained in:
parent
592884e3d0
commit
56e3096ebf
3 changed files with 348 additions and 0 deletions
89
docs/cli/install.mdx
Normal file
89
docs/cli/install.mdx
Normal file
|
|
@ -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"
|
||||
---
|
||||
|
||||
<Info>
|
||||
Make sure you have [Node.js 18 or higher
|
||||
installed](https://nodejs.org/en/download/).
|
||||
</Info>
|
||||
|
||||
## 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:
|
||||
|
||||
<Steps>
|
||||
<Step title="Login to Continue CLI">
|
||||
```bash
|
||||
cn login
|
||||
```
|
||||
This will open your browser to authenticate with Continue Hub.
|
||||
</Step>
|
||||
|
||||
<Step title="Get API Key for Automation">
|
||||
|
||||
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"`
|
||||
|
||||
</Step>
|
||||
|
||||
<Step title="Add Secrets (Optional)">
|
||||
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 }}`
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## 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?
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Quick Start Guide" icon="rocket" href="/cli/quick-start">
|
||||
Learn basic usage with practical examples
|
||||
</Card>
|
||||
|
||||
<Card title="Create your first workflow" icon="gear" href="/guides/posthog-github-continuous-ai">
|
||||
Customize models, rules, and tools
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
### 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)
|
||||
183
docs/cli/overview.mdx
Normal file
183
docs/cli/overview.mdx
Normal file
|
|
@ -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"
|
||||
---
|
||||
|
||||
<Frame>
|
||||
<img src="/images/cn-demo.gif" />
|
||||
</Frame>
|
||||
|
||||
**Continue enables developers to ship faster with Continuous AI.**
|
||||
|
||||
<Tip>
|
||||
Build features from descriptions. Debug and fix issues. Navigate any codebase.
|
||||
Automate tedious tasks.
|
||||
</Tip>
|
||||
|
||||
## 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
|
||||
|
||||
<CodeGroup>
|
||||
```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"
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
### CI/CD Integration
|
||||
|
||||
<CodeGroup>
|
||||
```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"
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
### Codebase Analysis
|
||||
|
||||
<CodeGroup>
|
||||
```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"
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
## Next steps
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="CLI Quickstart" href="/cli/quick-start">
|
||||
Learn basic commands and common workflows
|
||||
</Card>
|
||||
|
||||
<Card title="Installation Guide" href="/cli/install">
|
||||
Install Continue CLI and set up your environment
|
||||
</Card>
|
||||
|
||||
<Card title="CLI Workflows" href="/guides/overview#continuous-ai">
|
||||
Task-specific tutorials and examples
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
## Additional resources
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="🔧 Configuration" icon="cog" href="/configuration">
|
||||
Customize Continue CLI to fit your workflow
|
||||
</Card>
|
||||
|
||||
<Card title="🌐 Continue Hub" icon="hub" href="https://hub.continue.dev/">
|
||||
Discover models, tools, and community configurations
|
||||
</Card>
|
||||
|
||||
<Card title="🤝 Community" icon="users" href="https://discord.com/invite/EfJEfdFnDQ">
|
||||
Join our Discord community for support and discussions
|
||||
</Card>
|
||||
</CardGroup>
|
||||
76
docs/cli/quick-start.mdx
Normal file
76
docs/cli/quick-start.mdx
Normal file
|
|
@ -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.
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Interactive Mode">
|
||||
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.
|
||||
</Tab>
|
||||
<Tab title="Headless Mode">
|
||||
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.
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## 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
|
||||
|
||||
<Info>Use `/help` to see all available commands.</Info>
|
||||
|
||||
## Guides to Continuous AI with CLI
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Create Your First Workflow" href="/guides/posthog-github-continuous-ai">
|
||||
Automate issue creation and labeling with PostHog data
|
||||
</Card>
|
||||
|
||||
<Card title="How to Use the CLI" href="/guides/cli">
|
||||
Learn more about Continue CLI features and capabilities
|
||||
</Card>
|
||||
|
||||
<Card title="Continous AI: a Developer's Guide" href="/guides/continuous-ai">
|
||||
Build custom tools and integrations using `cn`
|
||||
</Card>
|
||||
</CardGroup>
|
||||
Loading…
Add table
Reference in a new issue