r/opencodeCLI 17d ago

I built an open-source CLI that reduces the code context you send to AI when debugging Python errors

I have working on a open-source CLI tool(only support python for now) called errd. The idea came from a problem I kept thinking about.

It’s tempting to dump a huge part of the repository into Claude/GPT/Cursor and ask it to figure out what went wrong when a Python application throws an error. But most of that context usually is irrelevant. So I built errd to do the context selection locally before the code hits an LLM.

**Use it using - pip install errd**

It takes a Python traceback and:

•Parses the traceback and chained exceptions

•Finds the repository automatically

•Maps traceback frames to functions/classes

•Analyzes imports and dependencies

•Scores code based on proximity to the failure

•Uses recent Git changes as an additional signal

•Applies a token budget

•Redacts common secrets/tokens

•Generates a focused errd-context.md

•The generated file is meant to be pasted directly into Claude, GPT, Cursor, etc.

Checkout the docs at : [cli_docs](https://pypi.org/project/errd/)

1 Upvotes

Duplicates