AI Code Polisher is a professional-grade, multi-agent automation system that cleans, refactors, documents, secures, and deploys your codebase — all with a single command.
Built on Groq and Llama 3, it removes the repetitive, error-prone parts of software maintenance so you can focus on building features, not fixing formatting or chasing secrets.
Modern projects grow fast—and so does technical debt.
AI Code Polisher acts like an AI-powered senior engineer, reviewing your entire repository end-to-end and applying best practices automatically.
One command → production-ready codebase.
This system is powered by 8 specialized AI agents, each responsible for a critical development task:
- Recursively scans your project
- Safely detects
.py,.js,.html, and.cssfiles - Ignores system and protected directories
- Detects hardcoded API keys, tokens, and secrets
- Blocks unsafe files from being processed
- Prevents accidental credential leaks
- Renames variables and functions intelligently
- Improves readability and semantic clarity
- Enforces clean, professional naming conventions
- Adds consistent file headers
- Generates docstrings and block comments
- Improves long-term maintainability
- Fixes indentation and formatting issues
- Cleans brackets, spacing, and minor syntax errors
- Keeps code style consistent across the project
- Produces high-level summaries for every file
- Generates structured documentation insights
- Feeds content into README generation
- Automatically updates
.gitignore - Detects frameworks and tools in use
- Prevents unnecessary or sensitive files from being committed
- Stages all changes automatically
- Commits with meaningful tags (e.g.
[REFACTOR],[DOCS]) - Pushes to your active Git branch
Install directly from GitHub using pip:
pip install git+https://github.com/supraja777/Tic-Tac-Toe.gitTo keep your credentials secure, the API key is not bundled with the package.
In the root of the project you want to polish:
GROQ_API_KEY=your_gsk_key_here🔐 Security Reminder:
Ensure .env is added to .gitignore.
Navigate to any project directory and run:
polish- Scanning – Detects all eligible files
- Validation – Confirms API key and security status
- Transformation – Runs each AI agent sequentially
- Deployment – Commits and pushes changes to Git
polisher/
├── __init__.py
├── main.py # Agent orchestrator
├── refactor_agent.py # Variable & function renaming
├── comment_agent.py # Docstrings & file headers
├── syntax_agent.py # Formatting & linting
├── summary_agent.py # File-level summaries
├── security_agent.py # Secret detection
├── readme_agent.py # README generation
├── ignore_agent.py # .gitignore management
└── git_agent.py # Git automation
- Free Tier Limits: Very large files (>10k characters) may hit Groq TPM limits.
- Recommended: Run on a separate Git branch to review AI changes before merging.
- Overwrite Warning: Files are rewritten in place. Git is your safety net.