hl(1)
π NAME π
okay bestie, welcome to hl(1) β the General Commands Manual page for hl, the JSON and logfmt log converter to human readable representation. she's giving main character energy for your terminal, fr fr β¨
π§Ύ SYNOPSIS π§Ύ
hl [--config] [-s|--sort] [-F|--follow] [--tail] [--sync-interval-ms]
[--paging] [-P ] [-l|--level] [--since] [--until] [-f|--filter]
[-q|--query] [--color] [-c ] [--theme] [-r|--raw] [--no-raw]
[--raw-fields] [-h|--hide] [--flatten] [-t|--time-format]
[-Z|--time-zone] [-L|--local] [--no-local] [-e|--hide-empty-fields]
[-E|--show-empty-fields] [--input-info] [--ascii] [-x|--expansion]
[-o|--output] [--output-delimiter] [--input-format]
[--unix-timestamp-unit] [--allow-prefix] [--delimiter]
[--interrupt-ignore-count] [--buffer-size] [--max-message-size]
[-C|--concurrency] [--shell-completions] [--man-page] [--list-themes]
[--dump-index] [--help] [-V|--version] [FILE]
πΈ DESCRIPTION πΈ
hl is a JSON and logfmt log converter to human readable representation. no cap, that's the whole vibe: logs go in, pretty readable logs come out, and you get to feel iconic π
βοΈ OPTIONS βοΈ
--config <FILE>β configuration file path. May also be specified with theHL_CONFIGenvironment variable. π«Ά-s,--sortβ sort entries chronologically. β³-F,--followβ follow input streams and sort entries chronologically within the time frame set by--sync-interval-msoption. π--tail <N>[default: 10]β number of last entries to preload from each file in--followmode. π--sync-interval-ms <MILLISECONDS>[default: 100]β synchronization interval for live streaming mode enabled by--followoption. β±οΈ--paging <WHEN>[default: auto]β control pager usage (HL_PAGERorPAGER). possible values:auto,always,never. May also be specified with theHL_PAGINGenvironment variable. π-Pβ the manual calls this a βHandful aliasβ for--paging=never; it overrides the--pagingoption. π--help[=<VERBOSITY>]β print help. possible values:short,long. π-V,--versionβ print version. π[FILE]β files to process. π«Ά
π FILTERING OPTIONS π
the way that filtering works is lowkey iconic, bestie β let's get into it π
-l,--level <LEVEL>β display entries with level>=<LEVEL>. May also be specified with theHL_LEVELenvironment variable. π--since <TIME>β display entries with timestamp>=<TIME>. note:--time-zoneand--localoptions are honored. π°οΈ--until <TIME>β display entries with timestamp<=<TIME>. note:--time-zoneand--localoptions are honored. β³-f,--filter <FILTER>β filter entries by matching field values[k=v, k~=v, k~~=v, 'k!=v', 'k?!=v', etc]. The format is<key> <operator> <value>. The<key>is the field name to match. The<value>is the string to match against (case-sensitive). Operators:== perform exact string match;~== perform sub-string match;~~== perform regular expression match. Modifiers:!= negate the match (placed before operator)['k!=v', 'k!~=v', etc];?= include entry if the field is missing (placed after the key)['k?=v', 'k?!~=v', etc]. π-q,--query <QUERY>β filter entries using a query expression['status>=400 or duration>=15', etc]. Query expression supports all operators and modifiers from--filterand additionally: logicaland,or,not(aliases:&&,||,!); comparison<,>,<=,>=,=,!=; setsstatus in (500,503,504),id in @ids.txt(values from file),id in @-(values from stdin); stringsmessage contains "timeout"(substring),message matches "^Error.*timeout$"(regular expression); existenceexists(user-id),not exists(user-id); grouping(status>=500 and status<=504) or (status==404). π₯
π¨ OUTPUT OPTIONS π¨
--color [<WHEN>][default: auto]β whether to use ANSI colors and styles. possible values:auto,always,never. May also be specified with theHL_COLORenvironment variable. π-cβ the manual calls this a βHandful aliasβ for--color=always; it overrides the--coloroption. ποΈ--theme <THEME>[default: uni]β color theme. Runhl --list-themesto see available themes. May also be specified with theHL_THEMEenvironment variable. π¦-r,--rawβ output raw source entries instead of formatted entries. This can be useful for applying filters and saving results in their original format. π¦--no-rawβ disable raw source entries output, overrides--rawoption. π--raw-fieldsβ output field values as is, without unescaping or prettifying. π§-h,--hide <KEY>β hide or reveal fields with the specified keys, prefix with!to reveal, provide!*to reveal all. π--flatten <WHEN>[default: always]β whether to flatten objects. possible values:never,always. May also be specified with theHL_FLATTENenvironment variable. π«§-t,--time-format <FORMAT>[default: %Y-%m-%d %T.%3N]β time format, seehttps://man7.org/linux/man-pages/man1/date.1.html. May also be specified with theHL_TIME_FORMATenvironment variable. π°οΈ-Z,--time-zone <TZ>[default: UTC]β time zone name, see column "TZ identifier" athttps://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Examples:'UTC','America/New_York','Asia/Shanghai','Europe/Berlin', etc. May also be specified with theHL_TIME_ZONEenvironment variable. π-L,--localβ use local time zone, overrides--time-zoneoption. π--no-localβ disable local time zone, overrides--localoption. π«-e,--hide-empty-fieldsβ hide empty fields, applies for null, string, object and array fields only. May also be specified with theHL_HIDE_EMPTY_FIELDSenvironment variable. π«₯-E,--show-empty-fieldsβ show empty fields, overrides--hide-empty-fieldsoption. May also be specified with theHL_SHOW_EMPTY_FIELDSenvironment variable. π--input-info <LAYOUTS>[default: auto]β input number and filename layouts. possible values:auto,none,minimal,compact,full. π§Ύ--ascii [<WHEN>][default: auto]β whether to restrict punctuation to ASCII characters only. When enabled, unicode punctuation (like fancy quotes) will be replaced with ASCII equivalents. The actual characters can be configured in the configuration file. possible values:auto,never,always. May also be specified with theHL_ASCIIenvironment variable. π€-x,--expansion [<MODE>][default: auto]β whether to expand fields and messages. Controls how large field values and messages are formatted. Higher expansion levels will break up long content into multiple lines. possible values:never,inline,auto,always. May also be specified with theHL_EXPANSIONenvironment variable. πͺ-o,--output <FILE>β output file. πΎ--output-delimiter <D>[default: newline]β output entry delimiter. Possible values:newline= either lf or crlf, depends on the platform (default);nul= null character (\0). possible values:newline,nul. May also be specified with theHL_OUTPUT_DELIMITERenvironment variable. π§·
π₯ INPUT OPTIONS π₯
--input-format <FORMAT>[default: auto]β input format. possible values:auto,json,logfmt. May also be specified with theHL_INPUT_FORMATenvironment variable. π§--unix-timestamp-unit <UNIT>[default: auto]β unix timestamp unit. possible values:auto,s,ms,us,ns. May also be specified with theHL_UNIX_TIMESTAMP_UNITenvironment variable. β²οΈ--allow-prefixβ allow non-JSON prefixes before JSON log entries. May also be specified with theHL_ALLOW_PREFIXenvironment variable. π--delimiter <DELIMITER>[default: auto]β log entry delimiter. By default, the delimiter is considered to be LF or CRLF followed by an empty line or a line that starts with a character other than'}', a space, or a tab. This works well for most JSON and logfmt logs, including series of pretty-printed JSON objects. Possible values:auto= auto-select delimiter based on input format (default);cr= carriage return (\r);lf= line feed (\n);crlf= carriage return followed by line feed (\r\n);newline= either lf or crlf, whichever comes first;nul= null character (\0). possible values:auto,cr,lf,crlf,newline,nul. May also be specified with theHL_DELIMITERenvironment variable. βοΈ
π§ͺ ADVANCED OPTIONS π§ͺ
--interrupt-ignore-count <N>[default: 3]β number of interrupts to ignore, i.e.Ctrl-C(SIGINT) β yes, Ctrl+C. May also be specified with theHL_INTERRUPT_IGNORE_COUNTenvironment variable. π--buffer-size <SIZE>[default: 256 KiB]β buffer size. May also be specified with theHL_BUFFER_SIZEenvironment variable. π§Ί--max-message-size <SIZE>[default: 64 MiB]β maximum log entry size. May also be specified with theHL_MAX_MESSAGE_SIZEenvironment variable. π-C,--concurrency <N>β number of processing threads. May also be specified with theHL_CONCURRENCYenvironment variable. π§΅--shell-completions <SHELL>β print shell auto-completion script and exit. possible values:bash,elvish,fish,powershell,zsh. π--man-pageβ print man page and exit. π--list-themes[=<TAGS>]β print available themes optionally filtered by tags. possible values:dark,light,16color,256color,truecolor,overlay,base. π--dump-indexβ print debug index metadata (in--sortmode) and exit. π§
π VERSION π
v0.36.3 β that's the version, bestie. she's serving v0.36.3 energy. periodt π
Source/version hl 0.36.3; manual hl(1); and the date on this page is its own footer date β consider it signed, sealed, and slayed. bye bestie π
β¨
π¦ where this page comes from
- nixpkgs unstable: hl-log-viewer 0.36.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms