* docs: restructure CLI reference to web-friendly format Replace embedded man page format with structured markdown sections for better readability. Simplify description, reorganize commands and options into clear categories, and update Next Steps navigation cards. * Add ACP editor integrations documentation (#9036) * Add ACP editor integrations documentation with JetBrains and Neovim video demos * Add Model Orchestration documentation with --config and --thinking flags - Document --config and --thinking flags in CLI reference - Create new model-orchestration.mdx sample page - Add patterns for CI/CD review, task phase optimization, and multi-model consensus - Link to production GitHub Actions workflow - Update samples overview with new card - Update docs navigation * Add Worktree Workflows documentation with --cwd flag - Document --cwd flag in CLI reference - Create comprehensive worktree-workflows.mdx sample page - Add patterns for parallel execution and cross-worktree piping - Include real-world examples and best practices - Add CLI section to features/worktrees.mdx for discoverability - Update samples overview and navigation - Cross-link between CLI and VS Code worktree docs * Remove broken image references from worktrees documentation - Remove worktrees-overview.png Frame (image not available) - Remove worktrees-merge.png Frame (image not available) - Documentation remains fully functional with comprehensive text explanations * Remove accidentally committed local test file - Delete src/test/verify-platformio-mcp.ts which was causing CI failures - File contained TypeScript errors and hardcoded local paths - Was meant for local testing only, should not have been committed * Add native JetBrains plugin recommendation to ACP docs - Add prominent Note recommending native JetBrains plugin - Link directly to JetBrains installation section - Position ACP setup as an alternative approach - Keep all existing ACP content and video * docs: refine CLI reference formatting and ACP title Improve CLI reference readability with clearer headings and descriptions, and clarify the ACP editor integration page title for better discovery.docs: refine CLI reference formatting and ACP title Improve CLI reference readability with clearer headings and descriptions, and clarify the ACP editor integration page title for better discovery. * Fix CLI 2.0 syntax in model-orchestration.mdx - Updated issue analysis pipeline to use shell variables for passing context - Added explanatory note about why direct piping doesn't work - Corrected example to complete each phase before starting the next - All examples now use proper CLI 2.0 syntax * Completely rewrite cli-reference.mdx with accurate CLI 2.0 information - Removed all outdated CLI 1.0 content (instance management, Cline Core architecture, gRPC references) - Added accurate CLI 2.0 commands: task, history, config, auth, update, version, dev - Corrected all command flags and options based on actual man page - Added proper examples for all commands - Included environment variables documentation (CLINE_DIR, CLINE_COMMAND_PERMISSIONS) - Added shell completion instructions - Removed incorrect three-layer architecture description - All content now matches cli/man/cline.1.md source of truth Fixes outdated documentation issue mentioned in PR#9036 * Fix MDX syntax error in cli-reference.mdx - Replace angle bracket URLs with proper markdown links - MDX parser was interpreting <https://...> as invalid HTML tags - Now uses [url](url) format which is proper MDX syntax Fixes deployment validation error --------- Co-authored-by: Renee Huang <renee@cline.bot> * docs: enhance interactive mode documentation with structured settings overview * docs: restructure and improve CLI reference documentation - Reorganize command structure with clearer global options section - Add mode behavior table explaining interactive vs plain text modes - Improve option descriptions with consistent formatting - Add horizontal rules between sections for better readability - Document timeout option and environment variables more clearly - Add Tips & Tricks section for common usage patterns - Update frontmatter description to reflect content changes * docs: improve ACP editor integrations page with editor descriptions - Update page title to be more concise ("ACP: Editor Integrations") - Remove redundant H1 header that duplicated the title - Add introductory descriptions for JetBrains, Neovim, and Zed sections - Rename "Zed Editor" section to just "Zed" for consistency * docs: expand CLI reference with modes of operation and agent behavior * Update docs/cline-cli/cli-reference-deprecated.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Tony Loehr <turingxo@gmail.com> Co-authored-by: Renee Huang <renee@cline.bot> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
13 KiB
Implementation Plan: Cline CLI Documentation Update
[Overview] Update the Cline CLI documentation to reflect the new CLI 2.0 architecture that removes instances, adds a rich TUI experience, and introduces streamlined authentication options.
The Cline CLI 2.0 has undergone significant changes. The previous architecture used explicit instance management (cline instance new, cline instance list, etc.) which has been completely removed. The new architecture simplifies the user experience:
-
TUI Mode: Running
clinewithout arguments launches a full-featured terminal UI built with React Ink, featuring an animated robot, file mentions (@), slash commands (/), session summaries, and inline settings panels. This provides a "Claude Code-like" experience. -
CLI Mode: Running
cline "prompt"executes tasks directly. With--yoloflag, it runs non-interactively with output to stdout, making it ideal for CI/CD, piping, and bash scripts. -
Authentication: Multiple options including Cline account OAuth, ChatGPT subscription OAuth (via Codex), import from existing CLI tools (Codex CLI, OpenCode), and BYO API keys. Supports all providers from the VS Code extension (superset).
The documentation must clearly separate these two user journeys (TUI interactive vs CLI automation) while documenting deprecated features for users migrating from older versions.
Note: The CLI is now generally available (no longer preview) and supports macOS, Linux, and Windows.
[Types] No code type changes required - this is a documentation-only update.
This implementation plan only covers documentation files (.mdx files in docs/cline-cli/). No TypeScript interfaces, types, or code modifications are needed.
[Files] Update existing files and create new documentation pages for comprehensive coverage.
Files to UPDATE (in-place):
docs/cline-cli/overview.mdx- Remove instance references, reframe around TUI vs CLI modesdocs/cline-cli/installation.mdx- Expand with prerequisites, post-install steps, authenticationdocs/cline-cli/three-core-flows.mdx- Complete rewrite to remove instances, replace with TUI/CLI/Automation flowsdocs/cline-cli/cli-reference.mdx- Replace outdated man page content with current man page fromcli/man/cline.1.md
Files to CREATE:
docs/cline-cli/tui-guide.mdx- New comprehensive guide for the TUI experiencedocs/cline-cli/authentication.mdx- New guide covering all auth optionsdocs/cline-cli/configuration.mdx- New guide forcline configand settings management
Files to MODIFY:
docs/docs.json- Add new pages to navigation under CLI group
[Functions] No function changes required - documentation only.
This is a documentation update with no code changes to functions, methods, or handlers.
[Classes] No class changes required - documentation only.
This is a documentation update with no code changes to classes or components.
[Dependencies] No dependency changes required.
This is a documentation update with no package changes.
[Testing] Documentation should be verified for accuracy by cross-referencing with source code.
Verification steps:
- Cross-reference all documented features against
cli/src/index.tsentry point - Verify keyboard shortcuts against
cli/src/components/ChatView.tsx - Verify auth options against
cli/src/components/AuthView.tsx - Verify slash commands against
cli/src/components/HelpPanelContent.tsx - Verify config options against
cli/src/components/ConfigView.tsxandSettingsPanelContent.tsx - Verify import sources against
cli/src/utils/import-configs.ts - Run
npm run docs:dev(if available) to preview documentation locally
Content accuracy checks:
- All keyboard shortcuts match source code
- All command flags match
cli/src/index.ts - Auth provider list matches
AuthView.tsx - Import sources correctly documented (Codex CLI, OpenCode - NOT "Claude Code")
- Deprecated features clearly marked
[Implementation Order] Execute documentation updates in dependency order to ensure consistency.
- Update
docs/docs.json- Add new page entries to navigation first so links work - Create
docs/cline-cli/authentication.mdx- Auth is foundational, other docs reference it - Create
docs/cline-cli/tui-guide.mdx- Core new content for TUI users - Create
docs/cline-cli/configuration.mdx- Config management guide - Update
docs/cline-cli/overview.mdx- Reframe overview with new architecture - Update
docs/cline-cli/installation.mdx- Expand installation guide - Update
docs/cline-cli/three-core-flows.mdx- Rewrite as TUI/CLI/Automation flows - Update
docs/cline-cli/cli-reference.mdx- Replace with current man page content - Verify all cross-references and links work correctly
Detailed File Specifications
1. docs/docs.json (UPDATE)
Add new pages to the CLI navigation group:
{
"group": "CLI",
"pages": [
"cline-cli/overview",
"cline-cli/installation",
"cline-cli/authentication",
"cline-cli/tui-guide",
"cline-cli/configuration",
"cline-cli/three-core-flows",
{
"group": "CLI Samples",
"pages": [
"cline-cli/samples/overview",
"cline-cli/samples/github-issue-rca",
"cline-cli/samples/github-integration"
]
},
"cline-cli/cli-reference"
]
}
2. docs/cline-cli/authentication.mdx (CREATE)
Purpose: Comprehensive guide to all authentication options
Sections:
- Quick start (sign in with Cline - recommended)
- Sign in with ChatGPT subscription (OpenAI Codex OAuth)
- Import from existing CLI tools:
- Import from Codex CLI (
~/.codex/auth.json) - Import from OpenCode (
~/.local/share/opencode/auth.json)
- Import from Codex CLI (
- Bring your own API keys (manual provider configuration)
- Supported providers list with examples
- Switching providers (
cline auth) - Quick setup flags (
cline auth -p <provider> -k <key> -m <model>)
Key corrections from user input:
- User said "import from Claude Code" - INCORRECT. Actual sources are:
- Codex CLI (OpenAI's CLI tool)
- OpenCode
- Document the actual import sources from
cli/src/utils/import-configs.ts
3. docs/cline-cli/tui-guide.mdx (CREATE)
Purpose: Guide to the interactive terminal UI experience
Sections:
- Launching the TUI (
clinewithout arguments) - The welcome screen and robot animation
- Input field and message display
- Keyboard shortcuts:
Tab- Toggle Plan/Act modeShift+Tab- Toggle auto-approve allEnter- Submit messageEsc- Exit/cancel↑/↓- Navigate historyHome/End- Cursor movementCtrl+A/E/W/U- Text editing
- File mentions with
@:- Type
@to search workspace files - Uses ripgrep for fast searching
- Type
- Slash commands with
/:/settings- Open settings panel/models- Quick model switching/history- Browse task history/clear- Start fresh task/help- Show help/exit- Exit CLI- Workflow commands
- Settings panel (
/settings):- API tab (provider, model, thinking)
- Auto-approve tab
- Features tab
- Account tab
- Other tab
- Session summary on exit
- Running multiple instances with
--config:- Default: settings shared across all instances
- Use
cline --config /path/to/configfor isolated configs - Recommend tmux/terminal multiplexing for parallel work
4. docs/cline-cli/configuration.mdx (CREATE)
Purpose: Guide to cline config command and settings management
Sections:
- Running
cline config - Configuration tabs:
- Settings (global state, workspace state)
- Rules (
.clinerulesfiles, Cursor rules, Windsurf rules) - Workflows
- Hooks (if enabled)
- Skills (if enabled)
- Keyboard navigation in config view
- Editing configuration values
- Configuration directory structure (
~/.cline/data/) - Environment variables (
CLINE_DIR,CLINE_COMMAND_PERMISSIONS) - Using
--configflag for separate configurations
5. docs/cline-cli/overview.mdx (UPDATE)
Changes:
- Remove all references to instances (
cline instance new/list/kill) - Reframe around two modes: TUI (interactive) and CLI (automation)
- Update "What you can build" section to remove multi-instance examples
- Add section about new TUI features
- Link to new authentication and TUI guide pages
- Note deprecation of instance commands
New structure:
- What is Cline CLI?
- Two ways to use Cline CLI:
- TUI Mode (interactive development)
- CLI Mode (automation and scripting)
- Supported Model Providers
- What you can build
- Learn more (links)
6. docs/cline-cli/installation.mdx (UPDATE)
Changes:
- Remove "Preview Release - macOS and Linux Only" warning (CLI is now GA and supports Windows)
- Add note that CLI supports macOS, Linux, and Windows
- Add Node.js version requirement (20+, recommend 22)
- Add version specification (
npm install -g cline@2.0.0) - Add more detail on post-install authentication
- Link to new authentication guide
- Add troubleshooting tips
- Add verification steps
New structure:
- Prerequisites (Node.js version)
- Installation:
npm install -g cline(ornpm install -g cline@2.0.0) - Authentication (
cline auth- link to auth guide) - Quick Start (two paths: TUI and CLI)
- Next Steps (links to guides)
7. docs/cline-cli/three-core-flows.mdx (UPDATE - Major Rewrite)
Complete rewrite removing all instance references.
New title suggestion: "CLI Workflows" or "Getting Started Workflows"
New structure:
- Interactive TUI Mode (replaces old "Interactive mode")
- Launch with
cline - Plan/Act mode toggle (Tab key)
- Using slash commands and file mentions
- Auto-approve toggle (Shift+Tab)
- Session summary on exit (Ctrl+C)
- Launch with
- Direct Task Execution (replaces old "Headless single-shot")
cline "prompt"syntax- Piping context (
cat file | cline "explain") - Piping cline into cline:
git diff | cline -y "explain" | cline -y "write poem" - Image attachments
- Automation & CI/CD (replaces old "Multi-instance")
--yolo/-yflag for non-interactive mode (also called "yes mode")--jsonoutput for parsing (same format as~/.cline/data/tasks/<id>/ui_messages.json)--timeoutfor long-running tasks- Environment variables:
CLINE_DIR- custom config directoryCLINE_COMMAND_PERMISSIONS- restrict allowed shell commands
- Example GitHub Actions workflow for PR review
Creative use cases from engineer demo:
- Chain cline commands:
git diff | cline -y "explain" | cline -y "write a poem about this" - GitHub PR review workflow with
ghCLI integration
Deprecation notice:
Add a callout at the top noting that instance commands (cline instance new/list/kill) have been removed in favor of the simpler architecture.
8. docs/cline-cli/cli-reference.mdx (UPDATE)
Changes:
- Replace the outdated embedded man page with content from
cli/man/cline.1.md - The current man page in the docs references old instance commands
- The actual man page (
cli/man/cline.1.md) has correct, updated content - Convert man page markdown format to mdx documentation format
- Add JSON output schema section
- Add environment variables section
- Remove all instance command references
Additional Features from Engineer Demo
Man Page
man cline- View in-depth documentation in terminal
Dev Tools
cline dev log- Opens log file for debuggingcline update- Check for and install updates
JSON Output Format
- Same format as saved task files:
~/.cline/data/tasks/<id>/ui_messages.json - Useful for programmatic use cases
- Pipe through
jqfor easier parsing - Example:
cline --json "prompt" | jq '.text'
Verification Checklist
After implementation, verify these user requirements are documented:
- New TUI experience explained
- NPM installation covered
- Authorization options:
- Sign in with Cline
- Sign in with ChatGPT Subscription (Codex OAuth)
- Import from Codex CLI (CORRECTED from "Claude Code")
- Import from OpenCode
- Bring your own API keys
- Bedrock support mentioned
cline authfor changing providers- Basic CLI usage:
cline "task"syntax- Piping context
--yolo/-yfor CI/CD (also called "yes mode")
- TUI features:
clinealone launches TUI- Tab to toggle Plan/Act mode
- Shift+Tab for auto-approve all
- Session summary on exit (Ctrl+C)
--configfor separate configs
- Instance deprecation noted
cline configfor rules, workflows, hooks, skills- @ file mentions with autocomplete (fuzzy search)
- / slash commands with autocomplete
/settingsdocumented/modelsdocumented/historydocumented- Workflows generate slash commands
- /settings panel sections documented (arrow keys to navigate tabs)
- Environment variables:
CLINE_DIRdocumentedCLINE_COMMAND_PERMISSIONSdocumented (security measure)
- Dev tools:
cline dev logdocumentedcline updatedocumentedman clinedocumented
- JSON output format documented
- Piping cline into cline documented
- GitHub Actions PR review example included