Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

nixlim/CodeMachine-CLI

Repository files navigation

CodeMachine

Multi-Agent Workflow Orchestration

✨ CodeMachine Built Itself

90% of this entire codebase was generated by CodeMachine from a single specification file. This isn't a demo—it's proof. CodeMachine orchestrated its own architecture, planning, implementation, and testing.

CodeMachine in Action

What is CodeMachine CLI?

CodeMachine CLI is a multi-agent workflow orchestration framework that transforms project specifications into production-ready codebases. You feed it a spec, and CodeMachine orchestrates top-tier agents like Claude CLI and Codex CLI end-to-end to deliver complex builds while you define the workflow. It also coordinates additional providers (Gemini CLI, Qwen Coder) in parallel so each agent tackles the slice it does best.

Why CodeMachine?

  • 🔄 Custom Workflows: Design orchestration workflows for any complexity—from simple scripts to multi-day development cycles
  • 🤝 Multi-Agent Collaboration: Mix AI providers strategically (Gemini plans, Claude builds, Codex reviews)
  • ⚡ Parallel Execution: Sub-agents work simultaneously for 10x faster output
  • 🎯 Endless Orchestration: Workflows run for hours or days to achieve complex goals automatically

🚀 Quick Start

Get CodeMachine up and running in minutes:

1. Install CodeMachine

npm install -g codemachine

2. Run CodeMachine

Navigate to your project directory and run:

cd ~/your-project-directory
codemachine

On first run, CodeMachine creates a .codemachine/ folder. Write your project requirements in .codemachine/inputs/specifications.md, choose a workflow template, and watch as CodeMachine orchestrates specialized agents to:

  • Design your system architecture
  • Generate implementation plans
  • Write production-ready code
  • Create automation scripts
  • Validate outputs against your specs

Supported AI Engines

CLI Engine Status Main Agents Sub Agents Orchestrate
Codex CLI ✅ Supported
Claude Code ✅ Supported
Gemini CLI 🚧 Coming Soon 🚧 🚧 🚧
Qwen Coder 🚧 Coming Soon 🚧 🚧 🚧

Requirements

  • Node.js ≥ 20.10.0 and npm ≥ 9 (pnpm works too)
  • From source: pnpm install && pnpm build (try pnpm test to verify the workspace)

Core CLI Commands

(codemachine --help for options)

  • codemachine templates — list and activate workflow templates
  • codemachine agent <id> "prompt" — run a specific agent once; supports --profile and --model

Workflow & Specs

  • Specs live in .codemachine/inputs/specifications.md once you bootstrap
  • Workflow templates reside in templates/workflows/; pick or extend them with codemachine templates
  • Generated agents and run state land in .codemachine/; inspect logs under .codemachine/runtime
  • Deep dives: docs/CLI-ENGINES.md, docs/operations, and docs/architecture

That's it! Your complete codebase will be generated and ready to ship.


🎮 Example: Snake Game

CodeMachine handles complex, large-scale projects. We created this simple showcase to demonstrate the workflow.

We wrote a simple specification for a classic snake game:

# Snake Game Specification
## Goal
Create a classic snake game that runs in the terminal or browser.
## Core Features
- Snake moves continuously in a direction (up, down, left, right)
- Player controls direction using arrow keys or WASD
- Snake grows longer when eating food
- Food spawns randomly on the grid
- Game ends when snake hits wall or itself
- Display current score (length of snake)
## Technical Requirements
- Game grid: 20x20 cells
- Initial snake length: 3 segments
- Game speed: 100-200ms per frame

GPT-5 Codex vs CodeMachine Comparison

The comparison speaks for itself: GPT-5 Codex (High) alone vs. CodeMachine's default workflow powered by GPT-5 Codex (Low). The quality gap is massive. Multi-agent workflow orchestration delivers production-ready results that far exceed what single-agent generation can achieve—even with a more powerful model.

See the full Snake Game implementation → Explore the complete project structure, git commit history showing CodeMachine's step-by-step workflow, and both stunning terminal and web versions generated from a single specification.


🛠️ How It Works

CodeMachine Workflow Architecture

CodeMachine orchestrates workflows through sequential main agent steps and parallel sub-agent execution. After selecting a workflow template, the main agent processes each step in order. When sub-agents are triggered, they work simultaneously on specialized tasks (e.g., frontend, backend, database), then results flow back into the main workflow. Conditional loops allow workflows to iterate until completion criteria are met.

Example Workflow:

export default {
 name: 'E-Commerce Platform Builder',
 steps: [
 resolveStep('arch-agent', { engine: 'claude' }), // Claude designs system architecture
 resolveStep('plan-agent', { engine: 'claude' }), // Claude creates detailed implementation plan
 resolveStep('code-generation', { engine: 'codex' }), // Codex generates implementation
 resolveStep('runtime-prep', { engine: 'codex' }), // Codex creates automation scripts
 resolveStep('quality-check', { engine: 'codex' }), // Codex reviews code quality and runtime
 resolveModule('check-task', { // Loop until all tasks complete
 loopTrigger: 'TASKS_COMPLETED=FALSE',
 loopMaxIterations: 15
 }),
 ],
 subAgentIds: ['payment-agent', 'inventory-agent', 'auth-agent'], // Sub-agents work in parallel
};

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.2%
  • JavaScript 7.8%

AltStyle によって変換されたページ (->オリジナル) /