---
title: "Command reference"
---

# Command reference

Every neuralinverse command and subcommand, every global option, and the exit codes of each command family.

```text
neuralinverse [options] [prompt]       Start an interactive session, optionally with a first prompt
neuralinverse -p "prompt" [options]    Run once non-interactively and print the result
neuralinverse <command> [args]
```

`ni` is the same program. `neuralinverse --help` prints the built-in help.

## Commands

| Command | What it does | Page |
|---|---|---|
| `doctor` | Check installation, configuration and connectivity | [Install and update](https://neuralinverse.com/docs/cli/install/#check-the-installation) |
| `setup [provider]` | Connect a model provider (key checked live, stored in your keychain) and pick defaults | [Providers and models](https://neuralinverse.com/docs/cli/models/) |
| `models [provider]` | List models available from configured providers | [Providers and models](https://neuralinverse.com/docs/cli/models/) |
| `config [show\|path\|validate]` | Inspect the effective configuration | [Settings reference](https://neuralinverse.com/docs/cli/configuration/) |
| `settings export <file>`, `settings import <file> [--replace]`, `settings sync [--repo <git-url>]` | Move settings, key bindings, commands, agents, skills and styles between machines | [Settings reference](https://neuralinverse.com/docs/cli/configuration/#move-settings-between-machines) |
| `sessions` | List saved sessions for this folder | [Sessions and context](https://neuralinverse.com/docs/cli/sessions/) |
| `sessions export <id> --html [--out file]` | Write a session as a self-contained HTML page | [Sessions and context](https://neuralinverse.com/docs/cli/sessions/#export-and-share) |
| `login [--base-url URL] [--device \| --browser] [--no-browser]` | Sign in to Govern | [Sign in to Govern](https://neuralinverse.com/docs/cli/sign-in/) |
| `logout` | Sign out (revokes the session, deletes local tokens) | [Sign in to Govern](https://neuralinverse.com/docs/cli/sign-in/#sign-out) |
| `whoami [--json]` | The signed-in account, device and policy state | [Sign in to Govern](https://neuralinverse.com/docs/cli/sign-in/#check-who-you-are) |
| `account [show] [--json]` | Your account as the Editor and the Agents app show it | [Sign in to Govern](https://neuralinverse.com/docs/cli/sign-in/#check-who-you-are) |
| `policy [show\|refresh]` | Show or refresh your organisation's signed policy | [Sign in to Govern](https://neuralinverse.com/docs/cli/sign-in/#the-organisation-policy) |
| `context <status\|retrieve\|attributions\|memory\|work\|overlap\|agent-files\|watch>` | Govern's Context Platform for this folder | [Organisation context](https://neuralinverse.com/docs/cli/organisation-context/) |
| `gov <gate\|release\|approvals\|policy\|hooks\|trace\|hook\|trailer>` | Organisation governance: gates, approvals, policy, git hooks | [Permissions and modes](https://neuralinverse.com/docs/cli/permissions/#the-governance-command) |
| `checks run [paths] [--staged \| --all] [--format text\|json\|sarif] [--gate agent\|commit] [--out file]` | Check changes against your organisation's rules | [Checks](https://neuralinverse.com/docs/cli/checks/#command-line) |
| `checks status` | Engine and packs, policy, waivers, last run | [Checks](https://neuralinverse.com/docs/cli/checks/) |
| `checks hook install [--force]`, `checks hook uninstall` | The pre-commit gate | [Checks](https://neuralinverse.com/docs/cli/checks/#the-commit-gate) |
| `activity [status\|log [n]\|flush\|purge]` | What activity capture records and sends | [Activity record](https://neuralinverse.com/docs/cli/activity/#inspect-what-is-recorded) |
| `mcp list`, `mcp add <name> [--user] [KEY=VALUE...] -- <command> [args...]`, `mcp add <name> --url <url> [--sse]`, `mcp remove <name> [--user]`, `mcp login <name>`, `mcp logout <name>` | Manage MCP servers | [MCP servers](https://neuralinverse.com/docs/cli/mcp/) |
| `plugin [list\|install\|uninstall\|update\|enable\|disable\|info\|validate]` | Manage plugins | [Plugins](https://neuralinverse.com/docs/cli/plugins/) |
| `env`, `env set <none\|embedded\|hdl>` | Show or set the project's developer environment | [Firmware and hardware environments](https://neuralinverse.com/docs/cli/environments/) |
| `team "<goal>" [--allow-dirty] [--apply] [--max-tasks n] [--concurrency n]` | Split a large task across parallel agents in git worktrees | [Goals, team runs and schedules](https://neuralinverse.com/docs/cli/autonomy/#team-runs-parallel-agents-on-separate-branches) |
| `schedule [add\|list\|remove\|run\|tick\|daemon\|install]` | Run goals on a cron schedule | [Goals, team runs and schedules](https://neuralinverse.com/docs/cli/autonomy/#schedules) |
| `serve [--port n] [--host h] [--root dir] ...` | Run the HTTP and SSE API | [SDK, server and embedding](https://neuralinverse.com/docs/cli/sdk/#the-local-server) |
| `web [serve options] [--no-open]` | Run the API with the browser interface and open it, signed in | [Web interface](https://neuralinverse.com/docs/cli/web/) |
| `acp` | Run as an Agent Client Protocol agent on standard input and output | [Editors](https://neuralinverse.com/docs/cli/editors/) |
| `host [--stdio \| --socket <path> --token-file <file>]` | Serve an embedding host | [SDK, server and embedding](https://neuralinverse.com/docs/cli/sdk/#embedding-in-a-governing-host) |
| `eval [run\|report\|list\|validate]` | Measure the agent on the eval tasks | [Evals](https://neuralinverse.com/docs/cli/evals/) |

`neuralinverse context help`, `checks help`, `serve help` and `eval help` print the options of those commands; `neuralinverse gov` without arguments prints its help.

## Global options

| Option | Meaning |
|---|---|
| `-p, --print` | Non-interactive mode; prompt from the arguments and/or standard input |
| `--output-format <f>` | `text`, `json` or `stream-json` (with `--print`; default `text`) |
| `-m, --model <ref>` | Model as `provider/model` |
| `--mode <mode>` | `ask`, `auto-edit`, `read-only`, `full-auto` |
| `--allow <rule>` | Allow rule for this run (repeatable) |
| `--deny <rule>` | Deny rule for this run (repeatable) |
| `-c, --continue` | Continue the most recent session in this folder |
| `-r, --resume [id]` | Resume a session by id or a short prefix of it; a picker if omitted |
| `--max-turns <n>` | Maximum model turns per prompt |
| `--max-cost <usd>` | Stop once this session's estimated cost reaches the amount (exit code 3 with `--print`) |
| `--max-time <minutes>` | Stop once this session has run this long (exit code 3 with `--print`) |
| `--reasoning <level>` | `off`, `low`, `medium`, `high` |
| `-C, --cwd <dir>` | Run as if started in that folder |
| `--add-dir <dir>` | Let tools use an extra folder (repeatable) |
| `--config <file>` | Load an extra settings file (repeatable) |
| `--mcp-config <file>` | Load MCP servers from a JSON file `{"mcpServers": {...}}` (repeatable) |
| `--no-mcp` | Do not start MCP servers |
| `--fullscreen` | Use the full-screen interface |
| `--inline` | Use the inline interface (the default) |
| `--append-system-prompt <text>` | Extra instructions appended to the system prompt |
| `--intent <ref>` | The work item or change request this session serves (`PROJ-123`, `#12`, `AB#7`, an https link), for policies that require one |
| `--no-session-persistence` | Do not save this session |
| `--goal <objective>` | Work unattended toward an objective (default mode `auto-edit`) |
| `--goal-resume <id>` | Continue a goal run |
| `--checkpoint-every <k>` | With `--goal`: commit a snapshot to `ni/goal/<id>` every k iterations (0 = off) |
| `--verbose` | Progress on standard error in `--print` mode |
| `--debug` | Diagnostic details on errors |
| `-v, --version` | Print the version |
| `-h, --help` | Show help |

Options take their value as the next argument or after `=` (`--model=openai/gpt-5`). `--` ends the options.

The built-in help lists `login [--issuer URL]`; that flag is retired and refused. Use `--base-url`.

## Exit codes

| Command family | Codes |
|---|---|
| Sessions and `-p` | `0` success; `1` error, turn limit or refusal; `2` invalid usage; `3` cost or time limit reached (with `--print`); `130` interrupted |
| `account show` | `0` signed in; `1` signed out or the session has ended; `2` usage error |
| `context` | `0` done; `1` Govern unreachable or error; `2` usage error; `3` overlaps with `--strict-exit`; `4` needs a person; `5` not signed in; `6` refused by your organisation. See [Organisation context](https://neuralinverse.com/docs/cli/organisation-context/#exit-codes) |
| `checks run` | `0` passes; `1` blocked; `2` blocked only because an analyser failed under `checks.failClosed` |
| `gov` | `0` pass; `1` refused or failed; `2` error or tampering found |
