Skip to content

Commands

Complete reference for all nca CLI commands, subcommands, and flags.

Global Usage (No Subcommand)

nca [OPTIONS]

When invoked without a subcommand, nca starts an interactive session. Behavior depends on flags:

FlagShortTypeDefaultDescription
--prompt-pstringRun a one-shot prompt and exit
--safe-sflagfalseStart in read-only safe mode
--resume-rflagfalseResume the most recent session
--no-resumeflagfalseForce a new session (skip auto-resume)
--runflagfalseStart interactive run mode
--modelstringOverride the default model
--enable-thinking-tflagfalseEnable extended thinking/reasoning
--thinking-budgetu325120Token budget for extended thinking
--max-tokensu328192Max response tokens
--verbose-vflagfalseVerbose debug logging
--jsonflagfalseOutput structured JSON (for CI)
--streamenumhumanStream format: human, ndjson, or off
--no-tuiflagfalseUse line-oriented REPL instead of full-screen TUI
--permission-modeenumPermission mode (see Permissions)
--max-turnsu32Max agent turns per run

Examples

# Start interactive TUI session
nca

# One-shot prompt
nca -p "refactor the error handling in src/lib.rs"

# Safe mode (read-only analysis)
nca -s

# Resume last session
nca -r

# Force new session
nca --no-resume

# Use a specific model
nca --model "claude-3-7-sonnet-latest"

# Enable thinking with custom budget
nca -t --thinking-budget 10000

# CI-friendly JSON output
nca -p "list all TODO comments" --json

# NDJSON event stream
nca -p "fix the tests" --stream ndjson

# Line REPL (no full-screen TUI)
nca --no-tui

# Bypass all permission prompts
nca --permission-mode bypass-permissions

Subcommands

nca run

Run a one-shot task with explicit stream control.

nca run --prompt "..." [OPTIONS]
FlagTypeDefaultDescription
--promptstringrequiredThe task to execute
--streamenumhumanStream format: human, ndjson, off
--modelstringOverride model
--jsonflagfalseStructured JSON output
--safeflagfalseRead-only mode
--permission-modeenumPermission mode
nca run --prompt "add input validation" --stream ndjson
nca run --prompt "analyze code quality" --safe --json

nca spawn

Launch a background session that runs without interactive input.

nca spawn --prompt "..." [OPTIONS]
FlagTypeDefaultDescription
--promptstringrequiredThe task to execute
--modelstringOverride model
--safeflagfalseRead-only mode
--jsonflagfalseStructured JSON output
--permission-modeenumaccept-editsPermission mode
nca spawn --prompt "write comprehensive tests for the auth module"
nca spawn --prompt "document all public APIs" --model "MiniMax-M2.7"

nca sessions

List and filter saved sessions.

nca sessions [OPTIONS]
FlagTypeDefaultDescription
--jsonflagfalseJSON output
--statusenumFilter by status: running, completed, cancelled, failed
--since-hoursu32Show sessions from the last N hours
--searchstringSearch sessions by text
--limitusize20Max number of sessions to show
nca sessions
nca sessions --status running
nca sessions --since-hours 24 --limit 5
nca sessions --search "auth" --json

nca resume

Resume a previously saved session.

nca resume <SESSION_ID> [OPTIONS]
FlagTypeDefaultDescription
--promptstringSend a follow-up prompt after resuming
--modelstringOverride model for this session
--safeflagfalseResume in read-only mode
--streamenumhumanStream format
--no-tuiflagfalseUse line REPL
--permission-modeenumPermission mode
nca resume abc123
nca resume abc123 --prompt "continue where you left off"
nca resume abc123 --model "claude-3-7-sonnet-latest"

nca logs

Stream or dump the event log for a session.

nca logs <SESSION_ID> [OPTIONS]
FlagTypeDefaultDescription
--followflagfalseFollow the log in real-time (like tail -f)
--jsonflagfalseRaw JSON output
nca logs abc123
nca logs abc123 --follow
nca logs abc123 --json

nca attach

Attach to a running session’s output stream.

nca attach <SESSION_ID> [--json]

nca status

Show metadata for a session.

nca status <SESSION_ID> [--json]

nca cancel

Cancel a running session.

nca cancel <SESSION_ID> [--json]

nca skills

Manage agent skills.

nca skills [--json]              # List all discovered skills
nca skills list [--json]         # Same as above
nca skills add <SOURCE> [OPTIONS]
nca skills remove <NAME> [OPTIONS]
nca skills update [NAME]         # Update one or all skills

nca skills add:

FlagShortTypeDefaultDescription
--skill-sstring[]allSpecific skills to install (repeatable)
--global-gflagfalseInstall globally to ~/.nca/skills/

nca skills remove:

FlagShortTypeDefaultDescription
--global-gflagfalseRemove from global skills
nca skills
nca skills add https://github.com/user/skill-repo -s rust-patterns
nca skills remove rust-patterns --global
nca skills update

nca mcp

List configured MCP (Model Context Protocol) servers.

nca mcp [--json]

nca memory

Manage persistent memory notes.

nca memory [--json]              # List memory notes
nca memory list [--json]         # Same as above
nca memory add <TEXT> [--kind <KIND>]
FlagTypeDefaultDescription
--kindstringnoteType of memory entry
nca memory
nca memory add "prefer async/await over thread spawning"
nca memory add "API uses bearer token auth" --kind note

nca models

List available models for the current provider.

nca models [--json]

nca doctor

Run diagnostic checks on your configuration.

nca doctor [--json]

Checks API key availability, provider connectivity, config file validity, and tool dependencies.


nca config

Display the current runtime configuration.

nca config [--json]

nca completion

Generate shell completion scripts.

nca completion <SHELL>

Supported shells: bash, zsh, fish, power-shell, elvish. Default: bash.


nca index

Manage the CLI index cache (used for agent self-awareness of available commands).

nca index build [--json]
nca index show [--json]

nca autoresearch

Run automated research on a program/topic.

nca autoresearch once <PROGRAM> [--workspace <PATH>]
FlagTypeDefaultDescription
--workspacepathcurrent directoryWorkspace for research output

Stream Modes

The --stream flag controls output format:

ModeDescription
humanTerminal-friendly output with colors, markdown rendering, and TUI support (default)
ndjsonNewline-delimited JSON events — one event per line, for machine consumption
offMinimal output — final result only

Exit Codes

CodeMeaning
0Success
1General error (provider failure, config issue, etc.)
non-zeroTask failure or cancellation