Skip to content
/ serie Public
forked from lusingander/serie

A rich git commit graph in your terminal, like magic πŸ“š

License

Notifications You must be signed in to change notification settings

yanganto/serie

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Serie

Crate Status

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 --graph experience 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

Installation

Cargo

$ cargo install --locked serie

Arch Linux

$ pacman -S 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.

List of all keybindings

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 details
Apply 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.

[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
# The width of a author name in the commit list.
# type: u16
name_width = 20

[ui.detail]
# 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"

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.

Contributing

Contributions are welcome. Please check out CONTRIBUTING.md to get started.

Screenshots

The following repositories are used as these examples:

License

MIT

About

A rich git commit graph in your terminal, like magic πŸ“š

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%