| 1 | --- |
| 2 | title: "Continue CLI Quick Start" |
| 3 | description: "Get hands-on experience with Continue CLI through practical examples and common use cases" |
| 4 | sidebarTitle: "Quick Start" |
| 5 | --- |
| 6 | |
| 7 | Get hands-on experience with Continue CLI through practical development workflows. |
| 8 | |
| 9 | <Tabs> |
| 10 | <Tab title="TUI Mode"> |
| 11 | TUI Mode (`cn` command) is for **large development tasks** that require |
| 12 | agentic workflows with human oversight. Perfect for complex refactors, |
| 13 | feature implementation, or one-off automation tasks that need monitoring and |
| 14 | iteration. |
| 15 | </Tab> |
| 16 | <Tab title="Headless Mode"> |
| 17 | Headless Mode (`-p` flag) is for **reliable, repeatable tasks** that no |
| 18 | longer need constant supervision. Perfect for CI/CD pipelines, git hooks, |
| 19 | and automated workflows you've already tested and refined. |
| 20 | </Tab> |
| 21 | </Tabs> |
| 22 | |
| 23 | ## TUI Mode: Large Development Tasks |
| 24 | |
| 25 | Make sure you have [Continue CLI installed](/cli/install) and are in a project directory. |
| 26 | |
| 27 | ### Example: Implementing a New Feature |
| 28 | |
| 29 | ```bash |
| 30 | # Navigate to your project directory |
| 31 | cd your-awesome-project |
| 32 | |
| 33 | # Start TUI Mode for complex development work |
| 34 | cn |
| 35 | ``` |
| 36 | |
| 37 | **Example workflow for adding authentication:** |
| 38 | |
| 39 | ``` |
| 40 | > I need to add JWT authentication to this Express app. Let me start by showing you the current structure. |
| 41 | |
| 42 | > @src/app.js @package.json Here's my current setup. Can you implement JWT auth with middleware, login/register routes, and user model? |
| 43 | |
| 44 | > [Agent analyzes codebase and implements auth system] |
| 45 | > [You review changes, test, and provide feedback] |
| 46 | > [Agent iterates based on your input until the feature is complete] |
| 47 | ``` |
| 48 | |
| 49 | ### Example: Complex Refactoring |
| 50 | |
| 51 | ```bash |
| 52 | cn |
| 53 | ``` |
| 54 | |
| 55 | **Refactoring a monolithic component:** |
| 56 | |
| 57 | ``` |
| 58 | > @src/components/Dashboard.jsx This component is 800 lines and does too much. Help me break it into smaller, reusable components. |
| 59 | |
| 60 | > [Agent analyzes component structure] |
| 61 | > [Proposes component breakdown strategy] |
| 62 | > [You approve approach] |
| 63 | > [Agent implements the refactor with proper props and state management] |
| 64 | > [You test and request adjustments] |
| 65 | ``` |
| 66 | |
| 67 | ### When to Use TUI Mode |
| 68 | |
| 69 | ✅ **Large development tasks** that need oversight |
| 70 | ✅ **Complex refactors** requiring multiple steps |
| 71 | ✅ **New feature implementation** with unknowns |
| 72 | ✅ **One-off automation tasks** you haven't done before |
| 73 | ✅ **Debugging complex issues** that need exploration |
| 74 | |
| 75 | ## Headless Mode: Automated Workflows |
| 76 | |
| 77 | Once you've refined a workflow in TUI Mode, convert it to Continuous AI for automation. |
| 78 | |
| 79 | ### Example: From REPL → Continuous AI |
| 80 | |
| 81 | **Step 1: Develop in TUI Mode** |
| 82 | |
| 83 | ```bash |
| 84 | cn |
| 85 | > @package.json @CHANGELOG.md Generate release notes for version 2.1.0 |
| 86 | > [Test and refine the prompt until it works perfectly] |
| 87 | ``` |
| 88 | |
| 89 | **Step 2: Convert to Continuous AI** |
| 90 | |
| 91 | ```bash |
| 92 | # Now use the refined workflow in automation |
| 93 | cn -p "Generate release notes for the current version based on package.json and recent commits" |
| 94 | ``` |
| 95 | |
| 96 | ### Common Continuous AI Workflows |
| 97 | |
| 98 | ```bash |
| 99 | # Git automation |
| 100 | cn -p "Generate a conventional commit message for staged changes" |
| 101 | cn -p "Review the last 3 commits for potential issues" |
| 102 | |
| 103 | # Code quality |
| 104 | cn -p "Fix all TypeScript errors in the src/ directory" |
| 105 | cn -p "Update outdated dependencies and fix breaking changes" |
| 106 | |
| 107 | # Documentation |
| 108 | cn -p "@README.md Update documentation based on recent changes" |
| 109 | cn -p "Generate API documentation from JSDoc comments" |
| 110 | |
| 111 | # CI/CD integration |
| 112 | cn -p "Analyze test failures and create GitHub issue with findings" |
| 113 | cn -p "Update version numbers and create release branch" |
| 114 | ``` |
| 115 | |
| 116 | ### When to Use Headless Mode |
| 117 | |
| 118 | ✅ **Proven workflows** you've tested in TUI Mode |
| 119 | ✅ **Repetitive tasks** that no longer need oversight |
| 120 | ✅ **CI/CD automation** in pipelines |
| 121 | ✅ **Git hooks** for automated checks |
| 122 | ✅ **Scheduled tasks** that run unattended |
| 123 | |
| 124 | ### Available Slash Commands |
| 125 | |
| 126 | Common slash commands available in CLI: |
| 127 | |
| 128 | - `/clear` - Clear the chat history |
| 129 | - `/compact` - Summarize chat history into a compact form |
| 130 | - `/config` - Switch configuration or organization |
| 131 | - `/exit` - Exit the chat |
| 132 | - `/fork` - Start a forked chat session from the current history |
| 133 | - `/help` - Show help message |
| 134 | - `/info` - Show session information |
| 135 | - `/init` - Create an AGENTS.md file |
| 136 | - `/login` - Authenticate with your account |
| 137 | - `/logout` - Sign out of your current session |
| 138 | - `/mcp` - Manage MCP server connections |
| 139 | - `/model` - Switch between available chat models |
| 140 | - `/resume` - Resume a previous chat session |
| 141 | - `/whoami` - Check who you're currently logged in as |
| 142 | |
| 143 | <Info>Use `/help` to see all available commands.</Info> |
| 144 | |
| 145 | ## The Development Workflow |
| 146 | |
| 147 | <Info> |
| 148 | **Recommended Approach**: Start complex tasks in TUI Mode to iterate and |
| 149 | refine your approach. Once you have a reliable workflow, convert it to |
| 150 | Headless Mode for automation. |
| 151 | </Info> |
| 152 | |
| 153 | ### Workflow Pattern |
| 154 | |
| 155 | 1. **🔬 Experiment in TUI Mode** |
| 156 | |
| 157 | - Try complex development tasks with human oversight |
| 158 | - Iterate on prompts and approaches until they work reliably |
| 159 | - Test edge cases and refine the agent's behavior |
| 160 | |
| 161 | 2. **⚡ Automate with Continuous AI** |
| 162 | - Convert proven REPL workflows to single commands |
| 163 | - Deploy in CI/CD, git hooks, or scheduled tasks |
| 164 | - Run with confidence knowing the approach is tested |
| 165 | |
| 166 | ## Next Steps |
| 167 | |
| 168 | <CardGroup cols={2}> |
| 169 | <Card title="Create Your First Workflow" href="/guides/posthog-github-continuous-ai"> |
| 170 | Build an automated PostHog to GitHub issues workflow |
| 171 | </Card> |
| 172 | |
| 173 | <Card title="Continuous AI Guide" href="/guides/continuous-ai"> |
| 174 | Learn to build and deploy AI-powered development workflows |
| 175 | </Card> |
| 176 | </CardGroup> |