Summary
Support additional AI CLI backends beyond Claude Code CLI for the organize step, starting with OpenAI's Codex CLI (codex). Users should be able to choose their preferred AI tool via --backend.
Context
Currently the organize command supports two backends:
--backend claude — Invokes Claude Code CLI (claude) in non-interactive mode
--backend prompt-only — Saves the prompt to _organize_prompt.md without running any AI
OpenAI has released Codex CLI (codex), a command-line AI tool with file-read capabilities similar to Claude Code. Other AI CLI tools (Google Gemini CLI, etc.) are also emerging. Supporting multiple backends would:
- Allow users who don't have Claude Code CLI installed (or prefer OpenAI) to still use the organize step
- Reduce hard dependency on a single vendor's CLI
- Make it easier to add future AI CLI tools as they mature
The current backend logic lives in organizer.py (find_claude_cli, invoke_claude_cli) and cli.py (--backend option on organize and run commands).
Proposed Changes
- Add
--backend codex option to organize and run commands alongside claude and prompt-only
- Add
find_codex_cli() in organizer.py to locate the codex / codex.exe binary
- Add
invoke_codex_cli() in organizer.py mapping prompt and file-read permissions to Codex CLI flags
- Extract a shared
invoke_ai_cli() abstraction (or a simple dispatch table) to reduce duplication between invoke_claude_cli and invoke_codex_cli
- Add
--backend auto as a future-friendly option that tries Claude first, then Codex, then falls back to prompt-only
- Update README: add Codex CLI installation instructions alongside Claude Code CLI
Backend Comparison
Tasks
Summary
Support additional AI CLI backends beyond Claude Code CLI for the organize step, starting with OpenAI's Codex CLI (
codex). Users should be able to choose their preferred AI tool via--backend.Context
Currently the
organizecommand supports two backends:--backend claude— Invokes Claude Code CLI (claude) in non-interactive mode--backend prompt-only— Saves the prompt to_organize_prompt.mdwithout running any AIOpenAI has released Codex CLI (
codex), a command-line AI tool with file-read capabilities similar to Claude Code. Other AI CLI tools (Google Gemini CLI, etc.) are also emerging. Supporting multiple backends would:The current backend logic lives in
organizer.py(find_claude_cli,invoke_claude_cli) andcli.py(--backendoption onorganizeandruncommands).Proposed Changes
--backend codexoption toorganizeandruncommands alongsideclaudeandprompt-onlyfind_codex_cli()inorganizer.pyto locate thecodex/codex.exebinaryinvoke_codex_cli()inorganizer.pymapping prompt and file-read permissions to Codex CLI flagsinvoke_ai_cli()abstraction (or a simple dispatch table) to reduce duplication betweeninvoke_claude_cliandinvoke_codex_cli--backend autoas a future-friendly option that tries Claude first, then Codex, then falls back toprompt-onlyBackend Comparison
-p "<prompt>"--allowedTools "Read,Grep"--output-format textTasks
--allowedTools Read)find_codex_cli()toorganizer.pyinvoke_codex_cli()toorganizer.py--backendchoice incli.pyto includecodex(and optionallyauto)organizecommand to route to the correctinvoke_*function--backend codexusage example--backend codexend-to-end with a real extraction output