Skip to content

jellydn/logpilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Welcome to LogPilot πŸš€

Version License Rust CI

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

πŸ’» Stack

πŸ“ 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

Star History 🌟

Star History Chart

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!

About

AI-Native tmux Log Copilot for Support Incident Tracking

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors