Skip to content

Interactive Mode

nca provides a rich interactive experience with a full-screen TUI (Terminal User Interface) and a fallback line-oriented REPL.

TUI vs REPL

ModeWhen UsedFeatures
TUI (default)Terminal is a TTY, --stream human, no --no-tuiFull-screen, scrollable output, command palette, modals, mouse support
Line REPL--no-tui flag, or non-TTY stdin/stdoutSimple line-by-line input/output, still supports slash commands

Force line REPL mode:

nca --no-tui

Input Modes

Regular Text

Type your message and press Enter to send it to the agent.

Shell Commands (!)

Prefix with ! to run a shell command directly. The output is captured and fed into the conversation context.

! cargo test
! git log --oneline -5
! ls -la src/

File Mentions (@)

Type @ followed by a path to inline-reference a file. nca performs fuzzy file search and auto-completion.

Can you review @src/main.rs and @src/lib.rs?

In the TUI, pressing @ opens a file picker with fuzzy search. Use Tab to navigate matches and Enter to select.

Multiline Input (\)

End a line with \ to continue input on the next line:

Write a function that \
takes a vector of strings \
and returns the longest one.

Slash Commands (/)

Type / to access slash commands. In the TUI, this opens an inline autocomplete menu.


Slash Commands

General

CommandDescription
/helpShow help with all commands and keyboard shortcuts
/statusDisplay session status (ID, model, agent profile, permission mode)
/clearClear the screen
/exit, /quit, /qExit the session
/newStart a new session
/exportExport the current session to markdown
/stopCancel the current agent turn

Agent Profiles

CommandDescription
/agent [profile]Show or switch agent profile
/plan <task>Run a planning-oriented turn (read-only analysis)
/review <task>Run a code review turn
/fix <task>Run a bug-fix turn
/test <task>Run a validation/testing turn

Available agent profiles:

ProfileDescription
@buildDefault full-access agent for development work
@planRead-only agent for analysis and planning
@reviewFocused code review agent
@fixBug diagnosis and fix agent
@testTesting and validation agent

Model and Provider

CommandDescription
/modelsBrowse and select models (opens picker in TUI)
/model [name]Set the active model for the session
/connectOpen the provider connection picker
/provider [name]Show or set the default LLM provider
/apikey <provider> <key>Store an API key for a provider

Session and Context

CommandDescription
/compactCompact session context (summarize and trim history)
/thinkingToggle thinking/reasoning visibility
/sessionsList and switch between sessions
/agentsList child sub-agent sessions
/logsView session event log
/attachAttach to a session
/diffShow recent file changes
/costShow token usage and costs
/statsShow session statistics

Tools and Configuration

CommandDescription
/skillsList discovered skills
/memory [text]Show memory notes, or add a note
/mcpList MCP servers
/permissions [mode]Show or set permission mode
/permission-bypassToggle permission bypass
/configShow runtime configuration
/doctorRun configuration diagnostics
/settingsShow settings

Editor

CommandDescription
/editor [seed]Open an external editor to compose a message
/set-editor <cmd>Persist the editor command (e.g., vim, code --wait)

Images

CommandDescription
/imageManage staged image attachments

Other

CommandDescription
/undoUndo last file change
/redoRedo last undone change
/auto-answerAuto-answer agent questions with suggested answer

Keyboard Shortcuts

General Navigation

ShortcutAction
EnterSend message
EscCancel current agent turn / close modal
Ctrl+CCancel request
Ctrl+LClear screen
Ctrl+QExit
Mouse wheelScroll output
EndJump to bottom of transcript (on empty input)

Agent and Model

ShortcutAction
TabCycle agent profile (build → plan → review → fix → test)
F2Cycle through recent models (forward)
Shift+F2Cycle through recent models (backward)

Command Palette and Pickers

ShortcutAction
Ctrl+POpen command palette
Ctrl+VPaste image from clipboard (TUI only)
Ctrl+X MSwitch model (model picker)
Ctrl+X EOpen external editor
Ctrl+X LSwitch session
Ctrl+X NNew session
Ctrl+X CCompact context
Ctrl+X SView status
Ctrl+X AAgent profile picker
Ctrl+X HShow help
Ctrl+X QExit

Within Modals and Pickers

ShortcutAction
/ Navigate options
EnterSelect / confirm
EscClose modal
j / kNavigate (in info modals)

Agent Question Modals

When the agent asks a structured question:

ShortcutAction
/ Select an option
EnterConfirm selection (or accept suggested answer on empty input)
0Accept suggested answer
1nSelect option by number
cType a custom answer

Command Palette

Press Ctrl+P to open the command palette — a searchable list of all available commands. Type to filter, use / to navigate, and Enter to execute.

Status Bar

The TUI displays a status bar at the bottom showing:

  • Current agent profile
  • Active model
  • Available shortcuts hint
Tab  agent   Ctrl+V  image   Ctrl+P  commands   !cmd  shell   @path  search   /  inline   wheel  scroll

Image Attachments

In the TUI, paste images from your clipboard with Ctrl+V or use the /image command. Images are processed through MiniMax native vision and the text description is injected into the conversation.

Vi Mode

If your NCA_EDITOR_MODE environment variable is set to vi or vim, the REPL uses vi keybindings for line editing.

export NCA_EDITOR_MODE=vi

External Editor

For composing long messages, use /editor to open your configured external editor. The content is sent as your message when you save and close.

Editor resolution order:

  1. NCA_EDITOR environment variable
  2. [ui].editor in config
  3. EDITOR environment variable
  4. vim (fallback)