Serie
A rich git commit graph in your terminal, like magic π
(This demo shows Ratatui repository!)
About
Serie (/zΓ©ΛriΙ/) is a TUI application that uses the terminal emulators' image display protocol to render commit graphs like git log --graph --all.
Why?
While some users prefer to use Git via CLI, they often rely on a GUI or feature-rich TUI to view commit logs. Others may find git log --graph sufficient.
Personally, I found the output from git log --graph difficult to read, even with additional options. Learning complex tools just to view logs seemed cumbersome.
Goals
- Provide a rich
git log --graphexperience in the terminal. - Offer commit graph-centric browsing of Git repositories.
Non-Goals
- Implement a fully-featured Git client.
- Create a TUI application with a complex UI.
Requirements
- Git
- Supported terminal emulator
- Refer to Compatibility for details.
Installation
Cargo
$ cargo install --locked serie
Homebrew (macOS)
$ brew install lusingander/tap/serie
Downloading binary
You can download pre-compiled binaries from releases.
Usage
Basic
Run serie in the directory where your git repository exists.
$ cd <your git repository>
$ serie
Options
Serie - A rich git commit graph in your terminal, like magic π
Usage: serie [OPTIONS]
Options:
-p, --protocol <TYPE> Image protocol to render graph [default: iterm] [possible values: iterm, kitty]
-o, --order <TYPE> Commit ordering algorithm [default: chrono] [possible values: chrono, topo]
--no-cache Do not use graph image cache
-h, --help Print help
-V, --version Print version
-p, --protocol <TYPE>
A protocol type for rendering images of commit graphs.
Refer to Compatibility for details.
-o, --order <TYPE>
--order chrono will order commits by commit date if possible.
--order topo will order commits on the same branch consecutively if possible.
--no-cache
The generated graph image is saved in $XDG_CACHE_HOME/serie and reused.
If $XDG_CACHE_HOME is not set, ~/.cache/ will be used instead.
If --no-cache is specified, this cache image will not be used or saved.
Keybindings
You can see the keybindings by pressing the ? key.
Common
| Key | Description |
|---|---|
| Ctrl-c q | Quit app |
| ? | Open help |
Commit List
| Key | Description |
|---|---|
| Down/Up j/k | Move down/up |
| g/G | Go to top/bottom |
| Ctrl-f/b | Scroll page down/up |
| Ctrl-d/u | Scroll half page down/up |
| H/M/L | Select top/middle/bottom of the screen |
| Enter | Show commit detailsApply search (if searching) |
| Tab | Open refs list |
| / | Start search |
| Esc | Cancel search |
| n/N | Go to next/previous search match |
| c/C | Copy commit short/full hash |
Commit Detail
| Key | Description |
|---|---|
| Esc Backspace | Close commit details |
| Down/Up j/k | Scroll down/up |
| c/C | Copy commit short/full hash |
Refs List
| Key | Description |
|---|---|
| Esc Backspace Tab | Close refs list |
| Down/Up j/k | Move down/up |
| g/G | Go to top/bottom |
| Right/Left l/h | Open/Close node |
| c | Copy ref name |
Help
| Key | Description |
|---|---|
| Esc Backspace ? | Close help |
| Down/Up j/k | Scroll down/up |
Config
If $XDG_CONFIG_HOME/serie/config.toml exists, it will be read and used.
If $XDG_CONFIG_HOME is not set, ~/.cache/ will be used instead.
If the config file does not exist, the default values will be used for all items. If the config file exists but some items are not set, the default values will be used for those unset items.
Config file format
The values set in this example are the default values.
[]
# The minimum width of a subject in the commit list.
# type: u16
= 20
# The date format of a author date in the commit list.
# The format must be specified in strftime format.
# https://docs.rs/chrono/latest/chrono/format/strftime/index.html
# type: string
= "%Y-%m-%d"
# The width of a author date in the commit list.
# type: u16
= 10
# The width of a author name in the commit list.
# type: u16
= 20
[]
# The date format of a author/committer date in the commit detail.
# The format must be specified in strftime format.
# https://docs.rs/chrono/latest/chrono/format/strftime/index.html
# type: string
= "%Y-%m-%d %H:%M:%S %z"
Compatibility
Supported terminals
These image protocols are supported:
The terminals on which each has been confirmed to work are listed below.
Inline Images Protocol
| Terminal emulator | Support |
|---|---|
| iTerm2 | β (But slower than other terminals) |
| WezTerm | β |
| VSCode integrated terminal | β |
| Hyper | β³ (>=v4.0.0, not yet officially released) |
| Tabby | β³ (The graph background is not transparent) |
Terminal graphics protocol
| Terminal emulator | Support |
|---|---|
| kitty | β |
Reporting Compatibility
Please share your experience with other terminal emulators on the Discussions.
Screenshots
The following repositories are used as these examples:
License
MIT