@bstncartwright/glimpse
v0.1.4
Published
full-screen terminal diff review for bun-powered terminals
Maintainers
Readme
glimpse
full-screen terminal diff review, built with bun and opentui.
glimpse opens a git diff in a keyboard-native terminal ui with file tabs, side-by-side or stacked diff layouts, hunk navigation, word wrap, inline highlights, and syntax coloring for common languages.
when you run glimpse outside a git worktree, it scans the directories below the current folder for git repos. if it finds 1-5 repos, it opens their diffs together with repo-prefixed file tabs; if it finds more than 5, it asks before loading them all.
demo

the demo video is also available as mp4. regenerate it with:
vhs demo/glimpse.tapewhy
this project started as a tool i built to help myself review agents' work better in a place where i already am: the terminal.
install
glimpse runs on bun. install bun first, then install the cli from npm:
bun install -g @bstncartwright/glimpsethen run:
glimpsethe npm package is scoped as @bstncartwright/glimpse, but the installed command is glimpse.
local development
bun install
bun run devpublish (github release -> npm)
a github actions workflow now publishes to npm whenever a github release is marked published.
one-time setup (npm trusted publishing / OIDC)
- on npm, open your package settings and configure a Trusted Publisher for GitHub Actions.
- use your github owner/repo and set workflow filename to
.github/workflows/release-publish.yml. - make sure
package.jsonhas the correctnameand arepository.urlthat matches your github repo. - publish once and verify provenance appears on npm (trusted publishing enables this automatically for public repos/packages).
with trusted publishing, you do not need an
NPM_TOKENrepository secret.
release process (manual)
- bump
versioninpackage.json(for example0.1.0->0.1.1). - run local checks:
bun run typecheck
bun test
bun run test:e2e
bun pm pack --dry-run- commit and push.
- create a git tag that matches the package version with a
vprefix (example:v0.1.1). - create/publish a github release from that tag.
- the
Publish to npmworkflow runs and publishes withnpm publish --access publicusing OIDC.
the publish workflow validates that the release tag matches
package.json(for example, releasev0.1.1must match"version": "0.1.1"). this avoids publishing the wrong version.
one-click release (workflow dispatch)
if you want a single click release, run the Prepare and release workflow from the actions tab.
it will:
- check out the repository default branch
- bump
package.jsonversion (patch/minor/major, or use an explicit version input) - commit + push that change to the default branch
- create and push
v<version>tag - create and publish a github release for that tag with auto-generated release notes
- trigger
Publish to npmautomatically via the release event
notes:
- this workflow needs
contents: writepermission (already configured). - publishing happens in
release-publish.ymlusing npm trusted publishing (OIDC), not a long-lived token. - if a tag already exists, it fails safely before changing anything else.
the package ships source files directly and uses #!/usr/bin/env bun for the command entrypoint. native compiled binaries may come later, but the first public release intentionally stays bun-native so every platform uses the same package.
sources
glimpse
glimpse --staged
glimpse main...HEAD
git diff main...HEAD | glimpse --stdin
glimpse --file patch.diff
glimpse --file fixtures/realistic-code-sample.diffwhen run from a folder that is not a git repo:
glimpseopens changed files across the nested repos below that folder.
keys
h/l, left/right scroll diff horizontally
shift+w toggle word wrap
s toggle stacked/side-by-side
tab/shift+tab next/previous file tab
[/] or p/n previous/next file tab
{/} previous/next hunk
w/b next/previous hunk, then file tab
j/k, up/down scroll diff
ctrl+d/ctrl+u scroll diff
space/pageup page scroll
gg/G top/bottom
c toggle viewed
C unmark viewed
? help
q quitcurrent limits
- requires bun on the user's
PATH. - reads git-backed diffs by shelling out to
git diff. - does not persist viewed-file state between runs.
- does not yet support search, config files, or custom keymaps.
release checklist
- either run Prepare and release (one click), or manually do the steps below
- bump
versioninpackage.json - run
bun test - run
bun run test:e2e - run
bun run typecheck - run
bun pm pack --dry-runand inspect package contents - create tag
v<package.json version> - publish a github release from that tag (workflow publishes to npm)
license
mit
