@dat999zx/werr
v0.1.1
Published
CLI tool that explains why your terminal command failed using local AI
Maintainers
Readme
WERR
Stop reading 3000 lines of logs. Let WERR tell you why it failed.
WERR is a CLI tool that analyzes failed terminal commands and explains the root cause in plain English using local LLMs.
Before WERR
mvn test
# 2500 lines of logs...
# Manually searching for exceptions, stack traces, root causesWith WERR
werr mvn test❌ BUILD FAILED
Root Cause:
NullPointerException
Location:
UserService.java:42
Explanation:
The variable "user" is null before getName() is called.
Suggested Fixes:
- Check constructor initialization
- Check dependency injection
- Check database query resultInstall
npm install -g werrSetup
WERR uses Ollama for local AI inference. Install Ollama first, then:
werr modelSelect a model from your installed Ollama models. Done.
Usage
werr <command>Works with any CLI tool:
werr mvn test
werr gradle build
werr python app.py
werr cargo run
werr docker compose upFlags
werr --raw mvn test # Show full output + analysis
werr --level beginner mvn test # Beginner-friendly explanation
werr --level senior mvn test # Concise technical analysisOther Commands
werr model # Set or change AI model
werr last # Re-analyze last failure
werr doctor # Health check
werr config show # Show current configHow It Works
- Runs your command and streams output in real time
- On failure, detects the error type (Java, Python, Rust, etc.)
- Extracts the root cause from potentially thousands of log lines
- Checks the built-in knowledge base for instant explanations
- Falls back to AI only when needed — with minimal, extracted context
The extraction engine is more important than the model. WERR sends 20–100 relevant lines to the LLM, not 5000.
Key Principles
- Root cause first — extraction before AI
- Runs locally — no API keys, no cloud, no registration
- On-demand — nothing runs in the background
- Fast — known errors explained in < 200ms, AI in < 5 seconds
- Never fails silently — always shows something useful, even without AI
Requirements
- Node.js >= 18
- Ollama running locally
License
This project is licensed under a custom Non-Commercial Copyleft License (Source-Available). You are free to use and modify it for non-commercial purposes, but any distribution or modifications must remain open-source under this same license, and you cannot make profit from it.
