Skip to content

lusingander/serie

Repository files navigation

Serie

Crate Status Built With Ratatui

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.
  • Works in any terminal environment.

Documentation

For detailed usage, configuration, and advanced features, see the full documentation.

Requirements

  • Git
  • Supported terminal emulator

Installation

If you're using Cargo:

$ cargo install --locked serie

For other download options, see Installation.

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: 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 [default: auto] [possible values: auto, double, single]
  -s, --graph-style <TYPE>        Commit graph image edge style [default: rounded] [possible values: rounded, angular]
  -i, --initial-selection <TYPE>  Initial selection of commit [default: latest] [possible values: latest, head]
      --preload                   Preload all graph images
  -h, --help                      Print help
  -V, --version                   Print version

For details on each option, see Command Line Options.

Keybindings

You can see the keybindings by pressing the ? key.

The default key bindings can be overridden. See Custom Keybindings for more information.

Config

Config files are loaded in the following order of priority:

  • $SERIE_CONFIG_FILE
    • If $SERIE_CONFIG_FILE is set but the file does not exist, an error occurs.
  • $XDG_CONFIG_HOME/serie/config.toml
    • If $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.

For detailed information about the config file format, see Config File Format.

User command

The User command view allows you to display the output (stdout) of your custom external commands. This allows you to do things like view commit diffs using your favorite tools.

For details on how to set commands, see User Command.

Compatibility

Supported terminals

These image protocols are supported:

For more information, see Compatibility.

Unsupported environments

  • Sixel graphics is not supported.
  • Terminal multiplexers (screen, tmux, Zellij, etc.) are not supported.

Screenshots

The following repositories are used as these examples:

Contributing

To get started with contributing, please review CONTRIBUTING.md.

Contributions that do not follow these guidelines may not be accepted.

License

MIT