Sandbox
@owainlewis/machinist

Software factory harness for Claude Code and Codex

Machinist maps named commands to fixed executables, sends prompts on standard input, and tracks each run from request to handoff. It is built to keep repository access, credentials, and execution rules local while letting you invoke Codex, Claude Code, or another agent CLI through the same entrypoint.

398 stars72 forksGoUpdated 8d ago
Who it's for

Builders who want reusable, controlled workflows for agent-led coding on local repositories.

What it delivers

You can run agent work through one approved entrypoint instead of letting it use arbitrary shell access.

What it does

Named command execution

Maps each command name to a fixed executable and runs it against an approved repository path.

Prompt-based runs

Renders a prompt and sends it to the executor on standard input.

Local authority

Keeps repositories, credentials, model aliases, and executor settings on the worker.

Run tracking

Streams stdout and stderr and records events, artifacts, exit status, duration, and reported token use.

Human handoff

Returns a pull request instead of deciding what ships.

Repository-owned orchestration

Supports scripts and workflow examples that live with the repository.

How to get it

  1. 1Build and initialize Machinist
    git clone https://github.com/owainlewis/machinist.git
    cd machinist
    mkdir -p ./bin && go build -o ./bin/machinist ./cmd/machinist
    ./bin/machinist init
  2. 2Run it directly
    ./bin/machinist run --command=foreman --repo=/path/to/repo --prompt="Implement issue 42"

README

Machinist

The open source AI software factory for agentic coders.
Machinist is an open source software factory for repeatable and scalable AI coding workflows.

Website · Documentation · Configuration · Workflow examples

Technical drawings of a milling machine, supervised coding-agent system, and precision linear assembly

Machine section · supervised agent system · exploded assembly

Machinist is an open-source software factory implementation. It runs on your machine, keeps repository access and credentials local, and records the work from request to handoff. Commands can invoke Codex, Claude Code, another agent CLI, a test runner, a shell script, or repository-owned orchestration.

Please note: this is early access software and subject to change.

Why Machinist

  • One controlled entrypoint. Workers expose named commands and repositories, never arbitrary shell text or machine-local paths.
  • Bring your own harness. Use any executable that accepts a prompt on standard input.
  • Keep authority local. Repositories, credentials, model aliases, and executor configuration stay on the worker.
  • Inspect every run. Stream output, retain durable events and artifacts, and track terminal outcomes, duration, and reported token use.
  • Keep the human gate. Machinist hands back a pull request. It does not decide what ships.

Quick start

Build and initialize Machinist:

git clone https://github.com/owainlewis/machinist.git
cd machinist
mkdir -p ./bin && go build -o ./bin/machinist ./cmd/machinist
./bin/machinist init

Configure an approved command:

# ~/.machinist/config.toml
[commands.foreman]
executor = "codex"
prompt_file = "prompts/foreman.md" # optional
timeout = "45m"

Run it directly:

./bin/machinist run --command=foreman --repo=/path/to/repo --prompt="Implement issue 42"

How execution works

For a direct run, Machinist maps the configured command name to a fixed executable and uses the path supplied with --repo as the working directory. Managed submissions instead resolve an approved repository name from the worker configuration. In both cases, Machinist renders the prompt, sends it on standard input, streams stdout and stderr, and applies one overall timeout and cancellation. Exit code 0 succeeds; every non-zero exit code fails.

Scripts are intentionally opaque. Their internal stages appear in logs, but Machinist does not invent child runs, graphs, checkpoints, or resumable stages. A killed script restarts from the beginning unless the script owns checkpointing.

Go deeper

GuideWhat it covers
DocumentationChoose the right setup and operations guide
ConfigurationCommands, executors, workers, models, and repositories
DevelopmentBuild, test, and work on Machinist locally
VM deploymentRun the control plane and worker as services
Workflow examplesRepository-owned multi-step orchestration

Contributing

Read CONTRIBUTING.md for development setup and pull-request expectations. Security issues should follow SECURITY.md.

Machinist is released under the MIT License.

Files in the repo

Repository payload21 top-level entries
  • .github
  • cmd
  • deploy
  • docs
  • evals
  • examples
  • internal
  • scripts
  • skills
  • .gitignore
  • agent.py
  • ARCHITECTURE.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • go.mod
  • go.sum
  • install.sh
  • Justfile
  • LICENSE
  • README.md
  • SECURITY.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More harnesses

affaan-m/
ECC
affaan-m/ECCHarnesses

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

258k
ruvnet/rufloHarnesses

🌊 The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

72k

Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.

11k