← ClaudeAtlas

headless-clilisted

Call another local AI CLI headlessly from a Bash call — codex, opencode, agy, or kimi — to delegate a subtask, get a second opinion from a different model, fan out work in parallel, or run a one-shot prompt and capture the result. Use when the user asks to use/ask codex, opencode, agy, kimi, gemini, gpt, deepseek, or k3; wants another model's take or a cross-model check; when delegating coding/analysis to a non-Claude model is useful; or when the user wants an image generated (logo, banner, cover, illustration) — codex can do that headlessly. Contains the exact verified flags plus the gotchas (stdin/sandbox/parallelism) that otherwise cause hung or empty calls.
oldantique/headless-cli-playbook · ★ 0 · AI & Automation · score 75
Install: claude install-skill oldantique/headless-cli-playbook
# Headless CLIs: codex, opencode, agy, kimi Call the four local coding CLIs non-interactively from a Bash call (the `claude -p` equivalent). Follow the rules below — they stop a call from hanging or returning empty. Setup, config, and the *why* behind each rule live in the repo README (pointer at the bottom). > Models below are examples — substitute **your configured default** for each CLI. There is no fixed > task→model mapping. Use whichever CLI/model you've set up; the rules and recipes are model-agnostic. ## Pick one | | `codex exec` | `opencode run` | `agy -p` | `kimi -p` | | --- | --- | --- | --- | --- | | Model | your ChatGPT-plan model @ your default effort | your default provider/model · `-m provider/model` to switch | your default Gemini model | your default Kimi model (effort is config-only) | | Auth | ChatGPT sub — no env key | provider API key in env (auto-injected) | Google OAuth — no env key | Kimi sub OAuth — no env key | | Concurrency | parallel OK | parallel: **isolate data dir** | parallel OK | parallel OK | | Files | read + edit (sandbox) | read/grep/edit — **absolute paths only** | read/edit, native | read/edit, native — **no permission flag needed** | | Structured out | `--output-schema` | `--format json` | none — ask in prompt | `--output-format stream-json` | | Use | **go-to peer for any problem**, esp. multi-turn (`resume`) | good supplement; parallel fan-out | good supplement; easiest file read/write | good supplement; clean NDJSON + machine-read