A native Rust CLI for orchestrating AI agents across projects, with persistent sessions, worktrees, and local-first control.
A native Rust CLI for orchestrating AI agents across projects, with persistent sessions, worktrees, and local-first control.
Rust-native coding agent. Single binary. Terminal-first.
v0.4 — dedicated TUI crate, unified product home, live busy activity
Install · What's New · Quick Start · Commands · Interactive UX · Providers · Funding
nca is a Rust-native coding CLI that ships as a single binary. It is built for local-first, terminal-first workflows: interactive TUI, line REPL, one-shot runs, detached sessions, attach/status/logs, JSON and NDJSON output, Unix-socket IPC, worktree-isolated subagents, and autonomous research helpers.
It is meant for people who like their AI tooling close to the terminal: fast to start, easy to script, and capable of running real session workflows without dragging in a browser shell.
The product surface is the CLI. No desktop wrapper, no Electron, no browser in the default path.
nca-tui crate — full-screen transcript, overlays, sidebar, and REPL live in their own crate; nca-cli stays the thin entrypoint.$NCA_HOME / $XDG_DATA_HOME/ncacli / ~/.local/share/ncacli (legacy ~/.nca still migrates).write_file / edit_file / bash calls show the path or command one-liner./help in sync via one registry (palette Enter runs the command).AGENTS.md sections, filesystem directories, and user-level skill directories.| Use case | Why nca fits |
|---|---|
| Solo coding in the terminal | Start with nca, use the TUI, switch agent profiles, review diffs, and keep everything in one terminal-native flow. |
| Quick one-shot work | nca run --prompt ... gives you a focused foreground task without opening a longer session than you need. |
| Background analysis | nca spawn --prompt ... lets you kick off work, keep coding, then come back with status, logs, or attach. |
| Multi-agent exploration | Parent and child sessions keep lineage, and child runs can use separate git worktrees for isolation. |
| Automation and orchestration | --json, --stream ndjson, Unix-socket IPC, and NCA_ORCH_* metadata make it usable as a worker process. |
| Long-running research | nca autoresearch once runs metric-driven experiments with parsed output for CI/profiling. |
curl -fsSL https://nca-cli.com/install | bashThis detects your platform, downloads the latest release from GitHub, and installs nca to /usr/local/bin. Set NCA_INSTALL_DIR to change the install path.
Windows: download the matching .zip from Releases and put nca.exe on your PATH.
Pre-built binaries for every release are available on the Releases page:
| Platform | Target | Archive |
|---|---|---|
| macOS (Apple Silicon) | aarch64-apple-darwin |
.tar.gz |
| macOS (Intel) | x86_64-apple-darwin |
.tar.gz |
| Linux (x86_64) | x86_64-unknown-linux-gnu |
.tar.gz |
| Linux (ARM64) | aarch64-unknown-linux-gnu |
.tar.gz |
| Windows (x86_64) | x86_64-pc-windows-msvc |
.zip |
Requires Rust edition 2024 (use a recent toolchain).
git clone https://github.com/madebyaris/native-cli-ai.git
cd native-cli-ai
cargo build --release
cp target/release/nca /usr/local/bin/# Configure a provider
export MINIMAX_API_KEY="your-api-key"
# Start the interactive CLI
nca
# Line REPL instead of the full-screen TUI
nca --no-tui
# Run one task and exit
nca run --prompt "Explain this repository"
# Spawn a detached session
nca spawn --prompt "Inspect the repo and draft a plan"
# Inspect and attach
nca sessions
nca status
nca attach The full-screen UI appears when stdin and stdout are TTYs and --stream human is active. Otherwise nca falls back to the line-oriented REPL or one-shot execution path.
In the default TUI you can attach images for the next user message:
/image paste — same as clipboard paste if Ctrl+V is not available./image path/to/screenshot.png — copy a file into the session attachment dir./image clear — remove staged images before you press Enter.For MiniMax, pasted images are analyzed with the same HTTP API as the MCP's understand_image tool (POST /v1/coding_plan/vlm on https://api.minimax.io or your region host); nca does this in Rust (no Python MCP). The description is merged into the user message before /v1/messages. Other providers use their own multimodal chat formats where supported. If the selected provider/model is not treated as vision-capable, nca errors instead of silently dropping images. Session attachment copies are removed automatically after a successful send/process; your original source file is not deleted.
The main interface is designed to feel like a serious terminal tool, not a toy overlay.
| Command | Purpose |
|---|---|
nca |
Start the default interactive experience. Auto-resumes the last session unless --no-resume is used. |
nca run --prompt ... |
Run one task in the foreground. |
nca spawn --prompt ... |
Start a detached session and return immediately. |
nca resume |
Resume a saved session. |
nca attach |
Attach to a running session over IPC. |
nca logs |
Read or follow the event log. |
nca status |
Show session status and metadata. |
nca cancel |
Mark a detached session as cancelled. |
nca sessions |
List saved sessions, with filters like --status, --since-hours, and --search. |
nca models |
Show configured models and provider-facing defaults. |
nca doctor |
Check provider readiness, skills, and memory/config paths. |
nca config |
Print effective config and resolved paths. |
nca memory list|add |
Inspect or append workspace memory notes. |
nca skills |
List discovered skills with their source (AGENTS.md, filesystem, or user directory). |
nca mcp |
List configured MCP servers. |
nca completion |
Generate shell completions. |
nca index build|show |
Build or inspect a cached CLI index under ~/.local/share/ncacli/workspaces//. |
nca autoresearch once |
Run a metric-driven research program and print parsed output. |
There is also a hidden serve subcommand used for IPC-oriented service sessions.
The interactive surface has two modes:
reedline) — for scripts, non-TTY environments, or --no-tui.Slash commands, the Ctrl+P command palette, autocomplete, and /help all come from one registry, so labels stay in sync. Palette Enter executes the command (it does not only pre-fill the composer).
| Command | Purpose |
|---|---|
/help |
Show help (generated from the registry). |
/agent |
Choose agent profile (build, plan, review, fix, test). |
/plan /review /fix /test |
Run a preset turn for that profile. |
/skills |
Browse discovered skills; /{skill} runs one. |
/memory |
Show or append memory notes. |
/compact |
Compact session context. |
/copy |
Copy the latest assistant response (TUI; also Ctrl+Shift+C). |
/todos |
Show the session todo list. |
/model |
Open the model picker (/models is an alias). |
/connect |
Connect / switch provider, API key, or custom endpoint (/provider, /apikey, /custom are aliases). |
/status |
Session status and health (/stats, /cost, /doctor are aliases). |
/config |
Config and editor settings (/settings, /set-editor are aliases). |
/permissions |
Permission mode picker (/permission-bypass is an alias). |
/sessions /new /export /attach /logs |
Session lifecycle and inspection. |
/image |
Stage clipboard or file images (TUI). |
/editor |
Open the external editor. |
/mcp /agents /diff /thinking /stop /clear /exit |
System and turn controls. |
/auto-answer |
Accept the suggested answer for a pending ask_question. |
| Binding | Action |
|---|---|
Ctrl+P |
Open the command palette (fuzzy; Enter runs). |
Ctrl+V |
Paste image from clipboard (TUI). |
Ctrl+Shift+C |
Copy last assistant response (TUI). |
Ctrl+X then m / e / l / n / c / s / a / h / q |
Leader shortcuts: model, editor, sessions, new, compact, status, agent, help, exit. |
Ctrl+Y / Ctrl+N / Ctrl+U |
Approve / deny / always-allow a pending tool (wins over an open question modal). |
Tab |
Complete @ path or / command; otherwise cycle agent profile. |
F2 / Shift+F2 |
Cycle recent models. |
Ctrl+V |
Paste clipboard image (off the UI thread). |
Ctrl+L |
Clear the transcript (same idea as /clear). |
Esc / Ctrl+C |
Cancel the current turn when busy. |
! |
Run a shell command. |
@ |
File mention with fuzzy completion (indexes in the background on open). |
Click the branch chip in the status line to open the branch picker (list/switch/create via background git).
While the agent is working, the status bar shows an animated busy state with elapsed seconds (thinking 12s, tool 3s) and a short detail (model wait, stream size, or file path). The transcript footer mirrors the same live activity so long provider waits do not look frozen.
nca is designed to work well in two very different moods: terminal-first for humans, and machine-friendly for orchestrators.
--stream off returns only the final output.--stream human renders the normal terminal experience.--stream ndjson emits newline-delimited event envelopes.--json is available on lifecycle-oriented commands such as spawn, sessions, status, cancel, skills, models, doctor, config, index show, and mcp.NCA_ORCH_* and `NCNo open issues yet, or sync has not completed.