Skip to content

jetm/jig

Repository files navigation

jig

An interactive TUI for git workflows, built with Bubble Tea. One tool replacing the features I use most from forgit, diffnav, tig, and git-interactive-rebase-tool.

Installation

From source

git clone https://github.com/jetm/jig
cd jig
make install   # installs to $GOPATH/bin/jig

Pre-built binaries

Download from the releases page, or use goreleaser:

make snapshot   # produces binaries in dist/

Commands

Command Description Replaces
jig add Interactively stage files forgit add
jig hunk-add Interactively stage individual hunks git add -p / git-add--interactive
jig checkout Interactively discard file changes git restore
jig diff [revision] Interactive side-by-side diff viewer diffnav
jig fixup Interactively create a fixup commit forgit fixup
jig log [revision] Interactive commit log browser tig / git log
jig rebase-interactive [revision] Interactive rebase todo editor git-interactive-rebase-tool
jig reset Interactively unstage files forgit reset

Configuration

jig reads configuration from ~/.config/jig/config.yaml (XDG) or ~/.jig.yaml as a fallback. Unset fields use built-in defaults.

Config file format

diff:
  renderer: chroma   # chroma | delta | plain

log:
  commitLimit: 50    # number of commits shown in log

rebase:
  defaultBase: HEAD~10   # default base for rebase-interactive

ui:
  theme: dark        # dark | light (theme switching is plumbing only)

Environment variable overrides

Environment variables take precedence over the config file:

Variable Config field Example
JIG_DIFF_RENDERER diff.renderer JIG_DIFF_RENDERER=delta
JIG_LOG_COMMIT_LIMIT log.commitLimit JIG_LOG_COMMIT_LIMIT=100
JIG_REBASE_DEFAULT_BASE rebase.defaultBase JIG_REBASE_DEFAULT_BASE=main
JIG_UI_THEME ui.theme JIG_UI_THEME=light

Diff renderers

  • chroma (default) — syntax-highlighted diffs rendered in-process
  • delta — pipe through delta if installed
  • plain — uncoloured plain text

Shell Completions

Generate and install completions for your shell:

fish

jig completion fish > ~/.config/fish/completions/jig.fish

Development

make build    # build binary to bin/jig
make test     # run tests with race detector and coverage check (90% threshold)
make lint     # run golangci-lint
make fmt      # run gofmt + goimports
make clean    # remove build artifacts

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors