continue-custom/extensions/cli
Aaron Lippold 528a8abceb
fix(cli): expand model capability detection to include Llama, Nemotron, and Mistral (#8845)
* fix(cli): expand model capability detection to include Llama, Nemotron, and Mistral models

The isModelCapable function was showing false warnings for Llama, Nemotron,
and Mistral models, claiming they had "limited reasoning and tool calling
capabilities" when they actually have excellent capabilities.

**Changes:**
- Added /llama/, /nemotron/, /mistral/ patterns to capability detection regex
- Updated tests to reflect that these model families ARE capable
- All tests passing (26/26)

**Research validation:**
- Llama 3.3/Nemotron: #1 on alignment benchmarks, Arena Hard 85.0
- Mistral: 81.2% MMLU, supports function calling and JSON mode
- Both families widely used for agent workflows with proven tool calling

**Impact:**
- Removes false warnings for users of these popular model families
- Enables proper multiEdit tool usage for capable models
- Aligns detection with real-world model capabilities

Tested with nvidia/Llama-3_3-Nemotron-Super-49B-v1 on MITRE AIP endpoints.

Authored by: Aaron Lippold <lippold@gmail.com>

* fix: missing comma after grok

---------

Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2025-12-05 12:14:00 -08:00
..
.github cai: workflow to auto-fix tests (disabled for now) 2025-08-31 16:40:13 -07:00
docs Add URL refresh strategy for storage sync pre-signed URLs 2025-11-28 13:47:00 -08:00
media Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
spec Merge pull request #8928 from uinstinct/cli-single-submit 2025-12-05 09:51:37 -08:00
src fix(cli): expand model capability detection to include Llama, Nemotron, and Mistral (#8845) 2025-12-05 12:14:00 -08:00
stubs chore: format 2025-08-21 17:38:41 -07:00
test-fixtures chore: format 2025-08-26 09:23:06 -07:00
.env.example Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
.gitignore Add description truncation for slash commands in CLI UI 2025-10-09 15:47:57 -07:00
.npmignore chore: add package-lock 2025-08-20 20:00:53 -07:00
.releaserc.json Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
AGENTS.md chore: format 2025-09-11 14:48:58 -07:00
BUILD.md Revise build steps in BUILD.md (#8130) 2025-10-08 07:27:45 -07:00
build.mjs feat: mark unread (#7886) 2025-09-22 19:54:46 -07:00
CHANGELOG.md Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
demo.expect feat: asciinema recordings setup (#8154) 2025-10-08 22:08:17 -07:00
eslint.config.js Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
package-lock.json chore: mcp 1.24.0 (#8974) 2025-12-04 12:58:28 -08:00
package.json chore: mcp 1.24.0 (#8974) 2025-12-04 12:58:28 -08:00
README.md feat: ✨ Remove TTY requirement for the cli in headless mode 2025-11-18 19:45:15 -08:00
smoke-test.mjs chore: format 2025-08-26 09:23:06 -07:00
tsconfig.build.json Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
tsconfig.json fix: lint errors from core 2025-08-26 18:19:44 -07:00
validate-aliases.mjs refactor: shared function for constructing llm api 2025-08-29 10:29:35 -07:00
vitest.config.ts Revert "chore: retry cli tests on macos" 2025-12-02 19:16:02 +05:30
vitest.e2e.config.ts Revert "chore: retry cli tests on macos" 2025-12-02 19:16:02 +05:30
vitest.setup.ts fix: default-cli-config not default-config 2025-11-20 11:42:09 -08:00

Continue CLI

The Continue CLI (cn) is a customizable command line coding agent.

Continue CLI Demo

Installation

npm i -g @continuedev/cli

Usage

cn

Headless Mode

Headless mode (-p flag) runs without an interactive terminal UI, making it perfect for:

  • Scripts and automation
  • CI/CD pipelines
  • Docker containers
  • VSCode/IntelliJ extension integration
  • Environments without a TTY
# Basic usage
cn -p "Generate a conventional commit name for the current git changes."

# With piped input
echo "Review this code" | cn -p

# JSON output for scripting
cn -p "Analyze the code" --format json

# Silent mode (strips thinking tags)
cn -p "Write a README" --silent

TTY-less Environments: Headless mode is designed to work in environments without a terminal (TTY), such as when called from VSCode/IntelliJ extensions using terminal commands. The CLI will not attempt to read stdin or initialize the interactive UI when running in headless mode with a supplied prompt.

Session Management

The CLI automatically saves your chat history for each terminal session. You can resume where you left off:

# Resume the last session in this terminal
cn --resume

# List recent sessions and choose one to resume
cn ls

# List sessions in JSON format (for scripting)
cn ls --json

Command Line Options

  • -p: Run in headless mode (no TUI)
  • --config <path>: Specify agent configuration path
  • --resume: Resume the last session for this terminal
  • <prompt>: Optional prompt to start with

Environment Variables

  • CONTINUE_CLI_DISABLE_COMMIT_SIGNATURE: Disable adding the Continue commit signature to generated commit messages
  • FORCE_NO_TTY: Force TTY-less mode, prevents stdin reading (useful for testing and automation)

Commands

  • cn: Start an interactive chat session
  • cn ls: List recent sessions with TUI selector to choose one to resume
  • cn login: Authenticate with Continue
  • cn logout: Sign out of current session
  • cn remote: Launch a remote instance
  • cn serve: Start HTTP server mode

Session Listing (cn ls)

Shows recent sessions, limited by screen height to ensure it fits on your terminal.

  • --json: Output in JSON format for scripting (always shows 10 sessions)

TTY-less Support

The CLI fully supports running in environments without a TTY (terminal):

# From Docker without TTY allocation
docker run --rm my-image cn -p "Generate docs"

# From CI/CD pipeline
cn -p "Review changes" --format json

# From VSCode/IntelliJ extension terminal tool
cn -p "Analyze code" --silent

The CLI automatically detects TTY-less environments and adjusts its behavior:

  • Skips stdin reading when a prompt is supplied
  • Disables interactive UI components
  • Ensures clean stdout/stderr output

For more details, see spec/tty-less-support.md.