← Index
Source available2026

wtf

Terminal error diagnosis that knows your machine

The problem

Pasting a traceback into a chatbot throws away everything that made the error diagnosable: which Python you are on, what is actually installed, what `requirements.txt` asked for, and whether your virtualenv is even active. The model gets the symptom and none of the context.

What I built

  • Wraps an arbitrary command — `wtf pytest tests/` — and only engages on failure, so it costs nothing when things work.
  • Reads the local environment to detect the failure modes that generic advice always misses: version mismatches against `requirements.txt`, and an inactive virtualenv.
  • Ships a rule-based mode that needs no API key at all, so the common errors resolve fully offline.
  • `--local` routes inference to Ollama so nothing leaves the machine, and `--dry-run` prints the exact payload before anything is sent.
  • Sends deliberately little: the traceback, five lines around the failure rather than whole files, package names and versions, and environment variable *names* only — never their values.

Stack

PythonOllamaRule-based inference

Note

Not published to a package index. The `wtf-cli` name on PyPI belongs to an unrelated project, so this installs from source until I rename it.

Next

TabScribe

A research assistant running entirely on-device through Chrome's built-in Gemini Nano — summarizing, rewriting, translating and citing without a single network call.