Gilt - A LazyGit-Style Git TUI Written in Common Lisp

I’ve been working on Gilt, a terminal user interface for Git written entirely in Common Lisp (SBCL). It is heavily inspired by LazyGit but built from scratch with no external TUI framework - just raw ANSI escape codes and ioctl calls.

## Why?

I wanted a Git TUI that I could hack on in a language I enjoy. Common Lisp gives me interactive development via the REPL, fast iteration, and the ability to ship a single static binary with no runtime dependencies.

## What Can It Do?

Gilt covers the day-to-day Git workflow and then some:

- **Stage/unstage files** with inline diffs and hunk-level staging

- **Commit, amend, push, pull** with dialog-based input

- **Branch management** - create, delete, rename, checkout, rebase, fast-forward, sort

- **Interactive rebase** - pick, reword, squash, fixup, drop, reorder

- **Bisect** - binary search for bad commits

- **Stash management** - save, pop, apply, drop

- **Merge conflict resolution** - choose ours, theirs, or edit manually

- **Git-flow integration** - feature, release, and hotfix workflows

- **Search/filter** across files, branches, stashes, and commits

- **Undo/redo** via reflog

- **Shell commands** - run arbitrary git or shell commands vim-style with `:`

- **Copy to clipboard, open in browser, external diff tool**

- **Custom keybindings** via config file

- **Dynamic terminal resize** - handles SIGWINCH to redraw on window resize

## Screenshots

### Main View

The default layout with five panels on the left - Status, Files, Branches, Commits, and Stash - plus a main content area and command log on the right. The help bar at the bottom shows context-sensitive keybindings for the focused panel. The current branch and tracking info are visible in the Status panel at the top.

### Commit Detail View

Selecting a commit in the Commits panel shows the full commit details on the right - hash, author, date, and the complete commit message. The help bar updates to show all available actions for the commits panel, including interactive rebase, graph view, cherry-pick, amend, bisect, and more.

## Cross-Platform

Gilt runs on Linux and macOS (both Apple Silicon and Intel). The latest release (v0.16.0) fixed terminal size detection on macOS by using the correct ioctl constants for Darwin and added a portable stty fallback. Shout out to @LionyxML for the help on this.

Pre-built binaries are available for:

- Linux x86_64

- macOS arm64 (Apple Silicon)

- macOS x86_64 (Intel)

## Building From Source

Requires SBCL and Quicklisp:

```bash

git clone GitHub - parenworks/gilt: LazyGit-inspired TUI for Git written in Common Lisp · GitHub

cd gilt

make build

sudo make install

```

## Links

- **Repository**: [ GitHub - parenworks/gilt: LazyGit-inspired TUI for Git written in Common Lisp · GitHub ]( GitHub - parenworks/gilt: LazyGit-inspired TUI for Git written in Common Lisp · GitHub )

- **User Guide**: [GUIDE.md]( gilt/GUIDE.md at master · parenworks/gilt · GitHub )

- **Changelog**: [CHANGELOG.md]( gilt/CHANGELOG.md at master · parenworks/gilt · GitHub )

- **Latest Release**: [v0.16.0]( Release v0.16.0 · parenworks/gilt · GitHub )

Feedback, bug reports, and contributions are welcome. If you are a Common Lisp enthusiast who uses Git from the terminal, give it a try and let me know what you think.

Cheers :slight_smile:

2 Likes

Thanks you. It look greate.

I found that /usr/bin/git may not work under guix though.