Metadata-Version: 2.4
Name: dbgagent
Version: 0.4.0
Summary: AI-powered Python debugger — run a broken script, get root cause, explanation, and fix
Author: Aryan Tyagi
License-Expression: MIT
Project-URL: Homepage, https://github.com/aryantyagi2211/Debug_agent
Project-URL: Issues, https://github.com/aryantyagi2211/Debug_agent/issues
Keywords: debugger,python,ai,llm,groq
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: groq
Requires-Dist: python-dotenv
Requires-Dist: rich

# Debug_agent

AI-powered Python debugger. Run a broken script, get a structured diagnosis with root cause, explanation, and proposed fix.

## Install

```bash
pip install debugagent
```

## Setup

Create a `.env` file in your project folder:

```
GROQ_API_KEY=your_groq_api_key_here
```

Get a free API key at [console.groq.com](https://console.groq.com).

## Usage

```bash
debugagent run brokenscript.py
```

That's it. It will:
1. Run your script and capture the error
2. Read the source code around the error
3. Check requirements.txt and git diff
4. Send everything to an LLM and return a structured diagnosis

## Example

```
$ debugagent run brokenscript.py

Running: brokenscript.py

Script failed (exit 1)

╭─────────────── Traceback ───────────────╮
│ Traceback (most recent call last):      │
│   File "brokenscript.py", line 1        │
│     import nonexistent_module           │
│ ModuleNotFoundError: ...                │
╰─────────────────────────────────────────╯

Analyzing with LLM...

╭─────────────── Root Cause ──────────────╮
│ The module does not exist               │
╰─────────────────────────────────────────╯
╭─────────────── Explanation ─────────────╮
│ The import statement references a       │
│ module that is not installed...         │
╰─────────────────────────────────────────╯
╭─────────────── Proposed Fix ────────────╮
│ Install the module or remove the import │
╰─────────────────────────────────────────╯
```

## License

MIT
