A small Go command-line tool that colorizes, filters, and reformats logfmt logs piped from stdin in your terminal.
pamburus/hl
A command-line log viewer that turns JSON and logfmt logs into human-readable output, with filtering, sorting and live follow mode.
- Stars
- 3,311
- Forks
- 77
- Open issues
- 12
- Last commit
- 6 hours ago
What is it?
hl is a command-line tool for reading structured logs. It parses JSON and logfmt log entries and renders them in a readable layout with colors, configurable time formats and time zones, and optional field hiding. It accepts plain files, multiple files at once, and compressed inputs such as gzip, bzip2, xz and zstd.
Beyond formatting, hl offers filtering by log level, time range, and field values, plus a query language with logical operators, regular expressions and wildcard matching. The sort mode builds an index so large sets of local files can be ordered chronologically, and follow mode merges live streams from several sources in timestamp order.
hl uses the system pager (less by default) when output goes to a terminal, and can be configured through a config file, environment variables and themes.
Key features
- 01Converts JSON and logfmt logs into a colored, human-readable format.
- 02Filters by log level, timestamp range, and field values with a query language.
- 03Reads compressed files (gzip, bzip2, xz, zstd) directly.
- 04Sorts entries chronologically across many files using an index.
- 05Follows multiple live sources and merges them by timestamp.
- 06Supports configurable themes, time formats and time zones.
Use cases
- Inspecting JSON application logs in a terminal during debugging.
- Tailing logs from several Kubernetes pods merged into one timeline.
- Searching rotated, compressed log archives for specific errors or time windows.
Quick start
- 1
Install with Homebrew on macOS
brew install hl - 2
View a log file (uses less pager by default)
hl example.log
Things to know
- Relies on an external pager such as less; no built-in pager, and the Windows less build referenced in the README is known to break ANSI colors.
Topics
FAQ
- What is hl?
- A command-line log viewer that turns JSON and logfmt logs into human-readable output, with filtering, sorting and live follow mode. hl is a command-line tool for reading structured logs. It parses JSON and logfmt log entries and renders them in a readable layout with colors, configurable time formats and time zones, and optional field hiding. It accepts plain files, multiple files at once, and compressed inputs such as gzip, bzip2, xz and zstd.
- Is hl free to use? What license does it have?
- hl is open source under the MIT license. Check the license terms before using it in commercial products.
- Is hl still maintained?
- Actively maintained. The last commit to hl was on Oct 19, 2026.
- What can I use hl for?
- Inspecting JSON application logs in a terminal during debugging. Tailing logs from several Kubernetes pods merged into one timeline. Searching rotated, compressed log archives for specific errors or time windows.
- How do I install hl?
- Install with Homebrew on macOS: brew install hl View a log file (uses less pager by default): hl example.log
- Where can I get hl?
- The source code and installation instructions are on GitHub: https://github.com/pamburus/hl
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
CLI proxy that filters and compresses shell command output before it reaches an AI coding agent's context, cutting token use.
A minimal, customizable cross-shell prompt written in Rust that shows relevant project and environment info.
A smarter cd command that learns your most-used directories and lets you jump to them with a few keystrokes, across all major shells.
A terminal tool that replays Git commits as animated typing sessions with syntax highlighting and file tree transitions.
A terminal user interface for Git, inspired by Magit, for staging, committing, branching, rebasing and more from the keyboard.