feat(setup): add Codex CLI setup recipe (#1243)

* Add Codex setup recipe

* Sync beads issues (bd-1zo)

---------

Co-authored-by: Amp <amp@example.com>
This commit is contained in:
matt wilkie
2026-01-21 22:50:01 -07:00
committed by GitHub
parent be306b6c66
commit ce622f5688
11 changed files with 537 additions and 1646 deletions
+4
View File
@@ -766,18 +766,21 @@ bd sync # Force immediate sync, bypass debounce
```bash
# Setup editor integration (choose based on your editor)
bd setup factory # Factory.ai Droid - creates/updates AGENTS.md (universal standard)
bd setup codex # Codex CLI - creates/updates AGENTS.md
bd setup claude # Claude Code - installs SessionStart/PreCompact hooks
bd setup cursor # Cursor IDE - creates .cursor/rules/beads.mdc
bd setup aider # Aider - creates .aider.conf.yml
# Check if integration is installed
bd setup factory --check
bd setup codex --check
bd setup claude --check
bd setup cursor --check
bd setup aider --check
# Remove integration
bd setup factory --remove
bd setup codex --remove
bd setup claude --remove
bd setup cursor --remove
bd setup aider --remove
@@ -792,6 +795,7 @@ bd setup claude --stealth # Use stealth mode (flush only, no git operations)
**What each setup does:**
- **Factory.ai** (`bd setup factory`): Creates or updates AGENTS.md with beads workflow instructions (works with multiple AI tools using the AGENTS.md standard)
- **Codex CLI** (`bd setup codex`): Creates or updates AGENTS.md with beads workflow instructions for Codex
- **Claude Code** (`bd setup claude`): Adds hooks to Claude Code's settings.json that run `bd prime` on SessionStart and PreCompact events
- **Cursor** (`bd setup cursor`): Creates `.cursor/rules/beads.mdc` with workflow instructions
- **Aider** (`bd setup aider`): Creates `.aider.conf.yml` with bd workflow instructions
+2
View File
@@ -189,6 +189,7 @@ bd init --quiet
bd setup claude # Claude Code - installs SessionStart/PreCompact hooks
bd setup cursor # Cursor IDE - creates .cursor/rules/beads.mdc
bd setup aider # Aider - creates .aider.conf.yml
bd setup codex # Codex CLI - creates/updates AGENTS.md
```
**How it works:**
@@ -208,6 +209,7 @@ bd setup aider # Aider - creates .aider.conf.yml
bd setup claude --check # Check Claude Code integration
bd setup cursor --check # Check Cursor integration
bd setup aider --check # Check Aider integration
bd setup codex --check # Check Codex integration
```
### Claude Code Plugin (Optional)
+20
View File
@@ -18,6 +18,7 @@ The `bd setup` command uses a **recipe-based architecture** to configure beads i
| `claude` | `~/.claude/settings.json` | SessionStart/PreCompact hooks |
| `gemini` | `~/.gemini/settings.json` | SessionStart/PreCompress hooks |
| `factory` | `AGENTS.md` | Marked section |
| `codex` | `AGENTS.md` | Marked section |
| `aider` | `.aider.conf.yml` + `.aider/` | Multi-file config |
## Quick Start
@@ -33,6 +34,7 @@ bd setup kilocode # Kilo Code
bd setup claude # Claude Code
bd setup gemini # Gemini CLI
bd setup factory # Factory.ai Droid
bd setup codex # Codex CLI
bd setup aider # Aider
# Verify installation
@@ -139,6 +141,24 @@ If you already have an AGENTS.md file with other project instructions:
You can use multiple integrations simultaneously - they complement each other!
## Codex CLI
Codex reads `AGENTS.md` instructions at the start of each run/session. Adding the beads section is enough to get Codex and beads working together.
### Installation
```bash
bd setup codex
```
### What Gets Installed
Creates or updates `AGENTS.md` with the beads integration section (same markers as Factory.ai).
### Notes
- Restart Codex if it's already running to pick up the new instructions.
## Claude Code
Claude Code integration uses hooks to automatically inject beads workflow context at session start and before context compaction.