Crates.io | serie |
lib.rs | serie |
version | 0.4.0 |
source | src |
created_at | 2024-07-28 07:52:09.973102 |
updated_at | 2024-09-17 01:09:38.292741 |
description | A rich git commit graph in your terminal, like magic |
homepage | https://github.com/lusingander/serie |
repository | https://github.com/lusingander/serie |
max_upload_size | |
id | 1317824 |
size | 2,428,995 |
A rich git commit graph in your terminal, like magic π
(This demo shows Ratatui repository!)
Serie (/zΓ©ΛriΙ/
) is a TUI application that uses the terminal emulators' image display protocol to render commit graphs like git log --graph --all
.
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.
git log --graph
experience in the terminal.$ cargo install --locked serie
$ pacman -S serie
$ brew install lusingander/tap/serie
$ pkgin install serie
You can download pre-compiled binaries from releases.
If you want to check the latest development version, build from source:
$ git clone https://github.com/lusingander/serie.git
$ cd serie
$ cargo build --release # Unless it's a release build, it's very slow.
$ ./target/release/serie
Run serie
in the directory where your git repository exists.
$ cd <your git repository>
$ serie
Serie - A rich git commit graph in your terminal, like magic π
Usage: serie [OPTIONS]
Options:
-p, --protocol <TYPE> Image protocol to render graph [default: auto] [possible values: auto, iterm, kitty]
-o, --order <TYPE> Commit ordering algorithm [default: chrono] [possible values: chrono, topo]
-g, --graph-width <TYPE> Commit graph image cell width [possible values: double, single]
--preload Preload all graph images
-h, --help Print help
-V, --version Print version
A protocol type for rendering images of commit graphs.
By default auto
will guess the best supported protocol for the current terminal.
Kitty terminals are detected as kitty
via an environment variable, and all others are assumed to support iterm
.
Refer to Compatibility for details.
--order chrono
will order commits by commit date if possible.
--order topo
will order commits on the same branch consecutively if possible.
--order chrono
--order topo
The character width that a graph image unit cell occupies.
If not specified, double
will be used automatically if there is enough width to display it, single
otherwise.
--graph-width double
--graph-width single
By default, graph images are generated and loaded lazily as needed.
If --preload
is specified, all graph images will be generated and loaded at startup. This can result in smoother scrolling, as the images are already available, and might reduce memory usage. However, this may lead to slower startup times, especially for large repositories.
You can see the keybindings by pressing the ?
key.
The default key bindings can be overridden. Please refer to default-keybind.toml and add it to config file.
Key | Description | Corresponding keybind |
---|---|---|
Ctrl-c q | Quit app | force_quit quit |
? | Open help | help_toggle |
Key | Description | Corresponding keybind |
---|---|---|
Down/Up j/k | Move down/up | navigate_down navigate_up |
g/G | Go to top/bottom | go_to_top go_to_bottom |
Ctrl-f/b | Scroll page down/up | page_down page_up |
Ctrl-d/u | Scroll half page down/up | half_page_down half_page_up |
H/M/L | Select top/middle/bottom of the screen | select_top select_middle select_bottom |
Enter | Show commit details Apply search (if searching) |
confirm |
Tab | Open refs list | ref_list_toggle |
/ | Start search | search |
Esc | Cancel search | cancel |
n/N | Go to next/previous search match | go_to_next go_to_previous |
c/C | Copy commit short/full hash | short_copy full_copy |
Key | Description | Corresponding keybind |
---|---|---|
Esc Backspace | Close commit details | close cancel |
Down/Up j/k | Scroll down/up | navigate_down navigate_up |
g/G | Go to top/bottom | go_to_top go_to_bottom |
c/C | Copy commit short/full hash | short_copy full_copy |
Key | Description | Corresponding keybind |
---|---|---|
Esc Backspace Tab | Close refs list | close cancel ref_list_toggle |
Down/Up j/k | Move down/up | navigate_down navigate_up |
g/G | Go to top/bottom | go_to_top go_to_bottom |
Right/Left l/h | Open/Close node | navigate_right navigate_left |
c | Copy ref name | short_copy |
Key | Description | Corresponding keybind |
---|---|---|
Esc Backspace ? | Close help | close cancel help_toggle |
Down/Up j/k | Scroll down/up | navigate_down navigate_up |
g/G | Go to top/bottom | go_to_top go_to_bottom |
Config files are loaded in the following order of priority:
$SERIE_CONFIG_FILE
$SERIE_CONFIG_FILE
is set but the file does not exist, an error occurs.$XDG_CONFIG_HOME/serie/config.toml
$XDG_CONFIG_HOME
is not set, ~/.config/
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.
The values set in this example are the default values.
[ui.list]
# The minimum width of a subject in the commit list.
# type: u16
subject_min_width = 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
date_format = "%Y-%m-%d"
# The width of a author date in the commit list.
# type: u16
date_width = 10
# Whether to show a author date in the commit list in local timezone.
# type: boolean
date_local = true
# The width of a author name in the commit list.
# type: u16
name_width = 20
[ui.detail]
# The height of a commit detail area.
# type: u16
height = 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
date_format = "%Y-%m-%d %H:%M:%S %z"
# Whether to show a author/committer date in the commit list in local timezone.
# type: boolean
date_local = true
[ui.refs]
# The width of a refs list area.
# type: u16
width = 26
[graph.color]
# Colors should be specified in the format #RRGGBB or #RRGGBBAA.
# Array of colors used for the commit graph.
# type: array of strings
branches = [
"#E06C76",
"#98C379",
"#E5C07B",
"#61AFEF",
"#C678DD",
"#56B6C2",
]
# Color of the edge surrounding the commit circles in the graph.
# type: string
edge = "#00000000"
# Background color of the commit graph.
# type: string
background = "#00000000"
[keybind]
# See ./assets/default-keybind.toml for a specific example configuration.
# ...
These image protocols are supported:
The terminals on which each has been confirmed to work are listed below.
Terminal emulator | Support | Note |
---|---|---|
iTerm2 | β | But slower than other terminals |
WezTerm | β | |
VSCode integrated terminal | β | Requires the terminal.integrated.enableImages setting to be enabled |
Hyper | β³ | >=v4.0.0, not yet officially released |
Tabby | β³ | The graph background is not transparent |
Terminal emulator | Support | Note |
---|---|---|
kitty | β |
Terminal multiplexers (tmux, Zellij, etc.) are not supported.
Please share your experience with other terminal emulators on the Discussions.
To get started with contributing, please review CONTRIBUTING.md.
Contributions that do not follow these guidelines may not be accepted.
The following repositories are used as these examples:
MIT