$ show lusingander/serie
Serie is a TUI application that renders rich git commit graphs in the terminal using image display protocols (iTerm2, Kitty, Kitty Unicode). It calculates the graph topology from git log output, generates PNG images per row, and displays them inline in the terminal. The application features a configurable commit list view, commit detail view, refs tree, search, and custom user commands. Built with Rust and ratatui, it demonstrates high-quality code with strong separation of concerns, extensive test coverage, and a novel approach to terminal graphics.
The LLM identified 3 files worth highlighting for reuse:
Implements the commit graph calculation algorithm. It takes a repository's commit DAG and computes x,y positions for each commit, along with edge types (vertical, horizontal, branch, merge) needed to render the graph. The algorithm handles branching, merging, and orphan commits, and produces a compact, well-structured graph layout. This module is self-contained and could be extracted into a library for any Git graph visualization tool.
Renders individual graph row images as PNG buffers. Uses Bresenham's circle algorithm for commit circles, pre-calculated pixel sets for edges (vertical, horizontal, corners), and supports both rounded and angular edge styles. The image generation is pixel-level and highly optimized, with pre-computed drawing pixels for performance. This module is independent of the rest of the application and could be used for any line-based graph visualization in images.
Provides 2D vector and point math utilities, including point-in-polygon testing using cross product sign consistency. Used by the angular edge rendering to compute diagonal line segments. This is a small, clean, self-contained module that could be reused in any geometry/rendering context.