A fast, keyboard-driven TUI for exploring structured (JSON) logs from stdin or files. It shows a concise log list with selectable rows, a details pane for full JSON, live regex filtering, column toggling/reordering, and vi-like navigation—perfect for tailing services, piping from tools like stern, or inspecting static log files.
- Streaming input: Read from stdin (pipes) or
--filewithout buffering the world. - Pause/resume intake: Hit
sto stop ingesting new lines; resume withs(discarded while paused). - Interactive list + details: Summaries on the left, full JSON on the right; zoom either pane with
z. - Field viewer:
Ctrl+Topens an explorer of every nested field; send a field value into the main/filter with/. - Regex filtering: Hit
/, type a regex, Enter to apply; status bar shows active filter/errors. - Column control: Toggle and reorder columns (including dynamically discovered fields) via
c; horizontal scroll withh/l, jump with0/$. - Autoscroll toggle:
ato stick to the tail or browse without losing your place. - Nested field fallback: Automatically picks
timestamp/level/messagefrom top-level ordata.*. - Graceful for plain text: Non-JSON lines render as
TEXTwith the raw content. - Colorized levels & JSON: Levels are colored per severity; details JSON is syntax-highlighted.
# Run with a file
logtui --file article-api.log
# Pipe logs from stdin
kubectl logs mypod | logtui- Help overlay:
? - Quit:
q,Ctrl+C - Filter (regex):
/(type, Enter to apply, Esc to cancel) - Zoom:
z(zoom focused pane) - Redraw:
Ctrl+L(clears stray artifacts) - Open in
$EDITOR:e - Pause/resume intake:
s(drops incoming lines while paused)
- Move:
j/k,Up/Down - Half page:
Ctrl+d / Ctrl+u - Jump:
g/G - Horizontal scroll:
h/l; jump:0(start),$(end) - Focus details:
Enter,Tab,Right - Column selector:
c - Toggle autoscroll:
a
- Scroll:
j/k,Up/Down - Horizontal scroll (wrap off):
h / l; jump:0(start),$(end) - Half page:
Ctrl+d / Ctrl+u - Jump:
g/G - Back to list:
Tab,Left,Esc - Column selector:
c - Toggle wrap:
w
- Move cursor:
j/k, arrows - Toggle column:
SpaceorEnter - Reorder:
J(down),K(up) - Close:
Esc
- Filter fields: type to filter,
Backspaceto delete,Ctrl+uto clear - Move:
j/k,Up/Down; half page:Ctrl+d / Ctrl+u - Horizontal scroll (wrap off):
h / l; jump:0(start),$(end) - Open in filter:
/(prefills main/filter and returns) - Toggle wrap:
w - Open selected in
$EDITOR:Ctrl+E - Close:
Esc,Ctrl+T - Note:
spauses intake globally (no new fields will arrive while paused).
- Dynamic columns: New fields discovered in logs (top-level and
data.*) appear in the selector; defaults aretimestamp,level,message(withmessageat the end). - Filtering: Applies to timestamp, level, message, and full JSON string. Invalid regex leaves the previous filter active and shows an error.
- Nested fields: If
timestamp/level/messageare underdata.*, they’re used automatically. - Paused intake: While paused (
s), incoming lines are drained and dropped so the view stays stable; resume withs.
cargo check
cargo run -- --file logfile.txt
# or
cat logfile.txt | cargo run- Keep an eye on the status bar: it shows filter input/errors and column selector hints.
- If the screen ever looks odd after a producer prints to stderr,
Ctrl+Lcleans it up. - Wide log records? Use
h/lor0/$to pan horizontally; reorder columns to bring important fields forward.
Enjoy tailing! 🧭