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

CLI reference

policy

Model access: allow and deny lists per organization, team and agent, and time-boxed operator controls; a deny always wins. Which connectors the organization's members may use.

View as Markdown

nexus policy show

nexus policy show [org|team/<slug>|agent/<claude|codex>]

A level's rule, what it inherits, and what it allows.

Examples
nexus policy show team/web

nexus policy set

nexus policy set <target> --allow a,b --deny c
nexus policy set <target> --default m
nexus policy set <target> --from rule.yaml | --clear

Replace a list (--allow all, --deny none clear it); owners and admins.

  • nexus policy set <target> --default m: The default for nexus/auto (an agent's default for agent/…).
  • nexus policy set <target> --from rule.yaml | --clear: A whole rule from a file, or remove the level's rule.
OptionMeaning
--allow <a,b>Allowed model patterns, comma-separated (all clears the list)
--deny <c>Denied model patterns, comma-separated (none clears the list)
--default <m>The default model
--from <rule.yaml>A whole rule from a YAML or JSON file
--clearRemove the level's own rule
Examples
nexus policy set org --deny "anthropic/claude-fable-*"

nexus policy test

nexus policy test [--model m] [--as who] [--team T] [--agent a]

Would it be allowed, and by which rule (exit 1 if refused).

OptionMeaning
--model <m>A model (provider/model, or auto)
--as <who>Test as this person (email or user id)
--team <T>Test as a member of this team
--agent <a>Test for a coding agent (claude or codex)
Exit codeMeaning
0Allowed
1Refused
Examples
nexus policy test --agent claude --model claude-haiku-5-5

nexus policy controls

nexus policy controls [--team <slug>]

The operator controls in force that apply to you (all of them for owners and admins), or a team's with --team.

OptionMeaning
--team <slug>Act through this team: a lead may pause or limit it, or a person or key in it or in a team under it

nexus policy pause

nexus policy pause <org|team/<slug>|person/<id>|key/<id>> --reason r --expires 12h [--team <slug>]

Stop model traffic for a target until it expires; owners and admins, or a team lead with --team.

OptionMeaning
--reason <r>Why the control is needed; the audit log and the people it applies to can read it
--expires <12h>How long the control stays in force: 30d, 12h or a number of days
--team <slug>Act through this team: a lead may pause or limit it, or a person or key in it or in a team under it
Examples
nexus policy pause person/usr_123 --reason "runaway spend" --expires 12h

nexus policy limit

nexus policy limit <target> --models a,b --reason r --expires 12h [--team <slug>]

Narrow a target to these models until it expires; owners and admins, or a team lead with --team.

OptionMeaning
--models <a,b>The models a limit narrows to, or an override allows, comma-separated
--reason <r>Why the control is needed; the audit log and the people it applies to can read it
--expires <12h>How long the control stays in force: 30d, 12h or a number of days
--team <slug>Act through this team: a lead may pause or limit it, or a person or key in it or in a team under it

nexus policy override

nexus policy override <target> --models a,b --reason r --expires 12h

Allow these models past a deny until it expires; owners and admins.

OptionMeaning
--models <a,b>The models a limit narrows to, or an override allows, comma-separated
--reason <r>Why the control is needed; the audit log and the people it applies to can read it
--expires <12h>How long the control stays in force: 30d, 12h or a number of days

nexus policy clear

nexus policy clear <control-id> [--team <slug>]

Take a control out of force; owners and admins, or a team lead with --team.

OptionMeaning
--team <slug>Act through this team: a lead may pause or limit it, or a person or key in it or in a team under it

nexus policy connectors

nexus policy connectors

Which connectors your organization's members may use.

nexus policy connector

nexus policy connector <name> <disabled|available|enabled_for_all> [--teams a,b]

Choose who may use a connector; owners and admins.

OptionMeaning
--teams <a,b>Only these teams' members and the teams under them, comma-separated slugs (default: everyone)

nexus policy grants

nexus policy grants [list]
nexus policy grants set <product/capability> --connector c --actions a,b
nexus policy grants set robustness/review --for-mode <shadow|comment|comment_and_check>

The connector writes each module may make (write grants), and what may be granted.

  • nexus policy grants set <product/capability> --connector c --actions a,b: Set a module's granted writes of one connector, in full (an empty --actions revokes them); owners and admins.
  • nexus policy grants set robustness/review --for-mode <shadow|comment|comment_and_check>: Grant Nexus Review exactly what the mode needs, and revoke the rest; owners and admins.
OptionMeaning
--connector <c>The connector the grants are for (github; the default with --for-mode)
--actions <a,b>The writes the module holds, in full, comma-separated (empty revokes them all)
--for-mode <shadow|comment|comment_and_check>Grant Nexus Review exactly what this mode needs: shadow none, comment pull_review, comment_and_check pull_review,check_run

nexus policy review-events

nexus policy review-events [show]
nexus policy review-events set <comment|request_changes|full>

Which review events a module may post on pull requests: comment, request_changes or full (the default).

  • nexus policy review-events set <comment|request_changes|full>: Choose whether modules may request changes and approve; owners and admins.

nexus policy agent-writes

nexus policy agent-writes [show]
nexus policy agent-writes <on|off>

Whether your agents make your organization's allowed connector writes without a confirmation in Nexus.

  • nexus policy agent-writes <on|off>: Turn your agents' writes on or off; only you, from your own sign-in, never an agent link.

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.