Skip to content

Quickstart

Use a repository with an origin remote and an authenticated gh or tea CLI. See Providers before initialization. Patchmill has no general migration path from earlier configuration or workflow state. Retired review-label settings are accepted but ignored.

With Node.js 24 or later, install with npm:

npm install -g patchmill

With Nix flakes enabled, install from GitHub:

nix profile install github:rochecompaan/patchmill

You do not need a global npm installation when using Nix.

For GitHub, run these commands in the repository you want Patchmill to manage:

patchmill init --provider github-gh
patchmill auth
patchmill labels setup
patchmill doctor

For Forgejo, replace the init command with patchmill init --provider forgejo-tea. To select a named Tea profile, append --login PROFILE. Without that flag, the empty login uses Tea’s default profile.

init writes missing configuration, installs skills, provisions the reviewer, and adds local Git excludes. It leaves valid existing configuration alone. auth asks for an authentication method, provider, and default model. It saves them in the repository’s Pi agent directory, verifies the provider with a real model call, and returns to the shell without opening Pi chat. doctor also includes a real model call.

patchmill triage --dry-run
patchmill triage
patchmill run-once --dry-run
patchmill run-once

Triage dry run calls Pi and writes local logs, but does not change host labels or comments. Run-once dry run prints the selected issue and derived phase without claiming it or running Pi.

Planning gates default off. To require a separate spec or plan review before implementation, enable its workflow gate in the configuration. Review and merge each planning pull request. The issue stays in-progress while waiting. After each merge, run:

patchmill run-once --issue N

Review approval alone does not unlock a gate. An open planning pull request keeps the workflow paused without running Pi. With both gates off, planning writes both documents on the implementation branch and continues directly.

After implementation, agent-done identifies a ready pull request that closes the issue. Review and merge it through the host. Patchmill does not merge it. Non-interactive runs leave the worktree in place. An interactive run removes the clean worktrees and local branches of the issue after it confirms the merge.

patchmill setup-test-repo --provider github-gh --repo OWNER/REPO creates a public demo repository and seeded issues. Use only an explicitly disposable repository. The --reset flag deletes and recreates it. For Forgejo, use --provider forgejo-tea and an optional --login PROFILE. Clone the resulting repository, then follow the initialization commands above.

After upgrading Patchmill, run patchmill skills update to update the shipped skills to the installed version. Review and commit configuration and skill changes. Keep credentials, logs, and sessions local.