lv is a fast, interactive, and modern command-line log viewer built with Go and Bubbletea. It's designed to make analyzing large log files effortless with vim-like navigation, powerful filtering, and time-travel capabilities.
- ⚡ Fast & Interactive: Smooth scrolling and navigation, even for large files.
- 🔍 Powerful Filtering:
- Text Search: Standard search (
/) with regex support (Ctrl+r). - Date Range: Filter logs between specific dates (
[and]). - Log Levels: Quickly toggle visibility of ERROR, WARN, INFO, and DEBUG logs.
- Text Search: Standard search (
- ⏰ Time Travel: Jump instantly to a specific time (e.g., "14:30") using
J. - 👀 Live Monitoring:
- Follow Mode: Auto-scroll to new logs (
f), similar totail -f. - Timeline View: Visualize log distribution over time (
t).
- Follow Mode: Auto-scroll to new logs (
- 🧠 Smart Analysis:
- Stack Trace Folding: Collapse complex stack traces (
z) for better readability. - Bookmarks: Mark important lines (
m) and navigate between them (n/N).
- Stack Trace Folding: Collapse complex stack traces (
- 💻 Developer Friendly:
- Vim-bindings: Natural navigation for vim users (
j,k,g,G). - Pipe Support: Pipe logs directly:
cat app.log | lv. - Responsive: Adapts to any terminal size with toggleable word wrap (
w).
- Vim-bindings: Natural navigation for vim users (
You can install lv using the provided installation script:
./install.shThis will build the binary and move it to /usr/local/bin (may require sudo).
If you have Go installed:
go install github.com/rajeshkannanramakrishnan/lv@latestgit clone https://github.com/rajeshkannanramakrishnan/lv.git
cd lv
go build -o lv main.go
sudo mv lv /usr/local/bin/brew tap RajeshkannanRamakrishnan/homebrew-lv
brew install lvOpen a file:
lv app.logRead from stdin:
cat app.log | lv
kubectl logs pod-name | lv| Key | Action |
|---|---|
j / Down |
Scroll down |
k / Up |
Scroll up |
d / Ctrl+d |
Scroll down (half page) |
u / Ctrl+u |
Scroll up (half page) |
g / Home |
Go to Top |
G / End |
Go to Bottom |
m |
Toggle Bookmark |
n / N |
Next / Previous Bookmark |
| Key | Action |
|---|---|
/ |
Start Search |
Ctrl+r |
Toggle Regex Search |
Esc |
Clear Filter / Cancel |
[ / ] |
Set Start / End Date Filter |
1 - 4 |
Toggle ERROR / WARN / INFO / DEBUG |
| Key | Action |
|---|---|
J |
Time Travel (Jump to time) |
f |
Toggle Follow Mode (Live tail) |
t |
Toggle Timeline View |
z |
Toggle Stack Trace Folding |
w |
Toggle Word Wrap |
y |
Copy selection to clipboard |
q |
Quit |
MIT License - see the LICENSE file for details.