3 releases
| 0.1.2 | Apr 11, 2026 |
|---|---|
| 0.1.1 | Apr 10, 2026 |
| 0.1.0 | Apr 10, 2026 |
#2913 in Command line utilities
315KB
7.5K
SLoC
Welcome to LogPilot 🚀
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
Pre-requirements
- Rust — A language empowering everyone to build reliable and efficient software
- tmux — A terminal multiplexer
💻 Stack
- 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
📝 Project Summary
- 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.
Install
cargo install logpilot
Or install directly from GitHub:
cargo install --git https://github.com/jellydn/logpilot --locked
Or build from source:
git clone https://github.com/jellydn/logpilot
cd logpilot
cargo build --release
Usage
1. Watch a tmux session
# 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
2. Get a summary
# Summary of last 10 minutes
logpilot summarize --last 10m
# JSON output for scripting
logpilot summarize --last 5m --format json
3. Ask AI-assisted questions
# 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-logs
4. Check status
logpilot status
Configuration
Create ~/.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"
MCP Server Mode
LogPilot exposes an MCP server for Claude Code integration:
logpilot mcp-server --verbose
Add to your Claude Code configuration (~/.claude/config.json):
{
"mcp_servers": [
{
"name": "logpilot",
"command": "logpilot",
"args": ["mcp-server"],
"env": {}
}
]
}
Run tests
cargo test
Run with logging
RUST_LOG=info cargo run -- watch my-session
Shell Completions
# Bash
source completions/logpilot.bash
# Zsh
source completions/logpilot.zsh
# Fish
source completions/logpilot.fish
Pre-commit
This project uses pre-commit to enforce code quality. To install hooks:
pre-commit install
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
- Website: https://productsway.com/
- Twitter: @jellydn
- Github: @jellydn
Star History 🌟
Show your support
Give a ⭐️ if this project helped you!
Contributors ✨
Thanks goes to these wonderful people:
This project follows the all-contributors specification. Contributions of any kind welcome!
Dependencies
~54MB
~1M SLoC