cotton
Compress files using parallel LZ4
TLDR
Use a specific base URL
Disable certificate verification (insecure mode)
Stop running when a test fails
SYNOPSIS
cotton [OPTIONS] [FILE]…
PARAMETERS
-h, --help
Print help information
-V, --version
Print version information
-f, --follow
Follow the file(s) continuously (default behavior)
-n, --lines <LINES>
Number of lines to display from the end (default: 10)
--regex <REGEX>
Add custom regex highlight pattern with color
--config <FILE>
Path to configuration file
--no-colors
Disable syntax highlighting
--pause
Start in paused mode
-q, --quiet
Suppress banner and extra output
DESCRIPTION
Cotton is a modern, feature-rich command-line tool designed as a colorful and interactive replacement for the traditional tail -f command.
It provides syntax highlighting based on regular expressions, realtime log tailing, filtering capabilities, and a terminal user interface (TUI) for easy navigation.
Key features include:
• Syntax highlighting with customizable regex patterns for different log levels (e.g., ERROR in red, INFO in green).
• Follow mode (-f) to continuously monitor growing files.
• Search and filtering across multiple files.
• Multiple file support with tabbed interface.
• Configurable themes and keybindings.
Cotton is particularly useful for developers and sysadmins monitoring application logs, server outputs, or system journals in real-time. Written in Rust for performance and safety, it handles large files efficiently without high CPU usage.
Unlike basic tail, cotton adds visual appeal and productivity tools like pausing output, jumping to lines, and exporting views, making log analysis faster and less error-prone.
CAVEATS
Requires Rust runtime or pre-built binary; not in standard repositories, install via cargo or release binaries.
High memory use with very large files or many filters.
CONFIGURATION
Uses TOML config at ~/.config/cotton/config.toml for themes, regexes, and keybinds.
Example: [highlights.error] regex = 'ERROR'; color = 'red'
KEYBINDINGS
In TUI: q quit, / search, Space pause, j/k scroll
HISTORY
First released in 2022 by developer Luigi Lombardi as an open-source project on GitHub.
Developed in Rust to address limitations of legacy tools like tail. Active development with v0.3+ adding TUI and multi-file support. Gained popularity in DevOps communities for Jellyfin and Docker log monitoring.


