AI-Native tmux Log Copilot for Support Incident Tracking
LogPilot captures live tmux pane output, performs real-time log analysis (anomaly detection, deduplication, clustering), and exposes structured incident context via MCP (Model Context Protocol) to Claude Code/Codex for AI-assisted incident response.
π Homepage
β¨ Demo
- Rust β A language empowering everyone to build reliable and efficient software
- tmux β A terminal multiplexer
- tokio: A runtime for writing reliable asynchronous applications with Rust.
- clap: A full featured, fast Command Line Argument Parser for Rust
- serde: A generic serialization/deserialization framework
- crossterm: A crossplatform terminal manipulation library
- dashmap: A fast concurrent hashmap
- sqlx: The Rust SQL Toolkit
- uuid: A library to generate and parse UUIDs
- chrono: Date and time library for Rust
- tracing: A scoped, structured logging and diagnostics system
- regex: An implementation of regular expressions for Rust
- src/analyzer: Anomaly detection and pattern analysis.
- src/buffer: Log storage with ring buffer and SQLite persistence.
- src/capture: tmux integration for streaming log capture.
- src/cli: CLI commands (watch, summarize, ask, status, mcp-server).
- src/mcp: MCP protocol implementation for AI context bridge.
- src/models: Data structures (LogEntry, Session, Pattern, Alert, etc.).
- src/pipeline: Log processing (parse, dedup, cluster).
- src/observability.rs: Structured logging and metrics.
- tests/: Integration and unit tests.
- completions/: Shell completions for bash, zsh, fish.
cargo install logpilotOr install directly from GitHub:
cargo install --git https://github.com/jellydn/logpilot --lockedOr build from source:
git clone https://github.com/jellydn/logpilot
cd logpilot
cargo build --release# Watch an existing tmux session
logpilot watch my-session
# Watch with custom buffer duration
logpilot watch my-session --buffer 10
# Watch specific pane
logpilot watch my-session --pane my-session:1.0# Summary of last 10 minutes
logpilot summarize --last 10m
# JSON output for scripting
logpilot summarize --last 5m --format json# Format query for Claude/Codex
logpilot ask "Why are checkout requests failing?"
# Include raw logs in context
logpilot ask "What changed in the last hour?" --include-logslogpilot statusCreate ~/.config/logpilot/config.toml (see config.example.toml):
[buffer]
duration_minutes = 30
max_memory_mb = 100
persist_severity = ["ERROR", "FATAL"]
[alerts]
recurring_error_threshold = 5
error_rate_threshold_per_minute = 10
[mcp]
enabled = true
transport = "stdio"LogPilot exposes an MCP server for Claude Code integration:
logpilot mcp-server --verboseAdd to your Claude Code configuration (~/.claude/config.json):
{
"mcp_servers": [
{
"name": "logpilot",
"command": "logpilot",
"args": ["mcp-server"],
"env": {}
}
]
}cargo testRUST_LOG=info cargo run -- watch my-session# Bash
source completions/logpilot.bash
# Zsh
source completions/logpilot.zsh
# Fish
source completions/logpilot.fishThis project uses pre-commit to enforce code quality. To install hooks:
pre-commit installThis project is licensed under the MIT License - see the LICENSE file for details.
- Website: https://productsway.com/
- Twitter: @jellydn
- Github: @jellydn
Give a βοΈ if this project helped you!
Thanks goes to these wonderful people:
This project follows the all-contributors specification. Contributions of any kind welcome!