log-genius 🤖💡
Don't read logs. Understand them.
log-genius is a smart CLI tool that uses AI to analyze and explain complex logs. Stop deciphering cryptic error messages and get human-readable summaries, potential causes, and actionable solutions directly in your terminal.

Why log-genius?
- ⚡️ Instant Clarity: Turns hundreds of lines of confusing logs into a clear, concise explanation.
- 🎯 Actionable Solutions: Provides concrete code snippets and configuration changes to fix the problem.
- 🧑💻 For Every Developer: Whether you're in frontend, backend, or DevOps,
log-geniusspeaks your language. - Seamless Workflow: Integrates perfectly with your existing workflow using standard Unix pipes.
docker-compose logs | log-geniusis all you need.
Features
- AI-Powered Analysis: Leverages large language models (like GPT-4o) to understand context and provide intelligent solutions.
- Pipe-Friendly: Works seamlessly with standard input.
- File Input: Analyze saved log files directly:
log-genius error.log. - Readable Output: Formatted and colorized for maximum readability.
- Blazingly Fast: Written in Rust for performance and reliability.
Installation
Prerequisites
You must have an OpenAI API key. You can get one from the OpenAI Platform.
1. Using cargo (Recommended)
If you have the Rust toolchain installed, you can install log-genius with a single command:
2, From Binaries
Download the pre-compiled binary for your operating system from the Releases page. Unzip it and place it in a directory within your $PATH.
3. From Source
- Clone the repository:
- Build the project:
- The executable will be located at
target/release/log-genius.
Setup
log-genius requires your OpenAI API key to function. Set it as an environment variable:
To make this permanent, add the line above to your shell's configuration file (e.g., .zshrc, .bash_profile, or .bashrc).
Alternatively, you can create a .env file in the directory where you run log-genius (or in your project's root) with the following content:
# .env
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Usage
log-genius is designed to be simple and intuitive.
Piping from another command (most common)
Pipe the output of any command that generates logs directly into log-genius.
# Analyze Docker Compose logs
|
# Analyze Kubernetes pod logs
|
# Analyze a service's journald logs
|
Analyzing a file
You can also pass a log file path as an argument.
Contributing
Contributions are welcome! Whether it's a bug report, a feature request, or a pull request, please feel free to get involved. Check out the CONTRIBUTING.md file for more details.