SliceDiff is a local terminal UI for understanding large GitHub pull requests by turning raw file-by-file diffs into reviewable slices while keeping every grouped hunk traceable back to the original diff.
You can start it with a PR target right away, or launch it with no argument to open a welcome screen where you can browse your requested reviews or search for a repository and pick one of its open pull requests.
SliceDiff is an active prototype that is usable locally today. It is built for reviewers who already have a large pull request in front of them and want a faster way to understand how related edits fit together.
This is not a GitHub review bot, not a production collaboration platform, and not a replacement for GitHub as the final place where review decisions happen. The current focus is local navigation, understanding, and experimentation with semantic diff grouping.
- Load exactly one GitHub pull request through the GitHub CLI.
- Start with no PR target and choose from requested reviews or a manual repository search inside the app.
- Parse the unified diff into files, hunks, and line-level changes.
- Navigate the raw diff in a keyboard-first Bubbletea TUI.
- Optionally ask Codex or opencode to group hunks into semantic review slices.
- Switch between grouped slices and raw file-by-file diff order when slices are available.
- Regenerate AI slices for the current PR head SHA.
- Cache local slice results so repeated review sessions can reopen faster.
- Fall back to raw diff navigation when AI is disabled, unavailable, declined, or fails.
- It does not post review comments.
- It does not approve pull requests.
- It does not request changes.
- It does not merge, close, or otherwise mutate GitHub pull request state.
- It does not call model APIs directly.
- It does not store GitHub, Codex, opencode, or model-provider credentials in repository-managed files.
- Go
- Bubbletea
- Lipgloss
- Chroma
- GitHub CLI (
gh) - Optional Codex or opencode CLI runners for AI grouping
- Go 1.25 or newer
- GitHub CLI authenticated with access to the target PR
gh auth status
gh auth loginOptional AI runner:
codex login status
codex loginor:
opencode auth list
opencode auth loginFrom the repo root:
go run ./cmd/slicediff --no-ai olekgolus11/SliceDiff#1Supported PR target formats:
go run ./cmd/slicediff --no-ai https://github.com/owner/repo/pull/123
go run ./cmd/slicediff --no-ai owner/repo#123
go run ./cmd/slicediff --no-ai 123The plain number form must be run inside a local checkout that gh repo view can resolve.
If you do not pass a PR target, SliceDiff opens a welcome screen instead of loading a specific diff:
Requested reviewshows pull requests assigned to you.Manuallets you search repositories you can access, then choose one of that repo's open pull requests.
Use tab, left, or right to switch between the two paths, and enter to select the highlighted item.
Run with Codex grouping:
go run ./cmd/slicediff --ai-runner codex --regen-slices owner/repo#123Run with opencode grouping:
go run ./cmd/slicediff --ai-runner opencode --regen-slices owner/repo#123go build -o slicediff ./cmd/slicediff
./slicediff --no-ai owner/repo#123--ai-runner codex|opencode: override the saved AI runner for this run.--no-ai: skip AI consent, runner checks, cached slices, and agent invocation.--regen-slices: ignore cached slices and rerun the selected agent for the current PR head SHA.
tab: cycle panels.j/kor arrow keys: move selection.pgup/pgdn: scroll the focused details or hunk panel.home/end: jump to the start or end of the focused panel.enter: move deeper into the current review path.v: toggle grouped and raw views when slices are available.r: regenerate slices when AI is enabled.?: show or hide help.q: quit.
SliceDiff delegates GitHub authentication and access entirely to gh. It does not store GitHub tokens.
When AI grouping is enabled, SliceDiff delegates model authentication and model selection entirely to the selected runner. Codex and opencode own their own credentials, configuration, and provider behavior.
Before the first AI grouping request, SliceDiff asks for consent because PR metadata and diff hunks may be sent to the selected runner. If consent is declined, or if --no-ai is used, SliceDiff keeps the review local to raw diff navigation.
Local config lives at:
$(os.UserConfigDir)/slicediff/config.yamlLocal cache data lives under:
$(os.UserCacheDir)/slicediffConfig currently tracks the selected AI runner and AI consent state. Cache data may include fetched PR data and generated slice results for local reuse.
cmd/slicediff: CLI entrypoint and startup flags.internal/github: PR target parsing andghintegration.internal/diff: unified diff parsing and diff data types.internal/agent: runner checks, prompt generation, subprocess execution, and slice validation.internal/config: local config and cache handling.internal/tui: Bubbletea model, update loop, view rendering, styles, and tests.
The app keeps main.go thin and pushes behavior into package-level code so the raw diff path remains usable even when AI grouping is unavailable.
- Add real screenshots or a terminal demo once the TUI has a polished public capture.
- Provide installable builds or releases instead of requiring
go run. - Improve grouped slice navigation and explanation quality.
- Harden Codex and opencode runner behavior across CLI version changes.
- Add clearer controls for resetting runner choice, consent, and local cache data.
SliceDiff is shared publicly for visibility, local experimentation, and feedback on the idea of semantic PR navigation. It should be read as a polished prototype, not as a finished product or a hosted review service.