# 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.

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.

## nexus policy show

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

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

```sh
nexus policy show team/web
```

## nexus policy set

```sh
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.

| Option | Meaning |
| --- | --- |
| `--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 |
| `--clear` | Remove the level's own rule |

```sh
nexus policy set org --deny "anthropic/claude-fable-*"
```

## nexus policy test

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

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

| Option | Meaning |
| --- | --- |
| `--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 code | Meaning |
| --- | --- |
| 0 | Allowed |
| 1 | Refused |

```sh
nexus policy test --agent claude --model claude-haiku-5-5
```

## nexus policy controls

```sh
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.

| Option | Meaning |
| --- | --- |
| `--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

```sh
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.

| Option | Meaning |
| --- | --- |
| `--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 |

```sh
nexus policy pause person/usr_123 --reason "runaway spend" --expires 12h
```

## nexus policy limit

```sh
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.

| Option | Meaning |
| --- | --- |
| `--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

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

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

| Option | Meaning |
| --- | --- |
| `--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

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

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

| Option | Meaning |
| --- | --- |
| `--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

```sh
nexus policy connectors
```

Which connectors your organization's members may use.

## nexus policy connector

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

Choose who may use a connector; owners and admins.

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

## nexus policy grants

```sh
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.

| Option | Meaning |
| --- | --- |
| `--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

```sh
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

```sh
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.
