Skip to content

chronologos/lightjj

Repository files navigation

lightjj

A fast, powerful, single-binary Jujutsu client.

lightjj screenshot

Why

A fast, powerful UI for Jujutsu VCS didn't exist, so I built one! In addition to the things you might expect, lightjj has the following cool features:

  • Includes a real merge tool with a 3-pane editor
  • Smart divergence resolution
  • File history
  • Review diffs with markdown preview, annotate lines with severity and comments, export to agent prompt, repeat
  • Open markdown as a live document — WYSIWYG editing, range-anchored comments, agents post suggestions you accept inline
  • Works everywhere — locally, over SSH, or port-forwarded
  • Multi-repo, multi-workspace support

Core Features

  • Revision graph — SVG DAG, working-copy @ indicator, immutable markers, bookmark badges with PR status
  • Diff viewer — unified/split, Lezer syntax highlighting, word-level diffs, context expansion, conflict A/B labels, open-in-$EDITOR
  • Bookmarks panel (2) — sync state at a glance: ahead/behind/diverged/conflict, PR badges, staleness. d/f/t for delete/forget/track, per-remote visibility toggles
  • Inline rebase — pick source (-r/-s/-b) and target (onto/after/before) modes, cursor to destination, Enter
  • Multi-select — batch abandon, squash, rebase across revisions with Space
  • Op log & evolog — full operation history with undo/restore, per-revision evolution with inter-diffs
  • File history — right-click any diff line, two-cursor compare (j/k + Space to pin), scoped to mutable for speed
  • Inline annotations — per-line review comments keyed by change_id; auto-re-anchor on rewrite; export markdown/JSON
  • Doc mode — open any .md as a ProseMirror document (Doc button in the file header). View/Edit toggle, mermaid blocks render with a per-block source toggle, content-addressed comments that survive edits. Coding agents can POST suggestions and steer your view (/api/navigate) over plain HTTP. Accept/Reject inline; Save commits back to @ with stale-detection.
  • Agent CLIlightjj api METHOD PATH [BODY] makes the same HTTP request your browser does, from the same binary. Auto-discovers the running instance by repo dir (no port-hunting), validates the destination is loopback, sets Content-Type correctly. Built for harnesses that denylist curl. lightjj sessions lists running instances; lightjj api GET /tab/0/api/agent returns the API contract. lightjj skill install drops a SKILL.md into ~/.claude/skills/lightjj/ so Claude Code (and similar harnesses) discover the API automatically — no copy-pasting hints. See docs/design-notes/api-cli.md.
  • Stale-WC detection — concurrent CLI op left the working copy stale? Warning bar with one-click recovery
  • Themes — 7 hand-tuned builtins + 486 derived from Ghostty's palette set; t toggles dark/light, full picker in Cmd+K

Install & Usage

One-line install (macOS & Linux):

curl -fsSL https://raw.githubusercontent.com/chronologos/lightjj/main/install.sh | sh

Release binaries are signed via SLSA build provenance (Sigstore-backed, no personal keys) and built with -trimpath for reproducibility. Verify any download with:

gh attestation verify lightjj-macos-arm64 --repo chronologos/lightjj

Building from source (requires Go 1.25+ — older toolchains auto-fetch it via GOTOOLCHAIN — and pnpm):

git clone https://github.com/chronologos/lightjj
cd lightjj/frontend && pnpm install && pnpm run build
cd .. && go build -tags embed ./cmd/lightjj

The embed build tag bundles the frontend into the binary. Bare go install github.com/chronologos/lightjj/cmd/lightjj@latest works but produces a binary without the frontend (it serves a help page pointing back here) — the Go module proxy has no pnpm to run the frontend build.

Run:

lightjj                            # serve current repo, open browser
lightjj -R /path/to/repo           # explicit repo path
lightjj --addr localhost:8080      # custom listen address
lightjj --no-browser               # don't auto-open browser

Agent integration — point a coding agent at the running instance:

lightjj skill install              # install ~/.claude/skills/lightjj/SKILL.md (one-time)
lightjj sessions                   # list running instances
lightjj api GET /tab/0/api/agent   # the API contract — what an agent reads first

lightjj skill install teaches Claude Code (and any harness that scans ~/.claude/skills/) about the API automatically. Without it, click the Agent hint button in doc-mode and paste the snippet into your agent. lightjj skill (no args) prints the SKILL.md to stdout so you can vendor it into a project's .claude/skills/.

Remote repos — run on the remote and port-forward, or use SSH proxy mode:

# Port-forward
ssh -L 3001:localhost:3001 user@host \
  "lightjj -R /path/to/repo --addr localhost:3001 --no-browser"

# SSH proxy mode
lightjj --remote user@host:/path

SSH proxy mode adds ~400ms per command (reduce to ~20ms with ControlMaster). Auto-refresh polls on --snapshot-interval (default 5s), snapshotting the remote working copy automatically.

Updating: re-run the install command. Check your version with lightjj --version.

Roadmap

Theme
1.0 Ship-ready core done
2.0 Code editing & review Mega-file virtualization, cross-revision search, N-way conflict resolution, LSP-in-FileEditor
3.0 Agentic Doc-mode unread badges, annotations as a library, MCP server mode

Requirements

  • jj >= 0.39
  • Go 1.25+ — only if building from source (older toolchains auto-fetch it via GOTOOLCHAIN)
  • gh (optional) — for PR badges; must be authed wherever the repo lives

Development

# Two terminals:
go run ./cmd/lightjj --addr localhost:3000 --no-browser   # backend
cd frontend && pnpm run dev                                # frontend (Vite HMR)

# Tests
go test ./...              # Go
cd frontend && pnpm test   # Vitest

See docs/ARCHITECTURE.md for system design and docs/CONFIG.md for configuration.

Upstream

Core command builder patterns ported from jjui.

About

Lightning-fast JJ UI

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors