Metadata-Version: 2.4
Name: dbgagent
Version: 0.1.2
Summary: AI-powered code assistant — auto-fix, review, and simplify your entire codebase
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: ai,code-review,debugger,simplify,llm,groq,openai,claude
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: openai
Requires-Dist: anthropic
Requires-Dist: python-dotenv
Requires-Dist: rich
Provides-Extra: mcp
Requires-Dist: mcp[cli]>=1.0; extra == "mcp"

# dbgagent

**AI-powered code assistant** — auto-fix, review, and simplify your entire codebase.

> Built by [Aryan Tyagi](https://github.com/aryantyagi2211)

---

## What is dbgagent?

dbgagent scans your codebase, finds problems, and fixes them with AI. Four commands:

1. **fix** — Auto-find files with errors, fix them
2. **allfix** — Scan entire codebase, find all errors, ask before fixing
3. **review** — Review every file, show issues as bullet points
4. **simplify** — Find over-engineering, simplify code

---

## Install

```bash
pip install dbgagent
```

### Upgrade

```bash
pip install --upgrade dbgagent
```

### Uninstall

```bash
pip uninstall dbgagent
```

---

## Setup

You need a free API key from [Groq](https://console.groq.com):

1. Sign up at [console.groq.com](https://console.groq.com) (free)
2. Copy your API key
3. Set it in a `.env` file in your project:

```
GROQ_API_KEY=your_key_here
```

Or use OpenAI / Anthropic:

```
LLM_PROVIDER=OPENAI
OPENAI_API_KEY=your_key_here
```

```
LLM_PROVIDER=ANTHROPIC
ANTHROPIC_API_KEY=your_key_here
```

---

## Usage

### Fix files with errors

Scans your codebase, finds files that crash, and fixes them:

```bash
dbgagent fix
dbgagent fix ./myproject
```

### Fix all errors

Scans entire codebase, shows all errors, asks before fixing each:

```bash
dbgagent allfix
dbgagent allfix ./myproject
```

### Review codebase

Reviews every file, shows issues as bullet points. No code changes:

```bash
dbgagent review
dbgagent review ./myproject
```

### Simplify code

Finds over-engineering, shows diffs, asks before applying:

```bash
dbgagent simplify
dbgagent simplify ./myproject
```

---

## How it works

When you run a command, dbgagent:

1. Asks which directories to skip (`.git`, `node_modules`, etc.)
2. Scans all `.py` files in the codebase
3. For `fix`/`allfix`: runs each file, catches errors, sends to AI, gets fixes
4. For `review`: sends each file to AI for code review
5. For `simplify`: sends each file to AI for simplification
6. Shows results and asks before making changes

Your files are **never modified** until you say "yes".

---

## Commands

| Command | What it does |
|---------|-------------|
| `dbgagent fix [path]` | Auto-find and fix files with errors |
| `dbgagent allfix [path]` | Scan codebase, fix all errors |
| `dbgagent review [path]` | Review codebase, show issues |
| `dbgagent simplify [path]` | Find over-engineering, simplify |

All commands default to current directory if no path given.

---

## Supported providers

| Provider | Model | Env var |
|----------|-------|---------|
| Groq (default) | llama-3.3-70b-versatile | `GROQ_API_KEY` |
| OpenAI | gpt-4o | `OPENAI_API_KEY` |
| Anthropic | claude-sonnet-4-20250514 | `ANTHROPIC_API_KEY` |

---

## License

MIT
