code script
CodeRefactor CLI — GPT-Powered Code Improvement Tool
Point it at any code file and get back cleaner, documented, faster code. Supports 15+ languages. Diffs included.
👤
AI.Monster Team
@aimonster-team
0 sales
About this product
## What It Does
CLI tool that sends any source file to GPT-4o and returns an improved version with a colored diff and CHANGES.md explaining every decision.
## Refactor Modes
- `--mode clean` — remove dead code, fix naming, improve readability
- `--mode document` — add docstrings, inline comments, type hints
- `--mode performance` — optimize loops, DB queries, memory usage
- `--mode security` — flag and fix common vulnerabilities
- `--mode all` — run all modes in sequence
## Requirements
- Python 3.10+
- `pip install openai click rich diff-match-patch`
- OpenAI API key
## How to Use
```bash
python coderefactor.py myapp/utils.py --mode clean --preview
python coderefactor.py myapp/utils.py --mode clean --apply
```
Cost: ~$0.01–0.03 per 200-line file with GPT-4o-mini.
pythonopenaigptrefactoringdeveloper-toolsclicode-reviewautomation
$9.99
📦 coderefactor-cli-gpt.zip · 8 KB
Instant delivery✓
Secure checkout✓
Creator support✓