CLI to make Ralph easy
https://github.com/gertig/chief.git
CLI tool that codifies the Ralph methodology for autonomous AI coding with Claude Code or OpenAI Codex.
npm install -g chief-cli
Or use with npx:
npx chief-cli init
# Initialize a new project
chief init
# Create specifications
chief spec
# Generate implementation plan
chief plan
# Implement from the plan
chief build
chief initInitialize a new Ralph project. Creates all necessary configuration and prompt files.
chief init
chief init --force # Overwrite existing files
chief init --agent codex # Initialize for OpenAI Codex
Options:
-f, --force - Overwrite existing files without prompting-a, --agent <agent> - AI agent to use (claude, codex)ralph.config.json - Project configurationralph_files/PROMPT_plan.md - Planning mode promptralph_files/PROMPT_build.md - Building mode promptAGENTS.md - Operational guideralph_files/specs/JTBD.md - Example specificationralph_files/RALPH_README.md - Project documentationchief specInteractive wizard to create specification files.
chief spec
Guides you through:
chief planRun planning mode - analyzes specs and creates/updates the implementation plan.
chief plan
chief plan 3 # Run 3 iterations
chief plan --model-tier fast # Use fast tier
chief plan --unlimited # Run unlimited iterations
chief plan --agent codex # Use Codex instead of Claude
Options:
[iterations] - Number of iterations to run (positional argument)-a, --agent <agent> - AI agent to use (claude, codex)-t, --model-tier <tier> - Model tier to use (fast, standard, reasoning)-u, --unlimited - Run unlimited iterationschief buildRun building mode - implements tasks from the plan.
chief build
chief build 10 # Run 10 iterations
chief build --model-tier reasoning
chief build --skip-plan-check # Skip checking for implementation plan
chief build --unlimited # Run unlimited iterations
Options:
[iterations] - Number of iterations to run (positional argument)-a, --agent <agent> - AI agent to use (claude, codex)-t, --model-tier <tier> - Model tier to use (fast, standard, reasoning)-u, --unlimited - Run unlimited iterations--skip-plan-check - Skip checking for implementation planChief uses agent-agnostic model tiers that map to the best model for each capability level:
| Tier | Claude | Codex |
|---|---|---|
| fast | haiku | codex-mini |
| standard | sonnet | gpt-4o |
| reasoning | opus | o3 |
Edit ralph.config.json to customize:
{
"agent": "claude",
"modelTier": "standard",
"specMode": { "modelTier": "reasoning" },
"planMode": { "modelTier": "reasoning", "maxIterations": 5 },
"buildMode": { "modelTier": "standard", "maxIterations": 0 },
"agentFlags": {
"dangerouslySkipPermissions": true,
"outputFormat": "stream-json",
"verbose": true
},
"paths": {
"specs": "ralph_files/specs",
"src": "src",
"prompts": "ralph_files",
"plan": "ralph_files/IMPLEMENTATION_PLAN.md",
"agents": "AGENTS.md"
},
"git": {
"autoPush": true,
"remoteName": "origin"
},
"variables": {}
}
Configuration options:
agent - AI agent to use: "claude" or "codex"modelTier - Default model tier: "fast", "standard", or "reasoning"specMode.modelTier - Override tier for spec generationplanMode.modelTier - Override tier for planning modeplanMode.maxIterations - Max planning iterations (default: 5)buildMode.modelTier - Override tier for build modebuildMode.maxIterations - Max build iterations (0 = unlimited)agentFlags - Flags passed to the AI agent CLIpaths - Customize file and directory locationsgit.autoPush - Automatically push commits to remotegit.remoteName - Remote name for auto-pushvariables - Custom variables for template renderingRalph is an autonomous AI coding workflow:
ralph_files/specs/Specifications should include:
To work on Chief CLI locally and test your changes:
# In the chief-cli directory, create a global symlink
npm link
# Now 'chief' command uses your local version
chief --version
# To unlink when done
npm unlink -g chief-cli
If you're developing another project that depends on chief-cli:
# In the chief-cli directory
npm link
# In your other project directory
npm link chief-cli
# To unlink
npm unlink chief-cli
MIT