11# LogPilot 🧭
22
3+ [ ![ CI] ( https://github.com/clarabennett2626/logpilot/actions/workflows/ci.yml/badge.svg )] ( https://github.com/clarabennett2626/logpilot/actions/workflows/ci.yml )
4+ [ ![ Release] ( https://github.com/clarabennett2626/logpilot/releases/latest/badge.svg )] ( https://github.com/clarabennett2626/logpilot/releases/latest )
5+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/clarabennett2626/logpilot )] ( https://goreportcard.com/report/github.com/clarabennett2626/logpilot )
6+ [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-blue.svg )] ( LICENSE )
7+
38** Multi-source structured log viewer for the terminal.**
49
510Stream, search, and correlate logs from files, Kubernetes, Docker, SSH, and more — all in one TUI.
611
7- ## Features (Roadmap)
8-
9- - 📂 ** Multi-source** : Local files, Kubernetes pods, Docker containers, SSH remote, stdin/pipe
10- - 🔍 ** Smart parsing** : Auto-detects JSON, logfmt, syslog, CLF, plain text
11- - ⚡ ** Fast filtering** : Field-based queries (` level=error service=auth latency>500ms ` )
12- - 📊 ** Timeline visualization** : ASCII sparklines showing error rates over time
13- - 🔗 ** Trace correlation** : Follow request IDs across multiple log sources
14- - ⌨️ ** Vim keybindings** : Navigate logs like you navigate code
15- - 📦 ** Zero infrastructure** : No Elasticsearch, no Loki — runs entirely in your terminal
12+ ## Features
13+
14+ ### ✅ Implemented
15+ - 🔍 ** Format auto-detection** — Automatically identifies JSON, logfmt, and plain text log formats
16+ - 🎨 ** Color-coded rendering** — Log levels rendered with distinct colors (DEBUG=gray, INFO=blue, WARN=yellow, ERROR=red, FATAL=red bold)
17+ - ⏰ ** Flexible timestamps** — Configurable display: relative ("2m ago"), ISO 8601, or local time
18+ - 🌗 ** Theme support** — Dark and light terminal themes
19+ - 📂 ** File reader** — Read and tail local log files with rotation handling and glob patterns
20+ - 📥 ** Stdin/pipe support** — Composable with any command: ` kubectl logs -f | logpilot `
21+ - ⚡ ** Backpressure handling** — Configurable strategies (block or drop-oldest) for high-throughput streams
22+ - 🔄 ** Log rotation** — Detects file truncation and replacement, reopens automatically
23+ - 📊 ** Multi-file tailing** — Monitor multiple log files simultaneously with glob patterns
24+
25+ ### 🚧 Coming Soon
26+ - ☸️ ** Kubernetes source** — Stream logs directly from pods
27+ - 🐳 ** Docker source** — Tail container logs
28+ - 🔗 ** SSH remote** — Read logs from remote servers
29+ - 🔎 ** Field-based filtering** — Queries like ` level=error service=auth latency>500ms `
30+ - 📈 ** Timeline visualization** — ASCII sparklines for error rates
31+ - 🔗 ** Trace correlation** — Follow request IDs across sources
32+ - ⌨️ ** Vim keybindings** — Navigate logs like code
1633
1734## Installation
1835
36+ ### From Release (recommended)
37+
38+ Download the latest binary for your platform from [ Releases] ( https://github.com/clarabennett2626/logpilot/releases/latest ) .
39+
40+ ``` bash
41+ # Linux (amd64)
42+ curl -L https://github.com/clarabennett2626/logpilot/releases/latest/download/logpilot_0.1.0_linux_amd64.tar.gz | tar xz
43+ sudo mv logpilot /usr/local/bin/
44+
45+ # macOS (Apple Silicon)
46+ curl -L https://github.com/clarabennett2626/logpilot/releases/latest/download/logpilot_0.1.0_darwin_arm64.tar.gz | tar xz
47+ sudo mv logpilot /usr/local/bin/
48+ ```
49+
50+ ### From Source
51+
1952``` bash
20- # Go install
2153go install github.com/clarabennett2626/logpilot/cmd/logpilot@latest
54+ ```
2255
23- # Or download from releases
24- # https://github.com/clarabennett2626/logpilot/releases
56+ ### Verify Installation
57+
58+ ``` bash
59+ logpilot --version
60+ # logpilot 0.1.0 (abc1234) built 2026-02-17T...
2561```
2662
2763## Quick Start
@@ -30,12 +66,71 @@ go install github.com/clarabennett2626/logpilot/cmd/logpilot@latest
3066# View a local log file
3167logpilot app.log
3268
69+ # Tail a log file (follows new lines)
70+ logpilot -f /var/log/app.log
71+
3372# Pipe from another command
3473kubectl logs -f my-pod | logpilot
74+ docker logs -f my-container | logpilot
75+ cat /var/log/syslog | logpilot
76+
77+ # Multiple files with glob
78+ logpilot /var/log/* .log
79+ ```
80+
81+ ## Supported Log Formats
82+
83+ LogPilot auto-detects the format from the first few lines:
84+
85+ ### JSON
86+ ``` json
87+ {"timestamp" :" 2026-02-17T20:30:00Z" ,"level" :" error" ,"message" :" connection timeout" ,"service" :" api" ,"latency_ms" :1523 }
88+ ```
3589
36- # Multiple sources (coming soon)
37- logpilot app.log k8s://default/api-server docker://redis
90+ ### Logfmt
3891```
92+ ts=2026-02-17T20:30:00Z level=error msg="connection timeout" service=api latency_ms=1523
93+ ```
94+
95+ ### Plain Text
96+ ```
97+ 2026-02-17 20:30:00 ERROR connection timeout
98+ Feb 17 20:30:00 myhost app[1234]: connection timeout
99+ ```
100+
101+ ## Architecture
102+
103+ ```
104+ cmd/logpilot/ → CLI entry point
105+ internal/
106+ parser/ → Format detection & parsing (JSON, logfmt, plain)
107+ source/ → Log sources (file, stdin; k8s, docker coming soon)
108+ tui/ → Terminal UI rendering (Bubble Tea + Lipgloss)
109+ config/ → Configuration
110+ filter/ → Query engine (coming soon)
111+ merge/ → Multi-source merge (coming soon)
112+ ```
113+
114+ ## Development
115+
116+ ``` bash
117+ # Build
118+ go build -o logpilot ./cmd/logpilot/
119+
120+ # Test
121+ go test ./... -v -race
122+
123+ # Benchmark
124+ go test -bench=. ./internal/parser/
125+
126+ # Lint
127+ go vet ./...
128+ ```
129+
130+ ## CI/CD
131+
132+ - ** CI** : Tests run on Go 1.22, 1.23, and 1.24 for every PR and push to main
133+ - ** Release** : GoReleaser builds binaries for linux/darwin/windows × amd64/arm64 on version tags
39134
40135## Keybindings
41136
@@ -48,10 +143,6 @@ logpilot app.log k8s://default/api-server docker://redis
48143| ` n ` /` N ` | Next/previous match |
49144| ` q ` | Quit |
50145
51- ## Status
52-
53- 🚧 ** Early development** — Phase 1 (MVP) in progress.
54-
55146## License
56147
57148MIT
0 commit comments