Skip to main content

One-command setup

From the repo root:
npx enagrams init
The CLI writes everything Codex needs:
  • .codex/config.toml — MCP server configuration for the Codex CLI
  • .codex/hooks.json — hook wiring pointing at the shared hook script
Codex picks the config up on its next launch.

Verify

Start Codex in the project directory. At session start you should see a team briefing injected (active agents, decisions, conventions).
enagrams status
An active session tagged agent_type: codex confirms the wiring.

Config Files

.codex/config.toml:
[mcp_servers.enagrams]
command = "npx"
args = ["-y", "enagrams", "--mcp"]

[mcp_servers.enagrams.env]
ENAGRAMS_API_KEY = "..."
ENAGRAMS_WORKSPACE = "..."
.codex/hooks.json wires Codex’s hook names to the shared script — npx enagrams init generates this for you.

Differences from Cursor and Claude Code

  • Codex doesn’t have per-tool matcher semantics; the hook script inspects the tool name itself to decide whether to acquire a file reservation.
  • SessionStart context injection happens through stdout — the hook script writes the briefing which Codex prepends to the conversation.

Troubleshooting

Codex says it can’t find the MCP server — make sure npx is on Codex’s PATH. The global npm -g install path is the usual fix. Briefing isn’t appearing — verify the hook script is executable (chmod +x .cursor/hooks/enagrams-hooks.mjs) and that .codex/hooks.json references it correctly.