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

CLI reference

claude, codex, agy and agents

Run Claude Code and Codex with every model call through Nexus Gateway: metered, checked against your policies and attributed to you. nexus agy runs Antigravity on your own Google AI plan. nexus agents shows each agent's setup on this machine.

View as Markdown

nexus claude

nexus claude [--json] [--subscription | --api | --via <route>] [--team <slug>] [--recording [<id>|latest]] [--no-skills] [--] [claude args…]

Claude Code on the route you chose (nexus agents): through Nexus Gateway, metered, checked against your policies and attributed to you, or on your own Claude plan.

OptionMeaning
--jsonA JSON summary on stdout when the agent exits
--subscriptionUse your Claude subscription (claude auth login), not Gateway: model calls are not metered or checked (also NEXUS_CLAUDE_AUTH=subscription)
--apiThrough Gateway for this run, whatever route you saved (also NEXUS_CLAUDE_AUTH=gateway)
--via <route>The route for this run: gateway or subscription; default: your saved route (nexus agents)
--team <slug>The team this session's spend goes to (also NEXUS_TEAM)
--recording <id>Start on a screen recording from Nexus for Mac (⌥⇧S): its id, or latest (the default); Claude Code is told how to read it
--model <auto>Claude Code's own flag, read by Nexus: auto runs on the model Gateway chooses
Exit codeMeaning
0The agent's own exit code is passed through
Examples
nexus claude -p "hello"
nexus claude --team web
nexus claude --subscription
nexus claude --recording latest

nexus codex

nexus codex [--json] [--subscription | --api | --via <route>] [--team <slug>] [--recording [<id>|latest]] [--no-skills] [--] [codex args…]

Codex on the route you chose (nexus agents): through Nexus Gateway, metered, checked against your policies and attributed to you, or on your own ChatGPT plan.

OptionMeaning
--jsonA JSON summary on stdout when the agent exits
--subscriptionUse your ChatGPT plan (codex login), not Gateway: model calls are not metered or checked (also NEXUS_CODEX_AUTH=subscription)
--apiThrough Gateway for this run, whatever route you saved (also NEXUS_CODEX_AUTH=gateway)
--via <route>The route for this run: gateway or subscription; default: your saved route (nexus agents)
--team <slug>The team this session's spend goes to (also NEXUS_TEAM)
--recording <id>Start on a screen recording from Nexus for Mac (⌥⇧S): its id, or latest (the default); Codex gets its contact sheet
--model <auto>Codex's own flag, read by Nexus: auto runs on the model Gateway chooses
Exit codeMeaning
0The agent's own exit code is passed through
Examples
nexus codex exec "hello"
nexus codex --team web
nexus codex --subscription
nexus codex --recording latest

nexus agy

nexus agy [--json] [--subscription] [--team <slug>] [--] [agy args…]

Antigravity on your own Google AI plan: its calls go straight to Google, and Nexus records the session.

OptionMeaning
--jsonA JSON summary on stdout when the agent exits
--subscriptionRun on your Google AI plan, the default (also NEXUS_ANTIGRAVITY_AUTH=subscription)
--team <slug>The team this session is attributed to (also NEXUS_TEAM)
--model <id>Agy's own flag: the model it runs, by its id (auto is not available)
Exit codeMeaning
0The agent's own exit code is passed through
2--api, --via gateway, --model auto or --recording: not available, and the agent does not start
Examples
nexus agy -p "hello"
nexus agy --team web
nexus agy -- --conversation <id>

nexus agents list

nexus agents list

Each local launcher (also plain nexus agents): install, sign-in, route, payer, and setup steps.

nexus agents use

nexus agents use <claude|codex|agy|cursor-agent> <gateway|subscription|default>

The route an agent takes when you name none, in every Nexus app you sign in to.

Examples
nexus agents use claude subscription
nexus agents use codex default

nexus agents setup

nexus agents setup <claude|codex>

How to run an agent through Gateway, from its recipe: the limits first, then each step. Writes nothing.

Examples
nexus agents setup claude

nexus agents share

nexus agents share <session|latest> [--org | --team T | --people a@x,b@y] [--include-thinking]
nexus agents share <session|latest> --to a@x,b@y | --public [--expires 30d]
nexus agents share <session|latest> --private

Share a Claude Code session (nexus claude) as an artifact, from its transcript on this machine: latest is this folder's newest. Again: a new version, and the earlier ones revoked.

  • nexus agents share <session|latest> --to a@x,b@y | --public [--expires 30d]: Share it outside your organization, as its settings allow.
  • nexus agents share <session|latest> --private: Stop sharing a session: revoke every version, so only you can read it.
OptionMeaning
--orgShare with everyone in your organization
--team <T>Share with these teams (slugs, comma-separated) and the teams under them
--people <a@x,b@y>Share with these people in your organization (emails, comma-separated)
--include-thinkingKeep the agent's thinking in the shared session (left out by default)
--to <a@x,b@y>Share outside your organization with these people (emails, comma-separated); they sign in with that email to open it
--publicShare with anyone who has the link (unguessable, not indexed by search engines)
--expires <30d>When a public link stops working: 30d, 12h or a number of days
--privateStop sharing: revoke every version, so only you can read it
Examples
nexus agents share latest --org

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.