March 19, 2026

Cook CLI: Orchestrate Claude Code, Codex, and OpenAI Like a Pro

If you are using Claude Code, Codex, or OpenCode for coding tasks, you are probably running them one prompt at a time. That is like using a power tool without any attachments—functional, but missing half the potential.

Cook is a free, open-source CLI tool that wraps your AI coding agents with powerful workflow primitives. Run multiple agents in parallel, add review gates, iterate on results, and compose complex automation pipelines—all from a simple command line.

What Cook Actually Does

Cook parses three types of tokens: work (the prompt), loop operators (iteration), and composition (parallel execution). You combine them into commands that do surprisingly complex things:

# Basic: run a review loop cook "Implement dark mode" review # Run 3 passes sequentially cook "Implement dark mode" x3 # Race 3 versions, pick the best cook "Implement dark mode" v3 "least code" # Two approaches, compare and pick cook "Auth with JWT" vs "Auth with sessions" pick "best security" # Task list with automatic progression cook "Work on next task in plan.md" ralph 5 "DONE if all tasks complete"

The Primitives That Matter

1. Repeat (xN)

Run the same work N times sequentially. Each pass sees the previous output, so the agent can build on its own work. This is perfect for iterative improvements:

cook "Add dark mode" x3

2. Review Gate

After the work is done, a reviewer checks quality and a gate decides DONE or ITERATE. On ITERATE, it runs an "iterate" step, then repeats. You can customize prompts:

cook "Add dark mode" review \ "Review for accessibility" \ "DONE if WCAG AA, else ITERATE" \ "Fix the issues" 5

This is huge. It means your AI agent can self-correct until it meets your standards—no manual hand-holding required.

3. Versions (vN)

Run N identical cooks in parallel using isolated git worktrees, then pick the best result. This is essentially automated A/B testing for code:

cook "Build a REST API" v3 "cleanest code"

4. VS (Comparison)

Run two different approaches in parallel, then pick the winner or merge results:

cook "Build with React" vs "Build with Vue" merge "best DX"

Why This Matters for Indie Hackers

As an indie hacker, you probably do not have a team of developers reviewing your code. Cook gives you:

Getting Started

Installation is a two-step process:

# Install the CLI npm install -g @let-it-cook/cli # Add the skill to Claude Code mkdir -p .claude/skills && \ cp -r $(npm root -g)/@let-it-cook/cli/skill .claude/skills/cook

Then run cook init in your project to scaffold the config files:

The Bottom Line

Cook transforms your AI coding agent from a fancy autocomplete into a workflow engine. You can now build systems that:

The best part? It is free and open source. No API keys, no subscriptions, just a CLI tool that makes your existing AI agents dramatically more powerful.


Want More AI-Powered Building Tips?

I share weekly insights on building with AI, automation tools, and indie hacking strategies. Check out my other guides on the blog, or reach out if you want to collaborate.