A local GitHub-like git viewer with a web UI. Browse repositories, view files with syntax highlighting and markdown rendering, compare branches, and review diffs with inline comments.
- Repository browsing — Scan a directory for
<owner>/<repo>/.gitrepos, search by name - File viewer — Syntax highlighting (shiki), markdown preview (GFM), image display, binary detection
- Diff/compare — Split and unified views, file-level navigation
- Inline review — Add comments to diff lines, range selection, edit/delete
- Copy Prompt — Export review comments as formatted text for AI agents
- Working directory changes — View unstaged/staged diffs directly
- Single binary — Frontend embedded in the Go binary, no runtime dependencies
Install with mise:
mise use -g github:hokaccha/givy@latestOr download a pre-built binary from the latest release. Pick the archive for your OS/arch, extract it, and place the givy binary somewhere on your PATH:
# Example for macOS arm64
VERSION=v0.7.0
curl -L -o givy.tar.gz "https://github.com/hokaccha/givy/releases/download/${VERSION}/givy-${VERSION}-darwin-arm64.tar.gz"
tar -xzf givy.tar.gz
sudo mv "givy-${VERSION}-darwin-arm64/givy" /usr/local/bin/Or build from source:
make build
# Binary: ./givyPoint givy at a directory containing your git repositories. Givy expects the structure <root>/<owner>/<repo>/.git:
givy serve ~/src
# Serves repos found at ~/src/<owner>/<repo>/.git
# Open http://localhost:6271Options:
| Flag | Default | Description |
|---|---|---|
--port |
6271 |
Port to listen on (env: GIVY_PORT) |
Open http://localhost:6271 in your browser. You'll see a list of all discovered repositories with incremental search.
Click a repository to open the file browser.
The file browser shows the current working directory state (not a specific git ref). Directories and files are listed with icons, and you can navigate through the tree by clicking.
Click any file to view it. Givy automatically detects the file type and renders accordingly:
- Source code — Syntax highlighted with shiki, with line numbers
- Markdown — Rendered as HTML with GFM support (tables, task lists, etc.)
- Images — Displayed inline
- Binary files — Shows file size and a download notice
The core feature of givy is reviewing diffs with inline comments, similar to GitHub's pull request review.
From the repository page, click the "View Diff" button to open the changes view. Use the branch selectors to compare any two branches.
The diff view provides:
- Split and unified views — Toggle between side-by-side and inline diff formats
- File navigation — File list sidebar for quick jumping between changed files
- Inline comments — Click the
+icon on any diff line to add a review comment - Range selection — Select multiple lines to comment on a code range
- Edit and delete — Manage your comments directly in the diff view
- Copy Prompt — Export all comments as formatted text, useful for feeding back to AI coding agents
- Clear All Comments — Remove all comments at once when starting a new review
Click the + icon in the gutter to add a comment on any line. Comments are stored in your browser's localStorage and persist across page reloads.
After writing review comments, click "Copy All Comments" to copy all comments as a structured prompt. The output includes file paths, line numbers, and your review text — ready to paste into an AI coding agent (e.g., Claude Code, Cursor, Copilot) for automated fixes.
Example output:
## internal/git/repo.go
- **Line 10** (right): The constant value of 1000 seems arbitrary. Should we make this configurable?
- **Line 16** (right): The doc comment mentions MaxRepos but the function doesn't actually enforce the limit.The changes view also supports viewing unstaged and staged changes directly, with tabs at the top:
- Unstaged — Shows uncommitted, unstaged changes (
git diff) - Staged — Shows staged changes (
git diff --cached)
Click a commit hash to see the diff for a single commit:
When comparing branches, click "View commits" to see the list of commits between the two refs:
Start the web server.
givy serve ~/src
givy serve --port 8080 ~/srcOpen a file, directory, or commit in the browser. Requires a running givy serve instance.
# Open a file
givy open ~/src/hokaccha/givy/internal/git/repo.go
# Open a directory
givy open ~/src/hokaccha/givy/internal/
# Open a commit diff
givy open abc1234Requires a running givy serve instance. The root directory is fetched from the server automatically.
Open the diff view in the browser. Requires a running givy serve instance. Run this from inside a repository directory.
# Show unstaged changes (default)
givy diff
# Show unstaged changes (explicit)
givy diff @unstaged
# Show staged changes
givy diff @staged
# Compare a specific branch against the default branch
givy diff feature/new-ui
# Explicit base...head
givy diff main...feature/new-ui| Environment Variable | Default | Description |
|---|---|---|
GIVY_PORT |
6271 |
Server port (also used by open and diff commands) |
GIVY_ROOT_DIR |
— | Default root directory for givy serve |
This project is inspired by and references the following tools:
MIT