How to set up the toolchain, run Git Diff Review locally, and work in the monorepo. For the product overview and install instructions, see the README. For packaging and releases, see distribution.md.
- macOS
- Git
- Go
- Node.js with Corepack
- pnpm
10.33.0
Enable pnpm through Corepack if needed:
corepack enable
corepack prepare pnpm@10.33.0 --activateFrom the repository root:
pnpm install
pnpm build
pnpm --filter ui startpnpm devThe dev command starts the Vite renderer, compiles Electron, starts the Go backend, waits for the local socket API, and launches Electron.
The Electron app normally starts the backend automatically. To inspect the backend directly:
cd packages/api
go run ./cmd help
go run ./cmd serve-http --socket /tmp/git-diff.sockTo point the Electron app at an already-running backend, set API_BRIDGE_SOCKET
to the socket path before launching it.
pnpm build
pnpm test
pnpm lint
pnpm format:check
pnpm checkUseful package-level commands:
pnpm --filter ui build
pnpm --filter ui test
pnpm --filter ui dev
go test ./packages/api/...Format changed sources (Go + TS/Vue):
pnpm format # or: make formatTo format the entire repo, use pnpm format-all (make format-all). Run the
formatter after each change so commits stay clean.
Review sessions, comments, events, and preferences are local. By default the Go backend stores the review database under:
~/Library/Application Support/git-diff/reviews.sqlite3
Viewed-file state is stored by the renderer per repository root.
Releases are built with Electron Forge. Tag a version to cut a release in CI:
git tag v0.1.1 && git push origin v0.1.1The Release workflow builds the unsigned macOS arm64 .dmg + .zip, publishes
a GitHub Release, and opens a Homebrew cask bump PR against oullin/homebrew-tap
on final (non-prerelease) tags.
To build the same artifacts locally:
pnpm release:mac:unsigned # builds the Go API + renderer, then `electron-forge make`The Electron package is configured (in packages/ui/forge.config.ts) with:
- app id:
io.gocanto.git-diff - product name:
Git Diff Review - GitHub release target:
oullin/git-diff
See distribution.md for the full signing, notarization, and Homebrew release flow.