Skip to content
NewNexus 2.0 is here, and it’s open source. Read the launch post

CLI reference

sessions

Code sessions in Nexus for desktop, on this computer: list, read, start, name, message and stop them from a script or another agent. Turn on Outside access in the app first; each client asks you once.

View as Markdown

nexus sessions list

nexus sessions list [--project P] [--archived] [--limit N] [--json]

Code sessions in Nexus for desktop, newest first: id, status, name, title and project.

OptionMeaning
--project <P>The project: its folder (. is the current one), its id, or GitHub owner/repo
--archivedArchived sessions too
--limit <N>At most this many sessions (1 to 200, default 50)
--jsonPrint only JSON on stdout
Examples
nexus sessions list

nexus sessions show

nexus sessions show <id|name|title> [--turns N] [--json]

A session's status and its latest turns: each prompt, the agent's last answer and how the turn ended. Name a session by its id (a word starting with t_), or by its name or exact title among the newest 200; a name past those goes to the app's own lookup.

OptionMeaning
--turns <N>How many of the latest turns (1 to 20, default 3)
--jsonPrint only JSON on stdout
Examples
nexus sessions show <id>

nexus sessions start

nexus sessions start "<prompt>" [--project P] [--agent A] [--model M] [--mode M] [--worktree] [--folder] [--name N] [--json]

Start a session with its project's defaults (the current folder's project when --project is left out; - reads the prompt from stdin).

OptionMeaning
--project <P>The project: its folder (. is the current one), its id, or GitHub owner/repo
--agent <A>Claude or codex or nexus or antigravity or cursor; default: the project's
--model <M>The model; default: the project's
--mode <M>The permission mode: plan, default, acceptEdits, auto or bypassPermissions; never above the project's default
--worktreeWork in a new worktree; default: the project's choice
--folderWork in the project's folder; default: the project's choice
--name <N>The session's unique name, which Claude Code's ListAgents and SendMessage reach it by
--jsonPrint only JSON on stdout
Examples
nexus sessions start --project . "Find why the tests are slow"

nexus sessions send

nexus sessions send <id|name|title> "<message>"

Message a session; a busy one gets it after its current turn (- reads stdin). Name a session by its id (a word starting with t_), or by its name or exact title among the newest 200; a name past those goes to the app's own lookup.

Examples
nexus sessions send <id> "Now fix it"

nexus sessions stop

nexus sessions stop <id|name|title>

Stop a session's current turn. Name a session by its id (a word starting with t_), or by its name or exact title among the newest 200; a name past those goes to the app's own lookup.

nexus sessions name

nexus sessions name <id|name|title> [<new-name>] [--clear] [--json]

Give a session a unique name, which Claude Code's ListAgents and SendMessage reach it by; --clear removes it. A name is 1 to 40 letters, digits, dots, dashes or underscores, and never starts with t_.

OptionMeaning
--clearRemove the session's name
--jsonPrint only JSON on stdout

nexus sessions connect

nexus sessions connect [--read-only]

Ask Nexus for desktop for access now (the other commands ask by themselves); you approve it in the app.

OptionMeaning
--read-onlyAsk only to read sessions

nexus sessions disconnect

nexus sessions disconnect

Forget this CLI's access on this computer (revoke it in the app: Settings, MCP servers, Outside access).

nexus sessions mcp

nexus sessions mcp [--name N]

The same tools as an MCP server on stdin and stdout, for another agent: claude mcp add nexus-sessions -- nexus sessions mcp.

OptionMeaning
--name <N>The name the app shows for this client (default: nexus CLI)
Examples
nexus sessions mcp --name "Claude Code"

Generated from the CLI's own command list (nexus help --json), version 0.45.0. nexus help and nexus <command> --help always show your installed version.