ltm

Crates.ioltm
lib.rsltm
version0.1.1
created_at2025-12-22 05:14:32.56945+00
updated_at2025-12-22 05:45:55.214298+00
descriptionTerminal log viewer with whole-line filters, bookmarks, timeline scrub, and live tail
homepagehttps://github.com/LxYuan0420/log-time-machine
repositoryhttps://github.com/LxYuan0420/log-time-machine
max_upload_size
id1999091
size2,206,231
Lik Xun Yuan (Lx) (LxYuan0420)

documentation

README

Log Time Machine (Ratatui)

Fast, glanceable terminal log viewer: keep your place while new logs stream in, filter the whole line, and hop through bookmarks without losing context. Built for everyday ops/debugging rather than a toy demo.

Features

  • Tail live logs without losing lines: auto-pause when you scroll; resume with space/g. Default tailing starts at the end (live-only) for speed on large files.
  • Whole-line filtering with live typing; toggle regex; clear in one keystroke.
  • Level chips (INFO/WARN/ERROR) with strikethrough when disabled.
  • Bookmark jumps with position display; timeline scrub with cursor/bookmark markers.
  • Timeline bands colored by level mix for quick “what’s noisy?” reads.
  • Baseline overlay: record a normal run and compare later with ghost timeline, drift markers, and token deltas.
  • Built-in mock source so ltm works out of the box; file/stdin tailing for real feeds.

Quick start

  • Watch the demo: asciinema cast
  • Install: cargo install ltm
  • Default mock (no setup): ltm
  • Tail a file (default: from end, live-only): ltm --file <path-to-your-log>
  • Tail stdin: cat <your-log> | ltm --stdin
  • Record a baseline profile: ltm --file <path> --baseline-record /tmp/ltm_baseline.json
  • Compare against a baseline: ltm --file <path> --baseline-compare /tmp/ltm_baseline.json
  • Help: ltm --help
asciicast

Controls (in-app command bar)

  • Quit: q / Ctrl-C
  • Pause/live: space, g/End
  • Scroll: Up/Down/k/j, PageUp/PageDown, Home/End
  • Timeline: Left/Right
  • Filters: / to type (filter matches timestamp/level/target/message), Enter apply, Esc cancel, F/C clear, R regex, 1/2/3 toggle INFO/WARN/ERROR, n/p next/prev error
  • Bookmarks: b add, ]/[ next/prev (status shows which bookmark you’re on)
  • Help: ?

Configuration

Optional LOGTM_CONFIG or ~/.config/logtm/config.toml with max_lines = <n> to cap retained lines. Defaults keep memory bounded.

LTM screenshot

Development

  • Run the built-in mock feed: cargo run (or make run-mock)
  • Tail the included sample log: cargo run -- --file samples/sample.log (or make run-sample)
  • Generate and view a live file (script produces the stream, TUI tails it): bash scripts/mock_log_stream.sh /tmp/logtm_live.log >/dev/null 2>&1 & cargo run -- --file /tmp/logtm_live.log

Troubleshooting (macOS)

  • If cargo fmt/cargo clippy hits dyld/LLVM errors, prefer rustup first in PATH: export PATH="$HOME/.cargo/bin:$PATH"
Commit count: 0

cargo fmt