Skip to main content

Paste or pipe any error message and get a plain-English explanation powered by Claude

Project description

errex — Error Explainer

CI PyPI version Python versions

Paste or pipe any error message and get a clear, plain-English explanation powered by Claude.

$ cat traceback.txt | errex

────────────────────── errex — Error Analysis ──────────────────────

**TypeError: unsupported operand type(s) for +: 'int' and 'str'**

This is a Python type error. You're trying to add an integer and a
string together, which Python doesn't allow...

Install

pip install errex
export ANTHROPIC_API_KEY=sk-ant-...

Requires Python 3.9+ and an Anthropic API key.

Quick start

errex                        # interactive paste
errex traceback.txt          # read from a file
cat error.log | errex        # pipe from stdin
errex --watch server.log     # tail a log, auto-explain errors

All flags

Explaining errors

Flag What it does
errex [FILE] Explain an error from a file, stdin, or interactive paste
--brief One-paragraph summary instead of full analysis
--fix Output only the fix command, no explanation
--lang LANG Language hint when the error is ambiguous (e.g. rust, go, java)
--model MODEL Choose which Claude model to use (default: claude-sonnet-4-6)
--json Structured JSON output: error_type, root_cause, fix_steps, gotchas
--context FILE Attach a source file as extra context for more targeted explanations
errex A.txt B.txt Compare two error files and find shared root causes

Code tools

Flag What it does
--explain-code FILE Walk through what a piece of code does in plain English
--lint FILE Scan a code file for bugs, security issues, and anti-patterns
--test-gen FILE Generate a test case for a code file; pipe an error to reproduce the bug
--explain-diff [FILE] Explain a git diff — pipe git diff | errex --explain-diff or pass a .patch file

History & search

Flag What it does
--history [SEARCH] View past explanations, optionally filtered by keyword
--recent [N] Show the last N explanations (default: 5)
--similar Find past errors in your history that match the current one
--ask "question" Ask a follow-up about the last error without re-explaining it
--retry Re-explain the last error with different flags (e.g. --retry --model claude-opus-4-7)
--stats Usage dashboard: total runs, models, top error types, busiest day/hour
--export FILE Export history to a styled HTML or Markdown file (--export-format html|md)
--clear-history [DAYS] Delete all history, or only entries older than N days

Workflow

Flag What it does
--watch LOGFILE Tail a log file and auto-explain new errors (deduplicates repeats)
--summarize-log FILE Digest all distinct error types in a large log file
--issues Search GitHub Issues for bugs matching your error
--share Post the explanation to paste.rs and print a shareable link
--copy Copy the explanation to the clipboard
--chat Stay in a Q&A loop after the explanation
--notify Send a desktop notification when the explanation is ready

Setup & config

Flag What it does
--config [key=value] View or edit ~/.errexrc — e.g. --config model=claude-opus-4-7
--setup First-run wizard: check API key, detect languages, write config, install shell integration
--scan Scan common log locations for recent error files and pick one to explain
--install-shell Add errex-last() to your shell — run it after any failed command
--web Launch a local web UI at http://localhost:7337
--tokens Show input/output token counts after each explanation
--update Check PyPI for a newer version
--version Show the installed version

Config file

~/.errexrc sets your defaults (all fields optional):

{
  "model": "claude-opus-4-7",
  "brief": false,
  "lang": "python",
  "copy": false
}

Or manage it from the CLI:

errex --config                        # show all settings
errex --config model=claude-opus-4-7  # set a value
errex --config lang=null              # reset to default

Shell integration

errex --install-shell   # adds errex-last() to ~/.zshrc or ~/.bashrc

After any failed command, run errex-last to explain why it failed.

History

Every explanation is saved to ~/.errex_history (one JSON object per line).

errex --recent           # last 5 explanations
errex --history KeyError # search history
errex --stats            # usage dashboard
errex --export report.html  # export to HTML

What you get

For any error, errex explains:

  1. What kind of error it is and which language or tool produced it
  2. What it means in plain English
  3. The most likely root cause, ranked by probability
  4. Numbered fix steps with code snippets where helpful
  5. Common gotchas — the non-obvious things that trip people up

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

errex-0.9.0.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

errex-0.9.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file errex-0.9.0.tar.gz.

File metadata

  • Download URL: errex-0.9.0.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for errex-0.9.0.tar.gz
Algorithm Hash digest
SHA256 cf3c7373c6314c71f6ccf4d092e96d9c8fce3554954c23bb85d574a809c84641
MD5 3297f15fecf744b9d6d4a27213ba0864
BLAKE2b-256 75a23ae4617e174b9ba4d45c27029eb394b066e59a6ed2ac678f873502842fd5

See more details on using hashes here.

File details

Details for the file errex-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: errex-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for errex-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea1056136dd09c374748105ff20f094cd5f3e8e8d86c6d8e455aa647c37f4442
MD5 1c8795891087ae7d8f92639aa9acf372
BLAKE2b-256 1a89173139a02d3fdbe6a4a7371915581121da37e678bf5ff13a86afcf7cb85b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page