application: category: monitoring/logs cli: true repo: https://github.com/pamburus/hl

hl

High-performance log viewer and processor that transforms logs in JSON and logfmt formats into a human-readable output. Built with efficiency in mind, it enables quick parsing and analysis of large log files with minimal overhead.

Usage

Usage: hl [OPTIONS] [FILE]...

OptionEnvironmentDescription
--config <FILE>$HL_CONFIGConfiguration file path
-s, --sortSort messages chronologically
-F, --followFollow input streams and sort messages chronologically during time frame set by --sync-interval-ms
--tail <N>Number of last messages to preload in --follow mode (default: 10)
--sync-interval-ms <MILLISECONDS>Synchronization interval for live streaming (default: 100)
--paging <WHEN>$HL_PAGINGControl pager usage (default: auto) [auto, always, never]
-PAlias for --paging=never, overrides --paging
--helpPrint help
-V, --versionPrint version

Filtering Options

OptionEnvironmentDescription
-l, --level <LEVEL>$HL_LEVELFilter messages by level
--since <TIME>Filter messages by timestamp >= TIME
--until <TIME>Filter messages by timestamp TIME
-f, --filter <FILTER>Filter by field values, e.g. k=v, k~=v, k~~=v
-q, --query <QUERY>Filter using query expressions

Output Options

OptionEnvironmentDescription
--color [<WHEN>]$HL_COLORControl color output (default: auto) [auto, always, never]
-cAlias for --color=always, overrides --color
--theme <THEME>$HL_THEMESet color theme (default: uni)
-r, --rawOutput raw source messages
--no-rawDisable raw output, overrides --raw
--raw-fieldsOutput raw field values without formatting
-h, --hide <KEY>Hide/reveal fields by key (use !* to reveal all)
--flatten <WHEN>$HL_FLATTENWhether to flatten objects (default: always)
-t, --time-format <FORMAT>$HL_TIME_FORMATTime format (default: %b %d %T.%3N)
-Z, --time-zone <TZ>$HL_TIME_ZONESet time zone (default: UTC)
-L, --localUse local time zone
--no-localDisable local time zone
-e, --hide-empty-fields$HL_HIDE_EMPTY_FIELDSHide empty fields
-E, --show-empty-fields$HL_SHOW_EMPTY_FIELDSShow empty fields, overrides hide option
--input-info <LAYOUTS>Set input info layout (default: auto) [auto, none, minimal, compact, full]
-o, --output <FILE>Write output to file

Input Options

OptionEnvironmentDescription
--input-format <FORMAT>$HL_INPUT_FORMATSet input format (default: auto) [auto, json, logfmt]
--unix-timestamp-unit <UNIT>$HL_UNIX_TIMESTAMP_UNITUnit for Unix timestamps (default: auto) [auto, s, ms, us, ns]
--allow-prefix$HL_ALLOW_PREFIXAllow non-JSON prefixes
--delimiter <DELIMITER>Message delimiter, e.g. [NUL, CR, LF, CRLF, custom string]

Advanced Options

OptionEnvironmentDescription
--interrupt-ignore-count <N>$HL_INTERRUPT_IGNORE_COUNTNumber of Ctrl-C signals to ignore (default: 3)
--buffer-size <SIZE>$HL_BUFFER_SIZESet buffer size (default: “256 KiB”)
--max-message-size <SIZE>$HL_MAX_MESSAGE_SIZEMax message size (default: “64 MiB”)
-C, --concurrency <N>$HL_CONCURRENCYNumber of processing threads
--shell-completions <SHELL>Print shell completion script [bash, elvish, fish, powershell, zsh]
--man-pagePrint man page
--list-themes[=<TAGS>]Print available themes, optionally filtered [dark, light, 16color, etc.]
--dump-indexPrint debug index metadata in --sort mode