What is CodeMachine?
CodeMachine is an open-source command-line tool that orchestrates AI coding agents into repeatable, long-running workflows. It sits in the Coding-Agent Harnesses & Runtimes category of the AI Coding tools and is open-source, written in TypeScript and licensed Apache-2.0. To get started: install the CLI.
Overview
CodeMachine is an open-source command-line tool that orchestrates AI coding agents into repeatable, long-running workflows. Its starting point is that every session with a coding agent already follows a process — reproduce, analyse, plan, implement, test for a bug; research, design, code, review for a feature — but that process lives in your head and gets rebuilt from scratch each time. CodeMachine lets you capture it once as a workflow and run it again on the next project.

It does not ship its own model or agent. It is an orchestration layer over the coding CLIs you already use: it spawns each engine through the headless scripting mode that engine documents for automation, passes the arguments and flags, and handles execution, context passing and coordination between steps. The documentation lists Claude Code, Claude Code Router, Codex, OpenCode, Cursor, Mistral Vibe and Auggie CLI as engines, and each agent in a workflow can be pinned to its own engine, model and reasoning effort — so one step can plan on one engine while another implements on a different one.
A workflow is a sequence of agent steps that pass context forward. Around that core sit modules (agents that loop until a goal is met), sub-agents a main agent delegates to, tracks (selectable variants such as a quick path and a thorough one), condition groups that switch steps on or off, and an optional controller agent that gathers requirements in conversation before automation starts. The same workflow can run fully interactive, fully autonomous with the controller driving agents on your behalf, continuous with no interaction, or a hybrid of those. Execution history is kept in a local SQLite registry, workflows can pause mid-run and resume later, and workflow packages can be imported from GitHub to share them across a team. A default Ali Workflow Builder workflow helps you create your first one interactively. Written in TypeScript, Apache-2.0.
What it does
- Orchestrates existing coding CLIs — Claude Code, Claude Code Router, Codex, OpenCode, Cursor, Mistral Vibe and Auggie CLI — through their official headless automation modes
- Per-agent engine, model and reasoning-effort settings in config/main.agents.js, so different steps can use different engines
- Four orchestration patterns: interactive, autonomous (a controller agent runs the steps), continuous auto-advance, and hybrid
- Parallel (&) and sequential (&&) agent runs from one command with codemachine run, including file inputs to an agent
- Workflow building blocks: looping modules, sub-agents, tracks, condition groups, separators and an optional specification brief
- Long-running execution with pause/resume, plus a local SQLite registry of each agent run's engine, model, timing, status and token usage
- Shareable workflow packages installed with codemachine import owner/repo, and a terminal UI showing what each agent is doing
Getting started
You need Node.js with npm (bun, pnpm or yarn also work) and at least one supported AI engine CLI you can sign in to, such as Claude Code, Codex or OpenCode.
Install the CLI
The package installs two equivalent commands, codemachine and cm.
npm install -g codemachineLaunch the interactive session
Run it inside the project you want to work on; -d points it at another workspace directory.
codemachineSign in to your engines
Inside the session, authenticate each AI engine your workflow uses (codemachine auth login does the same from the shell).
/loginPick a workflow and start it
Choose a template — the default is the Ali Workflow Builder, which helps you design your own workflow — then start it. Workflows with tracks or conditions ask a few onboarding questions first.
/templates
/startRun agents directly from the shell
codemachine run executes named agents without the TUI: & runs them in parallel, && in sequence.
codemachine run "code-generator 'Build login feature'"
codemachine run "frontend 'UI' & backend 'API'"
codemachine run "db 'setup' && backend 'models'"Assign engines and models per agent
Agents are declared in config/main.agents.js; set engine (claude, ccr, codex, opencode, cursor, mistral or auggie) and optionally model. With only engine set, that engine's default model is used.
export const mainAgents = {
'my-code-generator': {
id: 'my-code-generator',
promptPath: 'agents/code-generator/main.prompt.md',
engine: 'claude',
model: 'opus',
},
};Import a shared workflow package
codemachine import moazbuilds/pack-rust
codemachine import --listCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Encode your team's bug-fix or feature process once and run it the same way on every repository instead of re-prompting an agent step by step
- Split a task across engines — plan with one coding CLI, implement with another, review with a third — without copying context between them by hand
- Leave a multi-hour, multi-step build running autonomously and resume it after a pause or a crash
- Share a proven workflow with colleagues as an importable package rather than a wiki page of prompts
Version history
Every verified update to CodeMachine that AI/TLDR tracked, newest first — each links to our coverage and the official changeset.
- 2026-02-02v0.8.0
Nova beta release: an autonomous mode where controller agents run whole workflows, mid-run pause/resume with crash recovery, MCP-based agent coordination, tracks and conditions, an import system for shareable workflows, and a rebuilt terminal UI.
- 2025-11-22v0.7.0
Moved the runtime from Node.js to Bun, replaced the terminal UI with OpenTUI, swapped the JSON agent registry for SQLite, and added Auggie CLI as an engine.
How CodeMachine compares
CodeMachine alongside other open-source coding-agent harnesses & runtimes tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| CC Switch | ★ 158k | A cross-platform desktop app that manages provider configuration for eight coding-agent CLIs from one place, with a local failover proxy, MCP and skill management, and spend tracking. |
| Oh My OpenAgent | ★ 71.2k | Opinionated agent bundle for OpenCode and Codex CLI that ships preconfigured sub-agents, lifecycle hooks and built-in MCP servers behind a single ultrawork command. |
| herdr | ★ 53.7k | A single-binary terminal multiplexer built for coding agents: persistent sessions across local and SSH machines, per-pane working/blocked/idle status, and a socket API agents drive themselves. |
| oh-my-claudecode | ★ 41.1k | A plugin and CLI that adds multi-agent orchestration to Claude Code: staged autopilot workflows, parallel tmux workers, and advisors that route a second opinion to Codex, Gemini, Grok or Cursor. |
| DSH Go | ★ 35.2k | A native Android client for DeepSeek Harness that runs the agent on the phone in a built-in Linux environment or drives DSH on your computer or server over SSH, with plugins and phone control. |
| AionUi | ★ 34.6k | An open-source desktop workspace that pairs a built-in agent engine with dozens of external CLI agents, adding scheduled runs, MCP tools and remote access from a WebUI or chat apps. |
| cc-connect | ★ 16.5k | A Go daemon that bridges local coding agents — Claude Code, Codex, Cursor Agent, Gemini CLI, OpenCode, Kimi CLI and more — to Feishu, DingTalk, Slack, Telegram, Discord, LINE and WeCom, so you drive them from chat. |
| CodeMachine | ★ 2.5k | A CLI that turns the way you drive Claude Code, Codex and other coding agents into a reusable multi-agent workflow you can run again on any project |
