Skip to content

About

A terminal log viewer for files bigger than your RAM, with vi's keys

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

lv

CI Release Go Reference Go version Licence

A terminal log viewer for files bigger than your RAM, with vi's keys.

Open a 100 GB log on a machine with 10 GB and it starts instantly and stays small: memory depends on your terminal size, not on the file.

  • Huge files, flat memory. Indexing runs in the background; the first screen appears at once.
  • vi keys. j/k, /, n, gg/G, counts, visual mode — and every key can be rebound.
  • Filters that stack. Show only what matches, hide what doesn't, highlight the rest; save the set and reuse it on the next incident.
  • Knows log formats. Kernel, syslog, JSON and ISO-timestamped logs are recognised from their content and coloured; add your own in a few lines.
  • Follows and pages. tail -f for growing files and pipes, and a drop-in $PAGER for git log and friends.

Linux, macOS, FreeBSD, OpenBSD and Windows.

Install

go install github.com/sidcha/log-viewer/cmd/lv@latest

Or download a binary from the releases page, run it with nix run github:sidcha/log-viewer or add it to a Nix config (see Nix), or build from source with make build (see development).

Quick start

lv /var/log/syslog              # open a file
lv -f /var/log/kern.log         # follow it, like tail -f
journalctl -f | lv -f           # follow a pipe
git log | lv                    # use it as a pager
lv -o ERROR -N healthcheck app.log   # only ERROR lines, never healthcheck
lv -r incident.json app.log     # reuse rules saved earlier
lv -r api.rules api.log worker.log    # several files; ] and [ switch

Inside lv:

Key Does
j k gg G move down, up, to the top, to the end
C-d C-u Space half page down / up, page down
/ ? n N search forward, back, next, previous
f fuzzy-find a line and jump to it
& ! m show only / never show / highlight matching lines
= list, edit and toggle your rules
\ turn every rule off for a moment
F follow the end of the file
: command line (:42, :set wrap, :w out.log)
F1 help
q quit

These are defaults — see key bindings for the full map and how to change any of it.

Documentation

Licence

Apache-2.0. See LICENSE.

About

A terminal log viewer for files bigger than your RAM, with vi's keys

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages