Skip to content

uh

uh is a code review tool. It shows a diff in run order, not file order. It parses the base and head of a change with tree-sitter, resolves calls and types in both, and lays out changed code along the call graph, from entrypoints to leaves. It needs no compiler, language server or build step. It ships as one binary with the web UI embedded.

Control Flow reader in dark split view

The problem

A file-order diff sorts changes by path. You rebuild the call stack yourself: find the entrypoint, follow each call into another file, and track which changed functions call which. uh does that up front and presents the change as a path through the code.

Core ideas

Idea What it means
Execution-order diff Changed functions are ordered by the call graph, callers before callees. Mutually recursive functions collapse into one node. Unchanged functions between two changed ones become collapsible bridge edges.
Lenses Control Flow orders changes by call graph, Structure by class/struct/schema dependency order, Files by directory tree. A Graph mode shows the same change as a pan-and-zoom canvas with a side diff drawer, and Classic mode shows a flat file-order diff.
Move detection Code that moved within a file or across files is shown with its BASE and HEAD file-and-line locations instead of as deleted and added lines.
Possible edges When a call cannot be resolved to one target statically (trait, interface or virtual dispatch), it is drawn as a dashed possible edge rather than dropped or guessed.
No build needed Analysis runs offline on an unbuilt checkout. Calls into third-party code are marked as boundary edges instead of indexing dependencies.

Other features: inline peeks of any referenced definition, draft comments that copy as Markdown or post to GitHub, and an opt-in scoped AST diff (--ast-diff). See Reading the web UI.

uh takes a git range, the working tree, a patch file, or a GitHub PR or commit URL. Supported languages: Rust, Go, Java, Python, TypeScript/JavaScript, C/C++, Swift, Zig, Starlark and Protocol Buffers. See Languages.

Quick start

brew install uhvesta/tap/uh
cd /path/to/repo
uh review --open

With no target or range, uh review shows uncommitted changes, or HEAD~1..HEAD if the tree is clean. --open opens the review in your browser. The server binds to 127.0.0.1.

Other inputs use the same command:

uh review . main...HEAD --open
uh review https://github.com/owner/repo/pull/123 --open

GitHub URLs need a logged-in gh CLI. Other install methods: Install.

Live demos

Reviews of real PRs, exported with uh review --dump-html, are hosted at uh.uhvesta.com. They open in the browser with nothing to install. Examples describes each demo and how to reproduce it locally.

Docs map

Page Covers
Install Homebrew, release binaries, building from source, the gh prerequisite
Reviewing changes uh review: choosing inputs and outputs
Reading the web UI Lenses, moves, peeks, comments, possible edges, settings, shortcuts
Review queue uh queue: a persistent home page of items to review
Exploring a codebase uh explore: call graph, type graph and file tree with no diff
Graphs for tools uh graph and uh parse: JSON and binary output for scripting and CI
Languages Supported languages, what is resolved, cross-language bridges, limits
Configuration uh config keys, file locations, environment variables, caches
Agent skills uh install: skills for coding agents
Examples The live demos and local commands
CLI reference Every flag of every subcommand, exit codes, error format
Development Building, testing and releasing uh itself