# Codex

## Install

Install the CLI first (see [Agent overview](/agent/overview#requirements)), then add the plugin marketplace and the plugin:

```sh
codex plugin marketplace add Brennoaltair/shadcn-maestro
codex plugin add shadcn-maestro@shadcn-maestro
```

The marketplace is the GitHub repository `Brennoaltair/shadcn-maestro`; adding it requires access to that repository.

## Sandbox rules

The independent reviewer runs in a Codex sandbox without network. Before the first review, add these lines to `~/.codex/rules/shadcn-maestro.rules` so its commands can run outside it:

```
prefix_rule(pattern=["shadcn-maestro", "reviewer", "review", "--input"], decision="allow")
prefix_rule(pattern=["<agent-browser path>", "open"], decision="allow")
prefix_rule(pattern=["<agent-browser path>", "snapshot"], decision="allow")
prefix_rule(pattern=["<agent-browser path>", "screenshot"], decision="allow")
prefix_rule(pattern=["<agent-browser path>", "close"], decision="allow")
```

Replace `<agent-browser path>` with the absolute path of `command -v agent-browser`, so no other `agent-browser` matches. When lines are missing, `shadcn-maestro review` prints them with the paths filled in and exits 3.

:::warning
Any Codex session can call that absolute binary with those subcommands outside the sandbox, so `open` can reach any URL and `screenshot` can write any path. Remove the rules when not reviewing.
:::

## Run

Open a session in your app's directory and run `$design-apply` (it also appears in the `/skills` menu) with the change you want. Then follow [the flow](/agent/flow).

## How the plugin runs

Codex does not put plugin directories on PATH, so the skill calls the plugin binaries by absolute path, `<plugin root>/bin/<name>`. They run the global `shadcn-maestro` package and stop with exit 127 and the install command when it is missing or is another version than the plugin's. `shadcn-maestro review` opens the reviewer with `codex exec`, optionally with `--url <app-url>` for browser evidence.
