Metadata-Version: 2.4
Name: python-vibe-cleanup
Version: 1.0.0
Summary: CLI tool to refactor messy AI-generated Python scripts into production-ready code using Claude.
Home-page: https://github.com/yourusername/python-vibe-cleanup
Author: Tejas Sapara
Author-email: tejaspara61@email.com
Keywords: ai refactoring cleanup python code-quality anthropic claude
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: anthropic>=0.25.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: click>=8.1.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# python-vibe-cleanup

A CLI tool that takes any messy, AI-generated Python script and rewrites it into clean,
production-ready code — using Claude claude-sonnet-4-6 via the Anthropic API.

## Install

```bash
pip install python-vibe-cleanup
```

Or from source:

```bash
git clone https://github.com/yourusername/python-vibe-cleanup
cd python-vibe-cleanup
pip install -e .
```

## Setup

Create a `.env` file in your working directory (or export the key in your shell):

```bash
cp .env.example .env
# then edit .env and add your key
ANTHROPIC_API_KEY=sk-ant-...
```

## Usage

```bash
# Overwrite the file with clean code
vibe-clean my_messy_script.py

# Preview the output without modifying the file
vibe-clean my_messy_script.py --dry-run

# Show version
vibe-clean --version
```

## What it fixes

| Issue | Fix applied |
|---|---|
| Unused / duplicate imports | Removed and reordered (PEP 8) |
| Missing type hints | Full annotations on every function |
| No docstrings | Google-style docstrings added |
| Redundant logic | Extracted into named helpers |
| Bare `except:` | Replaced with specific exception types |
| `print()` diagnostics | Replaced with `logging` calls |
| Magic strings/numbers | Lifted to UPPER_CASE constants |
| Logic in `__main__` guard | Moved into a `main()` function |
| PEP 8 violations | Fixed (88-char line limit, Black style) |

## Publishing to PyPI

```bash
pip install build twine
python -m build
twine upload dist/*
```

## License

MIT
