contextzip
Documentation · 3 of 6

Terminal error watcher.

Wrap any dev server. The moment an error surfaces, package a debug-ready context in one keypress — no restart, no manual file hunting, no copy-pasting stack traces.

How it works

contextzip watch starts your process normally and buffers its output in the background. You see output exactly as you would without it — no restart, no interruption — while contextzip watches the stream for errors. When one is detected, a prompt appears directly beneath the error output.

~/projects/my-app

$ contextzip watch -- npm run dev

TypeError: Cannot read properties of undefined

at LoginForm (app/login/page.tsx:42)

contextzip · error detected

Press D to package debug context · S to skip

Press D and contextzip immediately writes .contextzip/output/debug-context.zip. Your server keeps running.

What's in the ZIP

FileContents
prompt.txtAuto-generated: detected framework, error type, and a ready-to-paste task description
terminal-error.txtThe cleaned, noise-stripped error block and stack trace — ANSI colour codes stripped
source-files.zipSource files referenced in the stack trace, paths preserved

On Ctrl+C, if no errors were packaged during the session, contextzip offers one final prompt to capture the full session output — useful when something looked wrong but didn't match a known error pattern.

Supported frameworks

Python, Django, FastAPI, Node.js, Next.js, and React each have their own error-detection patterns and noise filters, so the extracted output stays clean and relevant across stacks — a Python traceback and a Next.js overlay are recognised and cleaned differently.

~/projects/api

$ contextzip watch -- python manage.py runserver

Detected: Django

Watching for Python/Django error patterns…

Notes & limitations

Works best with dev servers that don't read stdin interactively — npm run dev, manage.py runserver, and similar. PTY emulation isn't used, so on Windows colour passthrough may be limited — running in Windows Terminal or the VS Code integrated terminal gives the best results.

Want the AI to pick the files instead?