Codex
Add brin to Codex CLI with Rules that block direct installs and a wrapper that checks brin before every package install.
Codex's Rules system can block commands before they run. that makes it a better fit for brin than AGENTS.md: Rules are enforced, instruction files are advisory.
##setup
1. Create .codex/rules/brin.rules:
2. Create scripts/brin-install:
3. Make it executable:
4. Use the wrapper instead of calling the package manager directly:
##how it works
the Rules file is the hard gate: it stops direct install commands from reaching the shell. the wrapper is the approved path: it checks brin using response headers, only continues when the verdict is safe, and exits before the install runs otherwise.
by default the script fails open if brin is unreachable so your workflow keeps moving. set BRIN_FAIL_CLOSED=1 if you want installs blocked whenever brin can't be reached.
##optional soft guidance
if you still want Codex to explain the policy in natural language, add a short note to AGENTS.md or ~/.codex/AGENTS.md. treat that as documentation only — the real enforcement lives in Rules and wrappers.
On this page