BugBee
AI-powered CLI debugging assistant that automatically analyzes runtime errors, retrieves relevant documentation using RAG, and suggests or applies intelligent fixes.
BugBee wraps your terminal commands, intercepts runtime failures, analyzes the traceback, retrieves relevant documentation from official sources, and uses an LLM to explain and optionally fix the issue.
Features
- AI-powered debugging using DeepSeek-R1
- Retrieval-Augmented Generation (RAG) using ChromaDB
- Automatic traceback parsing
- Context-aware code analysis
- Retrieval from official framework documentation
- SHA256-based intelligent response caching
- Automatic code patch generation
- Validation after applying fixes
- Metrics collection
- Cross-platform support (Windows, Linux, macOS)
- Packaged for PyPI
Architecture
User Command
│
▼
Execute Target Program
│
▼
Capture stderr
│
▼
Parse Traceback & Context
│
▼
Compute Error Hash
│
┌──────────┴──────────┐
│ │
▼ ▼
Cache Hit Cache Miss
│ │
│ Retrieve Docs
│ │
│ ▼
│ ChromaDB Search
│ │
│ ▼
└────────► DeepSeek-R1 ◄─────────
│
▼
AI Diagnosis + Fix
│
▼
Optional Auto Patch
│
▼
Validation Run
│
▼
Metrics
Installation
pip install bugbee
Configuration
Create a .env file in your project.
HF_TOKEN=your_huggingface_api_key
You can obtain a Hugging Face token from:
https://huggingface.co/settings/tokens
Usage
Analyze a Python script:
bugbee run python app.py
Analyze any command:
bugbee run pytest
bugbee run uv run main.py
Display help:
bugbee --help
Example
Original error
name = "BugBee"
print(nmae)
BugBee output
🐝 BugBee Analysis
Root Cause
-----------
NameError: name 'nmae' is not defined
Suggested Fix
-------------
Replace
print(nmae)
with
print(name)
After confirmation, BugBee automatically:
- Updates the file
- Creates a backup
- Executes a validation run
- Reports success or failure
How It Works
- Execute the requested command.
- Capture stderr output.
- Parse traceback to identify the source file and line number.
- Extract surrounding source code.
- Generate a unique hash of the error.
- Check the local cache.
- Retrieve relevant documentation using ChromaDB.
- Send the prompt to DeepSeek-R1.
- Parse the structured response.
- Display the diagnosis.
- Optionally apply the generated fix.
- Validate the updated program.
- Record metrics.
Technologies
- Python
- Typer
- LangChain
- ChromaDB
- Sentence Transformers
- Hugging Face
- DeepSeek-R1
- Pydantic
- Rich
Metrics
BugBee records useful runtime metrics including:
- Successful analyses
- Cache hit rate
- Average latency
- Token usage
- Auto-fix count
- Validation success rate
Roadmap
v0.2
- Multiple LLM providers
- Better framework detection
- Improved retrieval pipeline
v0.3
- AST-based patch generation
- Framework-specific fix templates
- Smarter patch validation
v1.0
- VS Code extension
- Plugin system
- Multi-language support
- Interactive terminal UI
Contributing
Contributions are welcome!
Please read CONTRIBUTING.md before submitting pull requests.
License
Apache License 2.0
Author
Pranav Kurmadasu
If you found BugBee useful, consider giving the repository a ⭐.
Metadata
Release files for bugbee 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bugbee-0.1.3.tar.gz | 29.2 kB | With provenance | Details for bugbee-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bugbee-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for bugbee-0.1.3-py3-none-any.whl |
Total release size: 59.3 kB
Release files / bugbee-0.1.3.tar.gz
| Download URL | bugbee-0.1.3.tar.gz |
|---|---|
| Size | 29.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38a1ff9002fb3e0657bdeac17d915c70a3fe384012f38960339132457e440693
|
|
BLAKE2b-256 checksum How to use checksums |
175f4fb578da05114f7afbb0ccb284fd4b65f75ad8cb3c0928c26e911dd9634b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / bugbee-0.1.3-py3-none-any.whl
| Download URL | bugbee-0.1.3-py3-none-any.whl |
|---|---|
| Size | 30.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ec2694b94918bd2b0d43ee97717cea633d630046b138265a95902379a372300
|
|
BLAKE2b-256 checksum How to use checksums |
a1b4b1514826f77728549d692a81759446c1dae7eaed85d162604311f43949ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for bugbee 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bugbee-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.