bensadeh/tailspin
65.6
Adequate · 29 September 2026
6.8k
lines of production code
Rust
primary language
2
measurements over time
What this system is
Tailspin (tspin) is a command-line tool and Rust library designed for pattern-based syntax highlighting of log files and structured text. It identifies and styles specific data types such as IPs, URLs, JSON, and timestamps using a configurable, span-based pipeline that supports custom themes and granular control over highlight groups. The system processes input from files, stdin, or external commands, outputting ANSI-colored text to stdout or a configurable pager.
How it got here
2022–2023 — Initial release and core architecture
14 changes.
This period established the tailspin project as a Rust-based command-line log highlighter, defining its foundational repository structure, TOML theme system, and granular CLI controls. The work focused on building the core I/O subsystem with batched processing and pager integration, while simultaneously generating comprehensive documentation, shell completions, and test suites to ensure stability.
2025–2026 — Span-based log highlighting pipeline
5 changes.
The core module introduced a configurable, pattern-based log highlighting system, initially built with a builder API and comprehensive test coverage. This was subsequently refactored into a high-performance span-based pipeline that merges styled regions to resolve overlaps and optimize ANSI output rendering.
Features
Add shell completion scripts for tspin
Generated shell completion scripts are now available for Bash, Fish, and Zsh, enabling tab-completion for tspin's command-line options. Users can now autocomplete flags such as --theme, --exec, --highlight, --enable, --disable, and --extras, as well as sub-options like specific highlighter types (e.g., numbers, urls, keywords) and shell types for the --completions flag.
completions · high confidence
Initial man page for tspin
Added the man page (man/tspin.1) for the tspin command, documenting its options such as --theme, --exec, --highlight, and --pager, as well as environment variables like TAILSPIN\_EXTRAS and TAILSPIN\_THEME.
man · high confidence
Initial release of tailspin log highlighter
The application is introduced as a command-line tool and library for highlighting log files. It supports pattern-based syntax highlighting for numbers, quotes, UUIDs, IPs, and other formats, configurable via CLI flags or TOML theme files. The CLI uses clap for argument parsing, supports tailing files and reading from stdin, and can output to stdout or pipe to a pager (less). The library exposes a \Highlighter\ API for programmatic use, with optional feature-gating for CLI dependencies.
src · high confidence
Initial repository structure and documentation for tailspin
This change establishes the project's foundational files, including the MIT license, a comprehensive README with usage and installation instructions, and a generated default theme configuration (default-theme.toml) that defines styling for all supported highlight groups such as dates, IPs, and keywords. It also adds Nix flake support for development environments and configures Git attributes to mark shell completion scripts and man pages as vendored. The initial Go prototype (main.go) is removed as the project has been rewritten in Rust.
(repo-wide) · high confidence
Introduce configurable pattern-based log highlighting
The core module now provides a new \Highlighter\ that applies pattern-based syntax highlighting to log text, outputting ANSI-colored strings. Users can configure styles for specific patterns—including numbers, UUIDs, durations, emails, key-value pairs, dates/times, IPv4/IPv6 addresses, URLs, file paths, memory pointers, Unix processes, JSON structures, and quoted text—via dedicated configuration structs in \config.rs\. The highlighter uses a builder API to register these finders, where the order of registration determines precedence for overlapping matches. This replaces the previous static or less granular highlighting approach with a flexible, composable system that supports custom styling for individual components of matched patterns (e.g., separating the style of a UUID's dashes from its numbers).
src/core · high confidence
New CLI options for granular syntax highlighting control
The CLI now exposes fine-grained control over syntax highlighting via the --enable and --disable flags, allowing users to selectively activate or deactivate specific highlight groups (such as JSON, IPv4, or keywords) rather than relying solely on the default set. A new --extras flag enables optional highlighters like IPv6 and JVM stack traces, which are disabled by default. Additionally, the --highlight flag now accepts a full 16-color palette for custom keyword styling, and a new --generate-default-theme command outputs a complete, editable theme configuration file reflecting the current defaults.
src/cli · high confidence
New TOML-based theme system with granular syntax highlighting
Users can now customize the appearance of highlighted content via a new \theme.toml\ configuration file. This system supports detailed styling for specific data types, including keywords, regexes, numbers, UUIDs, quotes, IPv4/IPv6 addresses, dates, durations, paths, URLs, emails, pointers, processes, key-value pairs, JSON, and JVM stack traces. The theme file is located in the platform-specific config directory (e.g., \%APPDATA%\ on Windows, \\~/.config\ on Unix) or a custom path specified by the user. Unknown fields in the theme file are rejected to ensure configuration integrity.
src/theme · high confidence
New span pipeline finders for structured text patterns
The span pipeline now includes dedicated finders for dates, times, durations, emails, IPv4/IPv6 addresses, JSON, JVM stack traces, key-value pairs, keywords, numbers, pointers, and quotes. These finders use optimized regex and automaton matching to identify and style specific text patterns, improving the accuracy and performance of syntax highlighting for structured data in logs and other text inputs.
_src/core/span\pipeline/finders · high confidence
Behavioural changes
Consolidated output writers with batched writing and graceful broken-pipe handling
The I/O subsystem now uses a unified \Writer\ enum to manage output to either a temporary file or standard output, replacing previous fragmented implementations. Both the \StdoutWriter\ and \TempFile\ writer now support batched line writing via \write\_batch\, which improves performance by reducing allocation overhead. The standard output writer includes specific handling for broken pipes, allowing the application to exit gracefully if the consumer closes the stream early, while the temp file writer ensures immediate visibility of lines for pagers by flushing after each batch.
src/io/writer · high confidence
Expanded example logs with new log formats and highlighted patterns
The example-logs directory has been updated with new sample files (example1, example2, example3) that demonstrate a wider variety of log formats and syntax-highlighting capabilities. These examples now include IPv6 addresses, JVM stack traces, email addresses, memory pointers, and key-value pair formats, alongside existing patterns like URLs, UUIDs, and HTTP methods. This provides users with more comprehensive reference material for testing and understanding the log highlighting features across diverse real-world scenarios.
example-logs · high confidence
Refactored IO readers to use batched line processing and unified stream events
The IO reader module has been rewritten to replace the previous async/polling-based implementation with a synchronous, batch-oriented approach. Files, stdin, and external commands (--exec) are now read via a shared \line\_batcher\ that groups complete lines into \LineBatch\ objects, reducing per-line allocation overhead. The public API now yields a unified \StreamEvent\ enum (\InitialReadComplete\, \Lines\, \Ended\), ensuring the pager starts only after the initial read is complete for files, while streaming immediately for stdin and commands. Error handling has been consolidated to use \anyhow\, and the \--exec\ command now properly validates exit codes and handles cleanup on Windows (where it is unsupported).
src/io/reader · high confidence
Replaces highlighter implementation with a span-based pipeline
The syntax highlighting system has been refactored from a character-by-character approach to a span-based pipeline. Finders now produce styled regions (spans) with priorities, which are merged to resolve overlaps, and then rendered into ANSI output. This change introduces a style interning mechanism to optimize merge performance and adds support for 'padded' spans, which allow background-colored keywords to be visually separated by surrounding spaces.
_src/core/span\pipeline · high confidence
Restructured I/O module with explicit input/output routing and pager setup
The I/O subsystem has been consolidated into a new module structure (\src/io\) featuring explicit routing logic in \routing.rs\ that determines input sources (file, command, stdin) and output targets (less pager, custom pager, stdout) based on CLI arguments. A new \setup.rs\ module initializes the specific reader, writer, and presenter components for the chosen route, including validation for custom pager commands (requiring a \\[FILE\]\ placeholder) and handling of temporary files for pager output. This change replaces the previous async-based IO traits with a synchronous, thread-based approach and moves orchestration logic out of the IO module into main.
src/io · high confidence
Support for custom pager commands and improved signal handling
The presenter module now allows users to configure a custom pager command via the \CustomPagerOptions\, replacing the previous hardcoded reliance on \less\. This change introduces a \Pager\ enum that can switch between the default \less\ behavior and user-defined commands, where placeholders like \\[FILE\]\ in custom arguments are replaced with the temporary file path. Additionally, the pager implementation now handles Ctrl+C signals more gracefully on Unix systems by ignoring SIGINT during pager execution, treating it as a quiet exit rather than a crash, and uses \TempPath\ for automatic cleanup of temporary files.
src/io/presenter · high confidence
Test coverage
Added benchmark suite for highlighter performance; Added end-to-end, integration, and property tests for the tspin binary; Added test fixtures for log parsing; Added tests for the escape code conversion utility.
Housekeeping
Automated generation of documentation and shell completions
The project now includes utility scripts in the \util/\ directory to automatically generate the man page, shell completions (for bash, zsh, fish, etc.), and the default theme configuration. This ensures that the \tspin.1\ man page, completion files, and \default-theme.toml\ are always consistent with the current binary version and CLI options, removing the need for manual updates to these artifacts.
util · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 69 → 66 (-3.0)
- Rubric changed (rubric-2026.09.9 → rubric-2026.09.17) — scores are not directly comparable.
Lenses
- Code Health 97 → 97 (+0.0)
- Architecture 99 → 98 (-1.3)
- Maturity 59 → 59 (+0.1)
- Readiness 79 → 56 (-22.3)
- Security 63 → 75 (+12.5)
- Event Sourcing 100 → 100 (+0.0)
Resolved (5)
- Documentation: no architecture or design documentation (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Hotspot: src/cli/mod.rs (src/cli/mod.rs)
- Hotspot: src/core/span_pipeline/finders/url.rs (src/core/span_pipeline/finders/url.rs)
New (1)
- Dependency hygiene PARTLY measured — Cargo dependencies read, dependency currency not (crates.io unreachable)
Changes since last survey
- 2 commits — 2 feature/other, 0 fixes
By area
- (root) — 2 commits
Notable commits
- change: Bump thiserror from 2.0.20 to 2.0.21 in the dependencies group
- change: Bump toml in the dependencies group
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
bensadeh/tailspin was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit b414467e3fa2cafc87755a3bc75272771b50f968 — the exact code this score is about.
- Scored under rubric-2026.09.17 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-705631bb727e.