This release is a pre-release and may not be stable for production use.
mergeCraft
AI-powered PR review as a standalone, BYOK GitHub Action. No SaaS account. No dashboard. Your repo, your keys, your reviewers.
For LLM / Agents · Quickstart · Problem · How it works in GitHub Action · Features · Docs
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.gitignorelinesinitadded, then open a pull request (or run the workflow withworkflow_dispatch). That pull request is the first review target; watch themergecraft-approvalcheck. The default scaffold does not listen for@mergecraft reviewcomments.
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@44bd67c55666303d5bd35efed5ef53868b27bb46 # v0.1.0a6
For ignore paths, comment triggers and hardened workflows, see the workflow guide.
Problem
| What teams need | How mergeCraft handles it |
|---|---|
| Control over credentials and cost | Run in GitHub Actions with your own subscription or API key. Cost guide |
| Reviewable evidence | Each analyzer checks the diff and a verifier re-reads Critical and Major findings. |
| A portable reviewer | Run the MIT-licensed Action or review a local diff with the CLI. |
How it works in GitHub Action
A pull request event resolves a trust tier, runs the matching analyzers,
then a review agent and a read-only verifier produce typed findings
that drive inline comments, the mergecraft-approval check, and optional SARIF
upload. Package map: docs/architecture.md; trust tiers and workflow
patterns: docs/workflows.md.
How it works — CLI
mergecraft review runs the same analyzer + reviewer pipeline on a local diff, worktree
or patch file, with no pull request, and exits with a named code.
mergecraft review --dry-run # offline, no credential: prints the review prompt
mergecraft review --agent --diff changes.patch # orchestrator mode: JSONL on stdout
Runnable trees: examples/cli/, tour in docs/cli-examples.md.
Features
| 🔍 Deep PR review | Correctness, risk, blast radius and hygiene lenses; inline findings + narrative verdict |
| ✅ Structural approval gate | mergecraft-approval is a pure function of typed findings |
| 🛡️ Trust tiers | Fork PRs degrade to untrusted: no secrets, read-only analyzers; mergecraft review also works offline |
| 🤖 Agent-native | --agent JSONL protocol, contractual exit codes, MCP server, shipped skill + plugin |
| 🌐 Opt-in extras | SARIF upload, tracing (docs/TRACING.md), behaviour verification (docs/verify-behavior.md) |
Authentication
Authenticate a provider with mergecraft provider auth <label>; every provider
mergeCraft ships a recipe for is below. Custom OpenAI-compatible endpoints, LiteLLM
proxies, multi-provider setups and model chains:
docs/authentication.md.
Provider table
| Provider | Command | Needs | Secret stored | Recommended model (seeded) | Inferred harness |
|---|---|---|---|---|---|
| Anthropic | mergecraft provider auth anthropic |
Claude Code (claude setup-token) to mint the token |
LLM_PROVIDER_<N>_CLAUDE_CODE_OAUTH_TOKEN; flat: ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN |
anthropic/claude-opus |
claude |
| Amazon Bedrock | mergecraft provider auth bedrock |
cloud credentials (no --api-key) |
LLM_PROVIDER_<N>_AWS_ACCESS_KEY_ID + LLM_PROVIDER_<N>_AWS_SECRET_ACCESS_KEY; flat: AWS_BEARER_TOKEN_BEDROCK |
none — name a model explicitly | opencode |
| DeepSeek | mergecraft provider auth deepseek |
an API key | LLM_PROVIDER_<N>_API_KEY; flat: DEEPSEEK_API_KEY |
deepseek/deepseek-pro |
opencode |
mergecraft provider auth google |
an API key | LLM_PROVIDER_<N>_API_KEY; flat: GEMINI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY |
google/gemini-pro |
gemini |
|
| MiniMax (OpenAI-compatible) | mergecraft provider auth minimax |
an API key | LLM_PROVIDER_<N>_API_KEY; flat: MERGECRAFT_CUSTOM_PROVIDER_API_KEY |
minimax/MiniMax-M3 |
opencode |
| Moonshot AI | mergecraft provider auth moonshotai |
an API key | LLM_PROVIDER_<N>_API_KEY; flat: MOONSHOT_API_KEY |
moonshotai/kimi-k2 |
opencode |
| OpenAI | mergecraft provider auth openai |
the Codex CLI on PATH (npm i -g @openai/codex; needs Node.js) |
LLM_PROVIDER_<N>_CODEX_AUTH_JSON; flat: OPENAI_API_KEY, CODEX_AUTH_JSON |
openai/gpt |
codex |
| OpenCode | mergecraft provider auth opencode |
a billing-backed key from opencode.ai/auth | LLM_PROVIDER_<N>_OPENCODE_AUTH_JSON; flat: OPENCODE_API_KEY, OPENCODE_AUTH_JSON |
opencode/big-pickle |
opencode |
| OpenCode Go | mergecraft provider auth opencode-go |
an API key | LLM_PROVIDER_<N>_API_KEY; flat: OPENCODE_GO_API_KEY |
opencode-go/glm-5.1 |
opencode |
| OpenRouter | mergecraft provider auth openrouter |
an API key | LLM_PROVIDER_<N>_API_KEY; flat: OPENROUTER_API_KEY |
openrouter/claude-opus |
opencode |
| Paper Instruments | mergecraft provider auth paperinstruments |
an API key | LLM_PROVIDER_<N>_API_KEY; flat: MERGECRAFT_CUSTOM_PROVIDER_API_KEY |
paperinstruments/ultramarine-1-flash |
opencode |
| Tencent TokenHub | mergecraft provider auth tokenhub |
an API key | LLM_PROVIDER_<N>_API_KEY; flat: TOKENHUB_API_KEY |
tokenhub/hy3 |
opencode |
| Google Vertex AI | mergecraft provider auth vertex |
cloud credentials (no --api-key) |
LLM_PROVIDER_<N>_GOOGLE_APPLICATION_CREDENTIALS; flat: VERTEX_SERVICE_ACCOUNT_JSON |
none — name a model explicitly | opencode |
| xAI | mergecraft provider auth xai |
an API key | LLM_PROVIDER_<N>_API_KEY; flat: XAI_API_KEY |
xai/grok |
opencode |
Not in the provider catalog:
| Integration | Credential | Model |
|---|---|---|
| Cursor Cloud | mergecraft auth cursor --scope github (legacy shim) → CURSOR_API_KEY |
cursor/cloud-agent |
| OpenAI-compatible (custom) | MERGECRAFT_CUSTOM_PROVIDER_BASE_URL + MERGECRAFT_CUSTOM_PROVIDER_API_KEY |
<your-prefix>/<your-model> |
| Logfire tracing | mergecraft auth logfire — see docs/TRACING.md |
— |
Docs
| Doc | What it covers |
|---|---|
docs/install.md |
Action vs CLI vs Docker install paths |
docs/authentication.md |
Providers, custom gateways, model fallback chains |
docs/troubleshooting.md |
Symptom-first fixes: no check, empty secret, exit codes |
docs/upgrade.md |
Move the CLI and the Action pin to a new release |
docs/cost.md |
What a review spends and which settings change it |
docs/uninstall.md |
Pause or remove mergeCraft |
docs/architecture.md |
A run, end to end, mapped to src/mergecraft/ |
docs/glossary.md · docs/workflows.md · docs/agents.md |
Terms, workflow patterns and trust tiers, agent prompts |
docs/cli.md · docs/EXIT-CODES.md · docs/action-reference.md |
Command reference, exit codes, every Action input |
docs/REVIEW-CHECKS.md · docs/ANALYZERS.md · docs/trust-policy.md |
What a review checks, analyzers, operator trust knobs |
SECURITY.md |
Threat model, trust tiers, reporting |
docs/ |
Full generated index |
For LLM / Agents
For an agent-assisted mergecraft init, use the setup prompts, agent instructions, skill, or MCP reference. Machine-readable overview: llms.txt.
MCP Registry ownership: mcp-name: io.github.alexhawat/mergecraft
License
MIT — see LICENSE. Contributing: .github/CONTRIBUTING.md.
Metadata
Release files for mergecraft-action 0.1.0a7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mergecraft_action-0.1.0a7.tar.gz | 4.6 MB | With provenance | Details for mergecraft_action-0.1.0a7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mergecraft_action-0.1.0a7-py3-none-any.whl | Python 3 | none | any | Details for mergecraft_action-0.1.0a7-py3-none-any.whl |
Total release size: 6.8 MB
Release files / mergecraft_action-0.1.0a7.tar.gz
| Download URL | mergecraft_action-0.1.0a7.tar.gz |
|---|---|
| Size | 4.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a629b3ce3fbe10e25c40ef0b4072f43dea3af0da1188ad1c296e57d4f73fe39
|
|
BLAKE2b-256 checksum How to use checksums |
370d70e0aa1b77aad1bfd8d99cc2da6b898764c4ba93e93d477e53aaf357c875
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / mergecraft_action-0.1.0a7-py3-none-any.whl
| Download URL | mergecraft_action-0.1.0a7-py3-none-any.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9002b20a43b38f6ac6cd8ddd9075882c550354094c0a7641db87f0c8c54145b0
|
|
BLAKE2b-256 checksum How to use checksums |
c7e13cc62676c99f2b9db12ac95d247a3b05c4fdb56a57e0fd84e77fdabb333f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for mergecraft-action 0.1.0a7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mergecraft_action-0.1.0a7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.