feat: add Codex CLI compatibility layer

- flake.nix: devShell with yq-go for config generation
- generate-codex.sh: generates Codex agent TOML, AGENTS.md, and
  config.toml from Claude source files (idempotent, yq-powered)
- install.sh: optional Codex symlinks when ~/.codex exists (skills
  shared via ~/.agents/skills/, agents/config/AGENTS.md to ~/.codex/)
- .gitignore: exclude generated codex/ directory
- README.md: document Codex compatibility setup and model mapping
This commit is contained in:
Bryan Ramos 2026-04-02 08:28:29 -04:00
parent 8d08f9650c
commit d812c7f49a
6 changed files with 287 additions and 0 deletions

View file

@ -59,6 +59,35 @@ For simple tasks, agents can be invoked directly:
/agent worker Fix the broken pagination in the user list endpoint
```
## Codex CLI compatibility
This project also generates configuration for [OpenAI Codex CLI](https://github.com/openai/codex). Claude Code config is the source of truth; Codex config is derived from it.
### Setup
```bash
nix develop # enter devShell with yq
./generate-codex.sh # generate Codex config from Claude source files
./install.sh # installs both Claude and Codex (if ~/.codex exists)
```
### What gets generated
| Source | Generated | Codex location |
|---|---|---|
| `agents/*.md` | `codex/agents/*.toml` | `~/.codex/agents/` |
| `CLAUDE.md` + `rules/*.md` | `codex/AGENTS.md` | `~/.codex/AGENTS.md` |
| `settings.json` | `codex/config.toml` | `~/.codex/config.toml` |
| `skills/` | (shared as-is) | `~/.agents/skills/` |
### Model mapping
| Claude Code | Codex CLI |
|---|---|
| `opus` | `o3` |
| `sonnet` | `o4-mini` |
| `haiku` | `o4-mini` |
## Project-specific config
Each project repo can extend the team with local config in `.claude/`: