AI-powered git assistant for when git is being git
Project description
git-wtf
AI-powered git assistant. For when git is being git.
Two commands that cover 90% of the pain:
git wtf # diagnose whatever broken state you're in
git wtf merge # resolve merge conflicts — semantically, not just line-by-line
Built for vibe coders who are moving fast with AI tools. When you hit a merge conflict on code you didn't write and don't have time to read, git wtf merge reads both sides, understands what each branch was trying to do, merges them properly, explains what it did in plain English, and asks you to confirm before touching a single file.
install
macOS (Homebrew)
brew tap git-wtf/tap
brew install git-wtf
Any OS (pip)
pip install git-wtf
Any OS (pipx — recommended if you use pipx)
pipx install git-wtf
Git automatically picks up git-wtf as a subcommand. No PATH tricks, no aliases required.
setup
git wtf setup
Interactive. Takes ~30 seconds. Three options:
1 Anthropic api.anthropic.com → Claude
2 OpenAI api.openai.com → GPT-4o, o3, ...
3 Proxy corporate / LiteLLM / custom endpoint
Option 1 — Anthropic (direct)
Get your key at console.anthropic.com, paste it in, pick a model. Done.
Option 2 — OpenAI (direct)
Get your key at platform.openai.com, paste it in. Done.
Option 3 — Proxy / corporate
Paste your proxy base URL (e.g. https://llm-proxy.yourcompany.com/v1), paste the key if required. The tool fetches the available model list from the proxy and lets you pick. SSL verification is automatically disabled for corporate MITM setups.
Config is saved to ~/.config/git-wtf/config.json.
env vars (override config file)
GITWFT_API_KEY=... # API key
GITWFT_BASE_URL=... # custom base URL
GITWFT_MODEL=... # model override
GITWFT_VERIFY_SSL=false # disable SSL verification
Standard OPENAI_API_KEY and ANTHROPIC_API_KEY are also picked up automatically.
opencode users
If you use opencode, git-wtf reads your ~/.config/opencode/opencode.json automatically and routes through the same proxy. Zero extra config.
usage
git wtf
Diagnoses whatever state your repo is in. Detached HEAD, mid-merge, diverged from remote, unresolved conflicts — it reads the git state, figures out what happened, and tells you exactly what to run.
__ _(_) |_ __ _____ __
/ _` | | _| \ V V / '_ \
\__, |_|\__| \_/\_/ | .__/
|___/ |_|
feat/onboarding → origin/feat/onboarding
↓ 3 behind MID-MERGE 2 CONFLICTS
──────────────────────────── diagnosis ────────────────────────────
## what happened
ok so basically you're in the middle of a merge that hit conflicts.
git is frozen waiting for you to resolve them...
## how to fix it
1. run `git wtf merge` to resolve conflicts automatically
2. run `git merge --continue` to finish the merge
...
git wtf merge
The main thing. Reads both sides of every conflict, understands the intent behind each, and produces a resolution that keeps both features intact — not just picking a winner.
The trust flow (this is the important part):
After resolving all conflicts, before writing a single file, it shows you:
- A per-file panel — what each file does now, confidence rating (HIGH / MEDIUM / LOW), and any warnings about things it wasn't sure about
- A plain-English summary of the entire merge — what the app will do after this, what trade-offs were made, anything that needs manual review
- A single
apply this merge? [Y/n]prompt
Nothing is written to disk until you say Y.
feat/chat-agent + feat/onboarding → 3 conflicted files
(1/3) src/auth.ts 2 hunks MEDIUM
(2/3) src/api/client.ts 1 hunk HIGH
(3/3) src/user.ts 3 hunks HIGH
────────────────────── what i'm about to change ───────────────────
╭────── src/auth.ts MEDIUM 2 hunks ─────────────────────────╮
│ │
│ fetchUser now uses the shared httpClient AND sends the auth │
│ token as a Bearer header. logout clears localStorage, the │
│ httpClient cache, AND sessionStorage — all three steps kept. │
│ │
│ ⚠ verify httpClient.get() accepts a headers config object │
│ before shipping │
╰───────────────────────────────────────────────────────────────────╯
───────────────────────── the big picture ─────────────────────────
╭────────────── what this merge will do ─────────────────────────╮
│ │
│ • fetchUser now uses the shared HTTP client AND sends auth │
│ • logout does a full triple cleanup — nothing left behind │
│ • onboarding auth + chat-agent HTTP refactor coexist cleanly │
│ │
│ ⚠ NEEDS MANUAL REVIEW: httpClient.get() headers assumption │
│ │
│ vibe check: clean merge, one loose wire — verify before ship │
╰───────────────────────────────────────────────────────────────────╯
3 files resolved · nothing written to disk yet
apply this merge? [Y/n]
how it works
- Reads git state —
git status,git log, branch info, merge state - Parses conflict markers — extracts the three blob versions (
:1:ancestor,:2:yours,:3:theirs) for full file context - Reads project context —
README.md,package.json,CLAUDE.md/.cursorrulesso the LLM knows what you're building - One LLM call per conflicted file — sends both branch commit histories, both full file versions, and each conflict hunk with surrounding context
- Self-validates — if hunk count doesn't match, skips the file and tells you to resolve manually
- Summary call — a second LLM call synthesises all per-file resolutions into a plain-English "what this merge will do" summary
- You confirm — one Y/n. Then it writes and
git adds everything.
confidence levels
Every resolved file gets a confidence rating:
| Level | Meaning |
|---|---|
| HIGH | both changes are in clearly different parts of the code, no semantic overlap |
| MEDIUM | changes interact — resolution is probably right but verify the integration |
| LOW | genuinely ambiguous — the LLM resolved it but you should read this one manually |
LOW confidence files always get a ⚠ heads up block in the panel explaining exactly what to check.
what it doesn't do (yet)
- Rebase conflict resolution
- Multi-file semantic understanding (e.g. a type changed in one file and needs updating in five others)
- Auto-commit after merge
license
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_wtf-0.1.0.tar.gz.
File metadata
- Download URL: git_wtf-0.1.0.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e111ae21ea2e67e8676f14b577b2fae6ee0c2c5a2a6be1bb93d6ab044ec371d3
|
|
| MD5 |
89073140a0c6deebf1157dbbb2f5f82f
|
|
| BLAKE2b-256 |
244dfdfce9056f84f66240bfde6a5b3fcad88f7685f7668654c3e45eee486ec1
|
Provenance
The following attestation bundles were made for git_wtf-0.1.0.tar.gz:
Publisher:
publish.yml on prod-ric/git_wtf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_wtf-0.1.0.tar.gz -
Subject digest:
e111ae21ea2e67e8676f14b577b2fae6ee0c2c5a2a6be1bb93d6ab044ec371d3 - Sigstore transparency entry: 1173203978
- Sigstore integration time:
-
Permalink:
prod-ric/git_wtf@1940634f02f1db450efa3ed95f5ffc6a6cbf58b7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/prod-ric
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1940634f02f1db450efa3ed95f5ffc6a6cbf58b7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file git_wtf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: git_wtf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5888453b4ff838c02130de98b9a02c3de023cde1376f8758e4ff07929125d115
|
|
| MD5 |
ba2bb961f079dab18ff965a2a0b3762e
|
|
| BLAKE2b-256 |
a7ea1d22db7e2ff08373c336b852806ea812bac1f36d510fc747f88cbeb74e7f
|
Provenance
The following attestation bundles were made for git_wtf-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on prod-ric/git_wtf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_wtf-0.1.0-py3-none-any.whl -
Subject digest:
5888453b4ff838c02130de98b9a02c3de023cde1376f8758e4ff07929125d115 - Sigstore transparency entry: 1173204114
- Sigstore integration time:
-
Permalink:
prod-ric/git_wtf@1940634f02f1db450efa3ed95f5ffc6a6cbf58b7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/prod-ric
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1940634f02f1db450efa3ed95f5ffc6a6cbf58b7 -
Trigger Event:
push
-
Statement type: