Quickstart
Five minutes, one repository, one provider credential.
Requirements: uv is the only prerequisite for the
install; it downloads a compatible Python (3.11+) itself, so no system Python is
needed. The GitHub CLI (gh auth login) is needed only
for provider auth --scope github (the default) or --scope both, which stores the secret
with gh secret set. mergecraft init needs neither gh nor a network;
--scope local needs no gh, but provider-specific authentication may need a network.
Two providers need one more CLI at the credential step: the Codex CLI for openai
and Claude Code for anthropic
(provider table).
- Install the CLI and scaffold the repo:
uv tool install mergecraft-action==0.1.0a7
mergecraft init # writes .mergecraft/config.yaml + .github/workflows/mergecraft.yml, no secrets
- Authenticate a provider (subscription recommended — no metered API billing):
mergecraft provider auth opencode --scope github # OpenCode Zen (recommended)
mergecraft provider auth opencode-go --scope github # OpenCode Go subscription
mergecraft provider auth openai --scope github # ChatGPT Plus/Pro/Team/Enterprise
mergecraft provider auth anthropic --scope github # Claude Pro/Max
mergecraft provider auth google --scope github # Google AI Studio
# or pick any configured label from: mergecraft provider list
The credential is stored as a GitHub Actions secret via gh secret set. Add
--scope local to write a local .env instead, for offline mergecraft review,
or --scope both for both.
- Check the setup:
mergecraft doctor # git, providers, analyzers, auth, config, workflow auth, MCP wiring
provider auth --scope github (or both) also rewrites .github/workflows/mergecraft.yml
so the workflow passes the secret it just stored. If the workflow auth row fails,
run mergecraft workflow sync --apply.
- Commit and open a pull request. Commit
.mergecraft/config.yaml,
.github/workflows/mergecraft.yml, the notes file under .mergecraft/ and the
.gitignore lines init added, then open a pull request (or run the workflow with
workflow_dispatch). That pull request is the first review target; watch the
mergecraft-approval check. The default scaffold does not listen for
@mergecraft review comments.
Docs on main may describe unreleased behavior; the
Release documentation match
this install. Offline first: mergecraft review --dry-run prints the review prompt
with no credential. Something wrong? docs/troubleshooting.md.
The harness runs the provider selected in your configuration.
Example 1 — auto-review every PR
The complete workflow runs the pinned Action on each PR. The scaffold configures permissions, provider credentials, and the review prompt.
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: alexhawat/mergeCraft@ca65b4c95c7afbbefa58033cea1b31b1197d0372 # v0.1.0a7
For ignore paths, comment triggers and hardened workflows, see the workflow guide.
Problem