A local PR diff viewer — preview your changes before pushing, with a GitHub-like interface and inline AI-assisted editing.
- File tree with staged/unstaged changes
- Side-by-side or unified diff view
- Stage/unstage individual files from the diff view
- Inline AI prompts: annotate any diff line to request a code change
- Remembers the last opened repository
- GitHub-style dark theme
- Fast — uses native git operations via libgit2
- Rust 1.77+ — rustup.rs
- Node.js 18+
Linux only — install WebKit and GTK dependencies:
sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev-
Install Rust via rustup.rs if you haven't already:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install Node.js 18+ via nvm or nodejs.org.
-
Clone and run:
git clone https://github.com/jlien/gitpeek.git cd gitpeek npm install npm run tauri devThe first run compiles all Rust dependencies and takes a few minutes. Subsequent runs are much faster.
-
To build a distributable
.app:npm run tauri build
The
.appbundle will be insrc-tauri/target/release/bundle/macos/.
Note: macOS may show a "cannot be opened because the developer cannot be verified" warning for release builds since the app is unsigned. To bypass it, right-click the
.appand choose Open, or runxattr -dr com.apple.quarantine GitPeek.app.
Linux:
sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
git clone https://github.com/jlien/gitpeek.git
cd gitpeek
npm install
npm run tauri devWindows: Install Rust and Node.js, then run npm install && npm run tauri dev. No additional system dependencies are required.
npm run tauri buildThe compiled app will be in src-tauri/target/release/bundle/.
- Launch GitPeek — it auto-detects the git repo in the current working directory, or reopens the last used repo.
- Click the folder icon in the header to open a different repository.
- Click any file in the sidebar to view its diff.
- Use + / − buttons on each file to stage or unstage it.
- Toggle Split / Unified view in the diff header.
GitPeek can invoke a coding assistant (Claude Code, Codex, or any compatible CLI) to apply changes directly to your files based on inline prompts.
- Click the ⚙ gear icon in the header to open Assistant Settings.
- Configure your assistant:
| Field | Description |
|---|---|
| Assistant | Preset for Claude Code, Codex, or Custom |
| Command | The CLI binary to run (e.g. claude, codex) |
| Prompt flag | Flag placed before the prompt argument (e.g. -p). Leave blank if the prompt is positional. |
| Extra flags | Additional flags passed before the prompt flag (e.g. permission/tool flags) |
- Click Save.
| Assistant | Command | Extra flags |
|---|---|---|
| Claude Code | claude |
--dangerously-skip-permissions |
| Codex | codex |
(none) |
The full invocation is: <command> [extra flags] [prompt flag] "<prompt>", run from the repository root.
- Hover over any diff line — a comment bubble (💬) appears in the left gutter.
- Click it to open an inline prompt input.
- Type a description of the change you want (e.g. "extract this into a helper function").
- Press Apply or ⌘↵ / Ctrl↵.
GitPeek sends the assistant your prompt plus the surrounding diff context, runs the command in the repository root, then refreshes the diff automatically. The Assistant Output panel on the right shows the full command, exit code, and stdout/stderr for every run.
Set Assistant to Custom and provide any command that accepts a prompt as a string argument. For example, a wrapper script:
#!/bin/bash
# my-ai.sh — writes changes to disk, then exits 0
my-ai-tool --apply "$1"Configure Command as ./my-ai.sh with no prompt flag (positional argument).
Settings are stored in ~/.config/gitpeek/config.json:
{
"assistant_type": "claude-code",
"command": "claude",
"prompt_flag": "-p",
"extra_args": "--dangerously-skip-permissions"
}Contributions are welcome. Please open an issue before starting work on a large change so we can discuss the approach.
git clone https://github.com/jlien/gitpeek.git
cd gitpeek
npm installRun in development mode (hot-reload for the frontend, Rust recompiles on change):
npm run tauri devsrc/ Svelte frontend
lib/
Header.svelte Top bar with repo info and actions
FileTree.svelte Sidebar file list with stage/unstage
DiffViewer.svelte Diff rendering (unified + split) with inline prompts
AssistantConfig.svelte Assistant settings modal
AssistantOutput.svelte Output panel for assistant runs
src-tauri/src/main.rs Rust backend — all git operations and assistant invocation
All git operations go through git2 (libgit2 bindings). The frontend communicates with the backend exclusively via Tauri's typed invoke() IPC — there are no direct filesystem or process calls from the frontend.
- Fork the repository and create a branch from
main. - Make your changes. Keep commits focused — one logical change per commit.
- Test the dev build with
npm run tauri devand a release build withnpm run tauri build. - Open a pull request against
mainwith a clear description of what changed and why.
For bug reports, please include:
- GitPeek version (or commit hash)
- OS and distribution
- Steps to reproduce
- If using the AI assistant feature, the contents of the Assistant Output panel
- Frontend: Svelte 4 + TypeScript + Vite
- Backend: Rust + Tauri 2 + git2 (libgit2)
- Styling: Custom CSS (GitHub dark theme)
MIT — see LICENSE.