A job runner for coding agents. Your team assigns work in one place, and every job runs the same predefined steps on machines you control: a laptop, a VM, Docker (with optional gVisor) or Kubernetes. Everyone can see what is running and what is waiting on a person. It is early-access, open-source software.
- One place for the team. One control plane holds every job. Anyone signed in can see what each job is doing, step by step, and open its pull request.
- Runs anywhere. A runner is a small daemon that asks the control plane for runs. Start one on a Mac, a VM, Docker (with optional gVisor), or Kubernetes. The control plane treats them all the same.
- Steps you define. A preset is a list of steps: clone, implement, review, revise, open a
pull request, check risk with a merge gate, and merge — or pause at an explicit approval gate
(
gate:) and chain downstream jobs withtrigger:andon_merge:. Each step runs an agent (claude,codex,pi, oragy, with its own model and prompt) or a shell command. A test step is a check an agent cannot skip. See Preset recipes. - Any trigger. The web app (New job and Automations),
GitHub Issues, Linear, a schedule, an
MCP bot, or
curlagainst the run API.
Supported harnesses:
Send the work to the run API, or let an automation or issue tracker start it. The job works on its own branch, and the default preset opens one pull request.
Each step runs headless without mid-step Q&A; add a gate: step to a preset when you want a job to pause for human approval before continuing.
See Vision for what Machinist is for, where it is, and what comes next.
Install the latest stable release for Linux or macOS (amd64 / arm64), verified against the release SHA-256 checksums:
curl -fsSL https://machinist.sh/install.sh | shTo install the latest automated nightly build from main instead:
curl -fsSL https://machinist.sh/install.sh | MACHINIST_CHANNEL=nightly shUpgrade an existing install in place:
machinist update # latest stable release
machinist update --nightly # latest nightly build (alias: machinist upgrade)This runs the control plane and one local runner on your machine using the machinist binary
from Install (to build from source instead, see Development).
You need Git, the GitHub CLI signed in with gh auth login, and a supported coding agent CLI on
your PATH (claude, codex, pi, or agy). Give the GitHub CLI the workflow scope too, so
jobs can push changes to .github/workflows/:
gh auth refresh -s workflow
mkdir my-machinist && cd my-machinist
git init
machinist init --repo owner/name --handle "$(gh api user --jq .login)" --loginReplace owner/name with a repository you control. Machinist runs from the directory that holds
its configuration, so keep that directory in git and run every command below from there (or pass
--config). machinist init writes these files, all meant to be committed:
config.yaml the control plane
runner.yaml a local runner
factory/presets/ the default preset, a short list of steps
factory/agents/ the agents those steps run: harness, model and prompt
factory/prompts/ rules every agent follows
factory/scripts/ the shell those steps run
It also creates .machinist/, which holds the database and a token for the local runner, and adds
it to .gitignore.
- Local login vs. API keys: Passing
--loginsetsenv: []andlogin: trueinrunner.yamlso steps reuse an existing CLI login on your own machine. To use API keys instead (such asANTHROPIC_API_KEYorOPENAI_API_KEY), omit--login(or list the variable names inenv:inrunner.yaml, e.g.env: [ANTHROPIC_API_KEY]) and export them in the runner's environment. Runningmachinist initwith no flags writes starter templates where you can setgithub.handle,github.repositories, andenvby hand. See Credentials. - Other harnesses: The default starter agents use
claude. To runcodex,pi, oragyinstead (or mix harnesses across steps), setharnessinfactory/agents/*.mdand make sure that CLI is onPATH. See Factory files.
-
Create an operator token and print it so you can sign in to the web app (and reuse
$TOKENfrom the shell):TOKEN=$(machinist token create "$USER") echo "$TOKEN"
-
Start the control plane in one terminal and the local runner in another:
GH_TOKEN=$(gh auth token) machinist startGH_TOKEN=$(gh auth token) machinist runner startmachinist startprints the control plane URL (http://127.0.0.1:7331), andmachinist runner startlogs the harnesses it discovered onPATH. -
Open
http://127.0.0.1:7331, paste the printed token to sign in, and select New job. Pick the repository, type what you want done, and select Start job. The agent does the work, opens a pull request, and merges it once its checks pass. The same fromcurl:curl -sS -X POST http://127.0.0.1:7331/machinist/run \ -H "Authorization: Bearer $TOKEN" \ -d '{"key":"fix-1","vars":{"repo":"owner/name"},"prompt":"Fix the toast position"}'
The pull request comes from whoever owns GH_TOKEN. For a team, use a
GitHub App instead: each run gets a token for its own repository that
lasts an hour, and no runner holds a GitHub token.
To start jobs by labeling GitHub issues, see the GitHub Issues guide. To start jobs by assigning Linear issues to Machinist, follow the Linear setup guide. It makes a Linear app with client credentials, so Machinist gets and renews its own Linear token.
Jobs start from the web app (New job or Automations), the run API,
MCP, a schedule, GitHub Issues,
Linear, or downstream trigger: / on_merge
presets. Steps run headless; a job pauses only when its preset defines an explicit
approval gate. When an agent has to guess, it lists each guess
under Assumptions in the pull request.
| Page | What it does |
|---|---|
| Dashboard | Three views (Overview, Models, and Spending) over 7, 14, or 30 days: time to merge, human touches, waiting gate count, pull requests opened and merged, success rate, run and wait times, per-harness/model comparisons, daily spend, cost per merged pull request, and tokens |
| Jobs | Every job as a 4-column board (Queued, Running, Review, Done) or paginated list, with source (Web, API, Schedule, Trigger, GitHub, Linear), repository, preset, pull request, state (Waiting with a Gate badge for approval gates, Waiting for CI, or Needs you), and merge-gate risk badge (Low, Medium, High) |
| Automations | Saved and scheduled jobs from the database or factory/automations/. Create, edit, and run them on demand, as-is or with one-off prompt, harness, model, runs_on, or preset input overrides |
| New job | Pick a repository, choose a preset (with fields for any declared preset inputs), write a prompt, and start a job |
| Job | One job: result, Gate panel when Waiting (showing details and Approve / Deny controls), merge-gate verdict and reason, parent and triggered child job links, prompt, steps and their status (including Waiting and Held), and every run with live step output. Run again starts an ended job again |
| Runners | Each runner (local, docker, docker (runsc), or kubernetes), its labels, harnesses, busy slots, and queue wait times |
| Settings | Setup checks (Overview), projects (repositories), GitHub App and auto-merge mode (GitHub), Linear, tokens (including read and run scopes), team and invites, presets and agents, and account |
To stop a job, call POST /machinist/jobs/{id}/cancel. To run an ended job again, call
POST /machinist/jobs/{id}/rerun. After editing config.yaml or factory/, run
machinist reload to apply changes without restarting the control plane. Set notify.webhook
and server.public_url in config.yaml to send a Slack-compatible webhook when a job needs a
person or fails.
Every job uses the default preset unless it names another: checkout, implement,
review, revise, publish, merge-gate, and merge. When github.auto_merge is true
9653
code>
(the default), a pull request merges once its checks pass, review accepts it, and
merge-gate marks it low risk. Medium- or high-risk pull requests stay open in Review
for a person. Auto-merging pull requests waiting on checks show Waiting for CI. If CI fails
or a parallel merge causes a conflict, PR Steward starts a fix run on the same branch up to
github.steward_retries times (default 2), without overwriting human commits. Commit
.machinist/merge-policy.md to a repository's default branch to override
factory/prompts/merge-policy.md. Set github.auto_merge: false for observe mode:
merge-gate still comments its verdict on every pull request, and leaves every pull request
open for a person. See Merge gate and policy,
Merge policies, and Preset recipes. Add a preset to
factory/presets/ only when a job needs different steps.
- Configure a GitHub App (with Issues: Read and write) or set
GH_TOKENwhere the control plane runs. - Add a
github_issuessection toconfig.yamlwithallowed_users(the GitHub logins allowed to trigger jobs) and an optionallabel(defaults tomachinist), then runmachinist reload. - Apply the
machinistlabel to an open GitHub issue in a watched repository. Machinist verifies who applied the label from the issue's timeline and starts a job within a minute.
See the GitHub Issues guide for each step.
- In Linear, create an app called Machinist with client credentials on.
- Set
LINEAR_CLIENT_IDandLINEAR_CLIENT_SECRETwhere the control plane runs. In thelinearsection ofconfig.yaml, setapp_user_id(the app's user ID),projectsorteams(Linear project or team to repository) and a non-emptyallowed_users. Then runmachinist reload(or restart the control plane if you changed environment variables). - Delegate an issue to the Machinist app. Machinist starts a job for it within a minute.
See the Linear setup guide for each step.
go test ./...
cd internal/controlplane/web && npm ci && npm testThe Go tests run whole jobs end to end with fake claude and gh commands and a local
Git remote. See Development.
The default preset runs review with a second agent, runs revise to fix what review found
and reviews again, opens one pull request in publish, and runs merge-gate without GitHub
credentials to judge risk against .machinist/merge-policy.md on the default branch (or
factory/prompts/merge-policy.md). Then machinist merge posts the merge-gate comment and
hands the pull request to the control plane, so the runner does not wait on CI. The control
plane merges it only when github.auto_merge is true, review accepted it, merge-gate
approved it as low risk, and all checks pass. That merge rule is Go code, not an agent. How
the pull request is written is in factory/agents/publish.md. Branch protection still decides
what can merge. See Security.
One control plane holds jobs, runs, and presets, backed by SQLite or PostgreSQL. It never runs a step. Runners on Macs, VMs, Docker (with optional gVisor), or Kubernetes dial out and ask for runs. See Architecture.
| Guide | What it covers |
|---|---|
| Documentation | The full list |
| Vision | What Machinist is for, where it is, and what comes next |
| Run API | Starting jobs from any system |
| MCP | Letting bots list, run, watch and cancel jobs over MCP |
| GitHub Issues | Starting jobs by labeling GitHub issues |
| Linear | Starting jobs by delegating or assigning Linear issues |
| Factory files | Presets, agents, gates, triggers, merge gate, PR Steward and automations |
| Preset recipes | Copy-paste presets for cross-model review, approval gates, deploys, inputs and observe mode |
| Merge policies | Risk-based merge policies and starter templates |
| Runners | Adding local, Docker (with optional gVisor), and Kubernetes runners |
| Credentials | Which credential to use, and why |
| Configuration | Every setting (including auth, PostgreSQL, live reload, webhooks and PR Steward) |
| VM deployment | Running and upgrading on a Linux VM |
| Cloud Run deployment | Running on Google Cloud Run with PostgreSQL |
| Development | Build, test and contribute |
Read CONTRIBUTING.md before contributing. Machinist uses the MIT License.