mergiraf for the easy half. gfix for the hard half.
gfix is a local CLI + MCP server. Mergiraf — subprocess, GPL boundary honored — handles the structural half. gfix resolves the ~50% of hard semantic conflicts everyone else gives up on. Uses the host model's sampling when available: your tokens, your suggestions, your budget. Audit refs prove what happened. Rerere amortizes the answer across machines.
what it does. honestly.
deterministic floor
Text merge → Mergiraf subprocess → AI. Mergiraf resolves structural conflicts in TS/Java/Rust/Go before the AI is ever asked. The floor is the product.
// the AI is an accelerant, not the strategy
ai-grade for the hard half
~50% of hard semantic conflicts get resolved (merde.ai research) — that's the half mergiraf can't reach. Suggestions arrive with rationale + confidence score. Low-confidence is surfaced as low-confidence, never laundered into certainty.
// the AI is for the conflicts that need it. nothing else.
rerere, cross-machine
Every accepted resolution writes refs/gitfix/rerere/<blake3>. Push to any git remote. Your teammate's gfix replays your answer on the same conflict triple — sub-100ms, zero AI calls.
// pay once. replay forever.
audit refs as receipts
Every merge writes refs/gitfix/audit/<merge_id> — a synthetic commit whose tree holds the full final state as audit.json. Inspect with git show. Push with git push.
// the trust substitute for source visibility
MCP-native, host-agnostic
Works with Claude Code today. Cursor, Codex, Aider, opencode, Continue, Gemini CLI — anything that speaks MCP — gets the same tool surface for free. Uses the host model's sampling when available: your tokens, your suggestions, your budget. BYO-key for Anthropic, OpenAI, Gemini, or Ollama when the host can't sample.
// one binary. every agent. your model, your bill.
preview. resolve. apply. three MCP calls.
- 01
preview
see every conflict before it lands. nothing written.
→ claude calls gitfix_merge_preview → 47 files changed · 13 conflicts · 12 auto-resolved (mergiraf: 8, rerere: 4) → 1 needs AI: src/auth/login.ts (merge_id m_2026…_c2bc70) - 02
resolve
Mergiraf or rerere when possible; AI suggestion when not.
→ gitfix_conflict_get c_2a3d7 (include_ai_suggestion: true) → gemini-flash · 1.8s · confidence 0.72 · rationale provided → gitfix_conflict_resolve c_2a3d7 kind=ai-suggestion - 03
apply
write the merge commit + the audit ref.
→ gitfix_merge_apply auto_approve=true → main → 8f3a91c (3-parent octopus) → refs/gitfix/audit/m_2026…_c2bc70 (pushable, immutable)
install. three paths. same binary.
Pick whichever fits. All three land the same /usr/local/bin/gfix (or /opt/homebrew/bin/gfix on Apple Silicon).
brew install ameyypawar/gfix/gfixcurl -fsSL https://gfix.space/install | shVerifies SHA256 against the published manifest before installing. Mismatch exits non-zero.
npm install -g @gitfix/cliUseful inside docker images and CI containers that already have node.
macos first run
The alpha binary is unsigned. If Gatekeeper blocks gfix, clear the quarantine attribute once:
xattr -d com.apple.quarantine /opt/homebrew/bin/gfixSubstitute your install path; which gfix shows it. Full context: setup.md §2.
wire into claude code:
claude mcp add --scope user -- gfix /opt/homebrew/bin/gfix mcp--scope user makes gfix available from any directory. The -- separator is required even with no -e flags.
add one block. every MCP-speaking agent finds it.
gfix mcp is a vanilla MCP-over-stdio server. Claude Code is alpha.1's verified host; Cursor, Codex, Aider, opencode, Continue, Gemini CLI work without changes.
{
"mcpServers": {
"gfix": {
"command": "/opt/homebrew/bin/gfix",
"args": ["mcp"],
"env": {
"GITFIX_BYOK": "1"
}
}
}
}
closed-source. free during alpha. proven by receipts.
Source stays private during the brand-formation window. The 5-line EULA lets you install on any number of machines for any purpose including commercial use — you just can't redistribute the binary or reverse-engineer it. Pricing is free during alpha; the pricing decision is deferred to v1.0.
The trust substitute for source visibility is audit refs. Every merge gfix performs writes a synthetic git commit at refs/gitfix/audit/<merge_id> whose tree contains audit.json — the full final state, the decisions, the actor, the AI suggestions used, the rerere replays. Plain git. Inspect three weeks later:
git show refs/gitfix/audit/m_2026-05-22T10-25-45Z_c2bc70:audit.jsonTwo real merges from the M2 dogfood sessions:
m_2026-05-22T10-25-45Z_c2bc70— AI-driven resolution, actor: ai-agent:claude-code, Gemini suggestion accepted.m_2026-05-23T20-09-27Z_cebcd8— Cross-machine rerere replay, 0 AI calls, sub-100ms.
If "closed-source binary" is a deal-breaker for your environment (compliance review, security audit, regulated industry): source access on request to ameyap007aaa@gmail.com with a one-paragraph use case. For most users, the audit refs are enough.
what gfix doesn't do.
The honest counterpart to every pillar above. Closed-source means honesty is the trust layer — so here's the explicit list, not buried in docs.
doesn't prevent conflicts before they happen
gfix is a resolver, not a coordinator. If you want entity-level coordination that prevents agents from colliding in the first place, look at Weave (open source, MIT/Apache, ataraxy-labs.github.io/weave). gfix's bet is on resolution + audit, not prevention.
doesn't push to your remotes
By design. gfix writes to the working tree and to refs/gitfix/* on apply. You push the audit + rerere refs yourself when you want to share them. Merges into main require auto_approve=true. Safety boundary, not a feature gap.
doesn't auto-merge in languages mergiraf doesn't support
Mergiraf's tree-sitter allowlist covers a finite set of languages (TypeScript, Java, Rust, Go, and a handful of others). Anything outside it falls through to the text floor → AI-suggestion fallback. No silent skip; the AI path is language-agnostic, but it's an AI path with a confidence score, not a deterministic merge.
~50% hard-conflict resolution; the other 50% escalates
Independent research (merde.ai) puts LLM resolution of complex semantic conflicts at ~50%. The other 50% surfaces as a low-confidence suggestion or a no-suggestion conflict — you, or the agent driving gfix, decide. Rerere then amortizes the half that worked across every future occurrence.
doesn't auto-apply ai output
Every accepted ai-suggestion requires an explicit gitfix_conflict_resolve call with kind: "ai-suggestion". gfix never silently writes model output. The agent driving gfix — or you — make the call; gfix records it.
any MCP-speaking agent. one merge layer.
gfix exposes 7 tools over MCP-on-stdio. any agent that speaks the protocol can drive the full merge cycle — preview, get, resolve, apply, abort, status, batch.
Claude Code
Anthropic's CLI agent
verifiedCursor
AI-first editor with multi-agent workflows
should workAider
terminal-native pair programmer
should workCodex
OpenAI's CLI coding agent
should workContinue
open-source IDE extension, BYO model
should workGemini CLI
Google's terminal coding agent
should work
alpha.1 verified host: Claude Code. file host-specific issues in gfix-docs →
frequently asked.
is gfix open source?
Not during alpha. The binary ships under a 5-line proprietary EULA — install + use freely (including commercial); don't redistribute or reverse-engineer. Pricing + licensing posture is re-decided as a single block at v1.0. The audit refs (refs/gitfix/audit/<merge_id>) are the trust substitute for source visibility.who runs the AI calls? what does it cost?
Two paths. MCP sampling: your host's LLM, your host's bill — when the host advertises sampling (Claude Code does not, today). BYO-key: gfix calls Gemini/Anthropic/OpenAI/Ollama directly using your key. No gfix-operated AI backend; no gfix bill. A typical text-conflict suggestion costs <$0.001 on Gemini Flash; rerere replay costs $0.does it push to my remotes?
Never. gfix writes to the working tree and to refs/gitfix/* on apply. You push the audit + rerere refs yourself when you want to share them. Merges into main require auto_approve=true.what platforms?
macOS arm64 (verified by developer dogfood). macOS x86_64, Linux x86_64, Linux arm64 — binaries shipped, unverified by daily use. Windows lands post-alpha.does it auto-apply AI output?
Never. ai-suggestion requires a prior gitfix_conflict_get with include_ai_suggestion=true and an explicit gitfix_conflict_resolve with kind: "ai-suggestion". You — or the agent driving gfix — make the call. gfix records it.where do I report bugs?
Install/binary bugs: github.com/ameyypawar/gfix/issues. Docs/setup friction: github.com/ameyypawar/gfix-docs/issues. Security: ameyap007aaa@gmail.com (coordinated disclosure preferred).
guides, references, and context.
everything written down so the agent — or you — can read it.
- Parallel agents with git worktrees
Run multiple coding agents in their own worktrees, partition the work, and fold the lanes back with gfix.
- Setup
brew install or curl, wire into Claude Code, configure a key — start to first audit ref in 15 minutes.
- FAQ
Licensing, cost, platforms, safety — 10 questions, direct answers.
- Capability matrix
What gfix resolves, what escalates to you, and what it won't touch.
one command. then a real merge in 15 minutes.
The setup walkthrough takes ~15 minutes start to first audit ref. brew install, wire into Claude Code, configure Gemini Flash free-tier, merge a fixture, inspect the audit ref. Done.
brew install ameyypawar/gfix/gfix