{
  "markdown": "<p align=\"center\">\n  <img src=\"assets/logo.svg\" alt=\"GitWand\" width=\"300\" height=\"120\">\n</p>\n\n<h1 align=\"center\">GitWand</h1>\n\n<p align=\"center\">\n  <strong>A fast, native Git client with built-in smart conflict resolution</strong>\n</p>\n\n<p align=\"center\">\n  <a href=\"#desktop-app\">Desktop</a> &bull;\n  <a href=\"#conflict-resolution-engine\">Conflict engine</a> &bull;\n  <a href=\"#cli\">CLI</a> &bull;\n  <a href=\"#mcp-server\">MCP Server</a> &bull;\n  <a href=\"#architecture\">Architecture</a> &bull;\n  <a href=\"./ROADMAP.md\">Roadmap</a> &bull;\n  <a href=\"#code-signing-policy\">Code signing</a>\n</p>\n\n<p align=\"center\">\n  <img alt=\"License\" src=\"https://img.shields.io/badge/license-MIT-8B5CF6\">\n  <img alt=\"TypeScript\" src=\"https://img.shields.io/badge/TypeScript-100%25-3178C6\">\n  <img alt=\"Version\" src=\"https://img.shields.io/badge/version-3.9.1-22c55e\">\n</p>\n<p align=\"center\">\n  <a href=\"https://github.com/sponsors/devlint\">\n    <img alt=\"Github Sponsor\" src=\"https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86\">\n  </a>\n</p>\n---\n\nGitWand is a lightweight, native Git client built with Tauri 2 and Vue 3. It covers the full daily workflow — changes, history, branches, push/pull — and goes further with **automatic resolution of trivial merge conflicts**, **integrated PR code review** with inline comments, and a **Git Tree** as the primary history view. Since v1.3, AI assists every step of the workflow — branch naming, PR writing, hunk-level review, semantic squash, and natural-language commit search. v2.7+ adds multi-repo Workspaces and Worktrees; v2.8 adds Agent Sessions (MCP); v2.9 adds a cross-repo Launchpad; v2.10 brings multi-forge pull requests across **GitHub, GitLab, Bitbucket and Azure DevOps**; v2.13 adds inline AI code review; v2.18 overlays CI check annotations directly on the diff; v2.19 adds **OAuth device-flow sign-in for GitHub and Azure DevOps** (no `gh` CLI required) plus **cross-fork pull requests**. The 3.x line makes GitWand a daily driver for AI-assisted work: v3.0 turns the cross-repo dashboard into **Today**, a triaged action inbox, and publishes the **VS Code extension on the Marketplace**; v3.2 adds an **integrated terminal with AI agent tabs** — including one-click AI tasks in isolated worktrees — and a dockable **File Explorer / Editor panel**.\n\n## Desktop app\n\n### Git Tree\n\nThe **Git Tree** is the primary history view — a full-resolution DAG that renders the branch topology as an SVG with trunk-pinning, lane cooldowns, WIP node, and ref badges. Click any commit to see its diff; right-click to checkout, reset, branch, tag, or cherry-pick. Branches, stashes, and tags are all managed from here without a separate panel. A **filter mode** (v3.2) recalculates the DAG to show only matching commits, with quick branch/author toggles, date-bucket separators, branch-name autocomplete, and `#<PR number>` lookup that resolves straight to the PR's branch.\n\n### Repository view\n\nStaged, unstaged, untracked, and conflicted files in a sidebar with inline diffs in the main area. Stage, unstage, discard, and commit without leaving the interface. Partial staging at the line or hunk level.\n\n### Commit workflow\n\nSummary + description fields, optional commit signature, Ctrl+Enter shortcut. **Unpushed commits can be amended** directly from the Git Tree — a pencil icon appears on hover, opening an overlay pre-filled with the existing message.\n\n### Branches\n\nClick the branch name in the header to search, switch, create, or delete branches. Merge any branch from the dedicated merge button. Each non-current branch shows a **merge preview button** that simulates the merge result before committing.\n\n### Merge preview\n\nBefore merging a branch, GitWand predicts the outcome without touching the working tree — using `git merge-base`, `git show`, and `git merge-file -p --diff3`. The result shows a per-file breakdown:\n\n- **Auto-resolvable** — GitWand can handle it automatically\n- **Partial** — some hunks need manual resolution\n- **Manual** — complex conflicts requiring human judgment\n- **Add/delete** — file added on one side, deleted on the other\n\nA badge summarises the overall result: `Clean merge`, `100% auto-resolvable`, or `N conflicts to review`.\n\n### Push & Pull\n\nOne-click push and pull with badge counters showing ahead/behind commits. Auto-fetch runs in the background every 30 seconds.\n\n### Diff viewer\n\nSide-by-side or inline toggle, persisted across sessions. Syntax highlighting for 30+ languages, word-level diff using LCS, collapsible unchanged regions, canvas minimap, hunk navigation (prev/next), double-column line numbers.\n\n### File history & blame\n\nFull file history with `git log --follow`, blame view grouped by commit, time-travel diff between any two versions of a file.\n\n### Repo switcher & Workspaces\n\nThe current repo name in the header opens a dropdown showing recently opened repositories. Pin favourites, switch instantly — no file picker needed. **Workspaces** (v2.7) group multiple repos into a single dashboard with cross-repo status, coordinated push/pull, and quick-create worktrees (`⌘⇧N`). Each project tab carries a **worktree submenu** (v3.2) listing `main` plus every worktree — select one to switch that project's checkout in place, no extra tab.\n\n### Today\n\n**Today** (`⌘L`; introduced as Launchpad in v2.9, reworked in v3.0) is a cross-repo **triaged action inbox**: everything in flight — WIP, PRs, Issues, Team — sorted into urgency tiers, each row carrying a state-aware primary action (Merge · Review · Resolve · Reply · See failure). Pin or snooze any item; the Team tab loads lazily for performance on large workspaces.\n\n### Pull Requests & Code Review\n\nBrowse, create, checkout, and merge pull/merge requests across **GitHub, GitLab, Bitbucket and Azure DevOps** without leaving the app. GitWand auto-detects the forge from the remote and routes to the right provider; accounts are managed once in Settings. The PR list sits in the sidebar and the full detail — diff, CI checks, comments, inline review — fills the main area.\n\n- **Sign in with OAuth** — \"Sign in with GitHub\" and \"Sign in with Azure DevOps\" use the OAuth device flow; tokens are stored in the OS keychain and the GitHub PR workflow runs tokenless over the REST API, with **no `gh` CLI required** (the CLI path still works when no token is configured)\n- **Cross-fork pull requests** — when `origin` is a fork, open a PR straight against the upstream parent (default), and see the PRs you opened upstream listed alongside your fork's own\n- **Inline comments** — read and write review comments anchored to diff lines, with full threading and code suggestions (` ```suggestion ``` ` blocks applicable in one click)\n- **Inline CI check annotations** — failed-check annotations overlay the diff with gutter icons (❌/⚠/ℹ) and hover tooltips, with a per-file count in the sidebar (GitHub, GitLab and Bitbucket)\n- **Review submission** — Approve / Request changes / Comment, with a draft queue to accumulate comments before sending\n- **🧠 Intelligence panel** — conflict prediction (`git merge-tree` before merging), hotspot analysis, review scope, static AI suggestions, file review history\n\n### Agent Sessions\n\nThe **Agents panel** (v2.8) shows active MCP sessions and lets you launch Claude Code directly from GitWand — the agent's changes appear live in the diff viewer. The MCP catalog (`Settings > MCP`) lets you install any MCP server in one click.\n\n### Integrated terminal & AI tasks\n\nThe **terminal panel** (v3.2) renders through WebGL with inline search (`Ctrl+F`), clickable links, and typed tabs — `shell`, `claude`, `codex` — each with its own icon and an unread-output dot. \"Launch Claude Code\" / \"Launch Codex\" open a real PTY tab, and **\"New AI task\"** creates a scratch git worktree and opens a Claude Code tab in it in one click — the agent works in isolation, and when it's done you either **merge the work back or delete the worktree** from the project tab's submenu. Hardened with a shell-executable whitelist, `safe_repo_path()` on all filesystem operations, and PTY orphan prevention.\n\n### File Explorer / Editor\n\nA dockable **Files panel** (v3.2, drag/resize/fullscreen) lists the full repo tree — gitignore-aware, via `git ls-files` — and opens files in a lazy-loaded CodeMirror 6 editor with syntax highlighting, per-tab undo history, and a lock/undo/save toolbar. Reachable from the Files tile in the AppDock, with per-repo layout settings.\n\n### Settings\n\nLanguage (English, French, Spanish, Brazilian Portuguese, Simplified Chinese — OS auto-detected), theme (dark/light/system), commit signature, diff mode, external editor, Git binary path, and switch behavior (stash/ask/refuse). **AI providers** cover API backends (Claude / OpenAI-compatible / Ollama) and local CLI agents (Claude Code, Codex, opencode, GitHub Copilot CLI), each with its own model picker. **Accounts** manages forge sign-in — OAuth device flow for GitHub and Azure DevOps, App Passwords / CLI for the others. All persisted in app settings.\n\n### Installing\n\nDownload the latest build for your platform from [GitHub Releases](https://github.com/devlint/GitWand/releases):\n\n- **macOS** — `.dmg` (Universal: Apple Silicon + Intel, Developer ID signed + Apple-notarized)\n- **Linux** — `.AppImage` or `.deb`\n- **Windows** — `.msi` or `.exe`\n\nOn Windows, you can also install via [winget](https://learn.microsoft.com/windows/package-manager/):\n\n```bash\nwinget install Devlint.GitWand\n```\n\n### Running from source\n\n```bash\ngit clone https://github.com/devlint/GitWand.git\ncd GitWand\npnpm install\n\n# Browser dev mode — no Rust needed\ncd apps/desktop && pnpm dev:web\n\n# Tauri desktop mode — requires Rust toolchain\n# Install Rust: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\nsource \"$HOME/.cargo/env\"\n\n# Desktop Dev Build (In the apps/desktop/ folder)\npnpm --filter desktop tauri dev\n\n# On linux you may have to run\nWEBKIT_DISABLE_COMPOSITING_MODE=1 pnpm --filter desktop tauri dev\n```\n\n---\n\n## Conflict resolution engine\n\nGitWand's core engine (`@gitwand/core`) automatically resolves trivial Git merge conflicts. It never touches complex or ambiguous hunks.\n\n### Resolution patterns\n\nGitWand uses a **pattern registry** — the classifier evaluates patterns in priority order, each declaring whether it requires diff3 (base available), diff2, or works on both.\n\nThe registry holds **12 patterns**, of which **8 auto-apply**. The other four either propose a resolution you confirm, are opt-in, or hand the hunk back untouched.\n\n| Pattern | Priority | Auto-applies | Description | Typical confidence |\n|---|---|---|---|---|\n| **same_change** | 10 | Yes | Both branches made the exact same edit | Certain |\n| **delete_no_change** | 20 | Yes | One side deleted the block, the other left it untouched | Certain |\n| **one_side_change** | 30 | Yes | Only one branch modified the block | Certain |\n| **non_overlapping** | 40 | Yes | Additions at different locations in the block | High |\n| **whitespace_only** | 50 | Yes | Same logic, different indentation/spacing | High |\n| **reorder_only** | 55 | Yes | Same lines, different order, a pure permutation | High |\n| **insertion_at_boundary** | 57 | Yes | Pure insertions on both sides, base intact | High |\n| **value_only_change** | 60 | Yes | Both sides changed the same scalar (version, hash, timestamp) | High to medium |\n| **token_level_merge** | 65 | No, proposes | Disjoint token edits on the same line, merged into a proposal you confirm | Medium |\n| **refactoring_aware_merge** | 970 | No, opt-in | Rename or move detected and replayed across the conflict | High |\n| **llm_proposed** | 998 | No, opt-in | Model-proposed resolution, validated post-merge | Medium |\n| **complex** | 999 | No | Overlapping edits, always surfaced with a full trace | Low |\n\nThe confidence column is indicative: every hunk carries a computed `ConfidenceScore` (see below), not a fixed label. `value_only_change`, for instance, scores on the ratio of volatile tokens to total tokens and rejects the hunk outright below its threshold.\n\n**Not a registry pattern:** `generated_file` is a separate reclassification pass that runs after classification. When a hunk's path matches a generated-file glob (lockfiles, bundles, `dist/`, plus anything in `generatedFiles`), the resolver rewrites it to `generated_file` and, by default, declines with an actionable reason rather than guessing — [measured on 1,662 real merges](https://github.com/devlint/GitWand/tree/main/benchmark), auto-merging generated files diverged from what teams actually shipped in almost every case. GitWand tells you to resolve the source file and re-run the installer/build instead. Opt back into the old accept-theirs/semantic-merge behavior with `.gitwandrc`'s `resolveGeneratedFiles: true` or `gitwand resolve --resolve-generated`. `generated_file` appears in `ConflictType` but never in the classifier registry.\n\n### Composite confidence score\n\nEvery resolution carries a `ConfidenceScore` object rather than a simple label:\n\n```ts\n{\n  score: 84,           // 0–100 composite score\n  label: \"high\",       // \"certain\" | \"high\" | \"medium\" | \"low\"\n  dimensions: {\n    typeClassification: 90,  // certainty of the detected pattern\n    dataRisk: 20,            // risk of data loss if auto-resolved\n    scopeImpact: 10,         // impact of change size\n  },\n  boosters: [\"Path matches generated-file pattern: lockfile\"],\n  penalties: [\"Content will be regenerated — theirs assumed more recent\"],\n}\n```\n\n(Shape shown for a `generated_file` hunk with `resolveGeneratedFiles: true` — the default is to decline generated files rather than score and apply them; see the pattern table above.)\n\nScore formula: `score = typeClassification − dataRisk×0.4 − scopeImpact×0.15`\n\n### Format-aware resolvers\n\nFor structured files, GitWand uses semantic resolvers before falling back to text matching:\n\n- **JSON / JSONC** — recursive key-by-key merge using `JSON.parse`/`JSON.stringify`. Handles nested objects, detects unresolvable scalar conflicts, strips comments in `.jsonc`.\n- **Markdown** — section-aware merge by ATX heading (H1–H6). Merges independent sections, falls back to text if the same section is modified on both sides.\n\n### Configurable merge policies\n\nCreate a `.gitwandrc` file at the project root to define resolution strategies:\n\n```json\n{\n  \"policy\": \"prefer-merge\",\n  \"patternOverrides\": {\n    \"*.lock\": \"prefer-theirs\",\n    \"src/generated/**\": \"prefer-theirs\",\n    \"CHANGELOG.md\": \"prefer-ours\"\n  }\n}\n```\n\nAvailable policies: `prefer-ours`, `prefer-theirs`, `prefer-safety`, `prefer-merge`, `strict`.\n\n### Decision trace\n\nEvery classification step is logged in a `DecisionTrace` for auditing and debugging:\n\n```\n✓ src/config.ts — 3/3 resolved\n  L12 [one_side_change] certain — Only the incoming branch modified this block.\n  L25 [same_change] certain — Both branches made the exact same edit.\n  L41 [value_only_change:json] high — Scalar value updated on one side (version field).\n```\n\n---\n\n## CLI\n\n[![npm](https://img.shields.io/npm/v/@gitwand/cli?color=22c55e&label=%40gitwand%2Fcli)](https://www.npmjs.com/package/@gitwand/cli)\n\n```bash\n# Use directly with npx\nnpx @gitwand/cli resolve\n\n# Or install globally\nnpm install -g @gitwand/cli\n```\n\n```bash\ngitwand resolve              # Resolve all conflicted files in the repo\ngitwand resolve --dry-run    # Preview without writing\ngitwand resolve --verbose    # Detailed decision trace\ngitwand status               # Show conflict status per file\ngitwand resolve --ci         # CI mode: JSON output + semantic exit codes\n```\n\n### Enriched JSON output\n\nThe `--ci` / `--json` flag returns a full structured report with composite confidence scores, decision traces, and pending hunks for LLM-assisted resolution:\n\n```json\n{\n  \"version\": \"0.1.0\",\n  \"timestamp\": \"2026-04-14T12:00:00.000Z\",\n  \"summary\": {\n    \"files\": 2,\n    \"totalConflicts\": 5,\n    \"autoResolved\": 4,\n    \"remaining\": 1,\n    \"allResolved\": false\n  },\n  \"files\": [\n    {\n      \"path\": \"src/config.ts\",\n      \"totalConflicts\": 3,\n      \"autoResolved\": 3,\n      \"remaining\": 0,\n      \"validation\": {\n        \"isValid\": true,\n        \"hasResidualMarkers\": false,\n        \"syntaxError\": null\n      },\n      \"resolutions\": [\n        {\n          \"line\": 15,\n          \"type\": \"one_side_change\",\n          \"resolved\": true,\n          \"explanation\": \"Only one side modified this block\",\n          \"confidence\": {\n            \"score\": 95,\n            \"label\": \"certain\",\n            \"typeClassification\": 100,\n            \"dataRisk\": 5,\n            \"scopeImpact\": 10\n          },\n          \"trace\": {\n            \"selected\": \"theirs\",\n            \"hasBase\": true,\n            \"summary\": \"One-side change detected — incoming accepted.\",\n            \"steps\": [\"...\"]\n          }\n        }\n      ],\n      \"pendingHunks\": []\n    }\n  ]\n}\n```\n\nThe `pendingHunks` array gives AI agents and CI scripts everything they need to handle the conflicts that GitWand can't auto-resolve — the ours/theirs/base content, the classification trace, and the confidence breakdown.\n\n---\n\n## MCP Server\n\n[![npm](https://img.shields.io/npm/v/@gitwand/mcp?color=22c55e&label=%40gitwand%2Fmcp)](https://www.npmjs.com/package/@gitwand/mcp)\n[![MCP Registry](https://img.shields.io/badge/MCP%20Registry-listed-22c55e)](https://registry.modelcontextprotocol.io/?search=gitwand)\n\nGitWand ships an MCP (Model Context Protocol) server that exposes its conflict resolution engine to AI agents — Claude Code, Claude Desktop, Cursor, Windsurf, and any MCP-compatible client.\n\n### Setup\n\nAdd this to your MCP client configuration (e.g. `claude_desktop_config.json` or `.claude/settings.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"gitwand\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@gitwand/mcp\"]\n    }\n  }\n}\n```\n\nThe server defaults to the working directory of the client. To pin it to a specific repo, add `\"--cwd\", \"/absolute/path/to/repo\"` to the `args` array. With Claude Code, install in one line:\n\n```bash\nclaude mcp add gitwand -- npx -y @gitwand/mcp\n```\n\n### Tools\n\n| Tool | Description |\n|------|-------------|\n| `gitwand_status` | List conflicted files with their complexity and auto-resolvability |\n| `gitwand_resolve_conflicts` | Auto-resolve trivial conflicts, return DecisionTrace + pendingHunks |\n| `gitwand_preview_merge` | Dry-run resolution — stats and risk assessment without writing files |\n| `gitwand_explain_hunk` | Explain why a specific hunk was classified its type (full trace + context) |\n| `gitwand_apply_resolution` | Apply a custom (LLM-provided) resolution to a specific complex hunk |\n| `gitwand_resolve_hunk` | Ask the connected agent to propose a resolution for one pending hunk (ours/theirs/base + trace returned) |\n| `gitwand_resolve_hunk_llm` | Validate an LLM-proposed resolution through the post-merge gate, then apply it to disk |\n\n### Resources\n\n| URI | Description |\n|-----|-------------|\n| `gitwand://repo/conflicts` | Current conflict state — files, counts, types |\n| `gitwand://repo/policy` | Active `.gitwandrc` configuration |\n| `gitwand://hunk/{file}/{line}` | Raw hunk content for a specific conflict |\n\n### The human ↔ LLM collaboration loop\n\nThe MCP server enables a powerful workflow where GitWand handles the trivial conflicts automatically and the LLM tackles the complex ones:\n\n1. **LLM calls `gitwand_preview_merge`** — sees how many conflicts exist and how many GitWand can handle\n2. **LLM calls `gitwand_resolve_conflicts`** — GitWand auto-resolves the easy ones, returns `pendingHunks` for the rest\n3. **LLM reads the `pendingHunks`** — each one contains ours/theirs/base content and a full decision trace\n4. **LLM calls `gitwand_apply_resolution`** for each pending hunk — writes its resolution directly\n\n### Claude Code slash commands\n\nGitWand also ships `.claude/commands/` for Claude Code:\n\n```bash\n/resolve   # Full conflict resolution workflow\n/preview   # Merge preview and risk assessment\n```\n\n---\n\n## Architecture\n\n```\ngitwand/\n├── packages/\n│   ├── core/       @gitwand/core — Resolution engine (TypeScript, browser-safe)\n│   │               parser, resolver, classifier, format resolvers,\n│   │               confidence scoring, tree-sitter structural dispatch\n│   ├── cli/        @gitwand/cli — Command-line interface\n│   ├── mcp/        @gitwand/mcp — MCP server (stdio transport)\n│   │               tools (7), resources (3), Claude Code commands\n│   └── vscode/     VS Code extension — CodeLens, diagnostics, status bar\n├── apps/\n│   └── desktop/    Tauri 2 + Vue 3 desktop app\n│                   src-tauri/  Rust backend (git commands, IPC, libgit2)\n│                   src/        Vue frontend (stores, composables, panels)\n└── .claude/\n    └── commands/   Claude Code slash commands (/resolve, /preview)\n```\n\nThe core engine is framework-agnostic and usable as a library:\n\n```ts\nimport { resolve } from \"@gitwand/core\";\n\nconst result = resolve(conflictedContent, \"src/app.ts\");\nconsole.log(`${result.stats.autoResolved}/${result.stats.totalConflicts} resolved`);\n\n// With options\nconst result = resolve(content, \"package.json\", {\n  policy: \"prefer-merge\",\n  minConfidence: \"medium\",\n  patternOverrides: { \"*.lock\": \"prefer-theirs\" },\n});\n```\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/devlint/GitWand.git\ncd GitWand\npnpm install\npnpm build          # Build all packages\npnpm test           # Tests across all workspaces\n```\n\n### Running benchmarks\n\n```bash\ncd packages/core\npnpm test:bench     # vitest bench — ops/s per fixture size\n```\n\nBaseline results on Apple M-series:\n\n| Input | Throughput |\n|---|---|\n| 1 conflict / ~30 lines | ~249 000 ops/s |\n| 5 conflicts / ~140 lines | ~40 000 ops/s |\n| 50 conflicts / ~1350 lines | ~4 500 ops/s |\n| JSON/Markdown format-aware | ~137 000 ops/s |\n\n### Internationalization\n\nGitWand uses a zero-dependency type-safe i18n system across five languages — English (`en`, default), French (`fr`), Spanish (`es`), Brazilian Portuguese (`pt-BR`), and Simplified Chinese (`zh-CN`). `en.ts` is the canonical reference, defined with `as const`; the `Locale` and `LocaleKey` types are derived from it, so every other locale must match its structure — TypeScript enforces it. The `useI18n()` composable provides `t(key, ...args)` with dotted key resolution and positional interpolation. OS language is auto-detected; users can override in Settings.\n\n---\n\n## Roadmap\n\nSee [ROADMAP.md](./ROADMAP.md) for the full phased plan — upcoming features, competitive analysis, and shipped version history.\n\n---\n\n## Code signing policy\n\nWindows builds of GitWand are code-signed. Free code signing provided by [SignPath.io](https://about.signpath.io), certificate by [SignPath Foundation](https://signpath.org).\n\n| Role | Member |\n|------|--------|\n| Committers / Reviewers | [Laurent Guitton](https://github.com/devlint) |\n| Approvers | [Laurent Guitton](https://github.com/devlint) |\n\nThis program will not transfer any information to other networked systems unless specifically requested by the user.\n\n---\n\n## License\n\nMIT — [Laurent Guitton](https://github.com/devlint)\n",
  "bytes": 23070,
  "sha": "c60e65968a16020bf5ee608f48b213eb9c08db621c6fb5dd4a3264fd55d11fa3",
  "repo_slug": "devlint/gitwand",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_devlint_gitwand_c3461899/readme"
}