Quick Start
Get up and running in minutes
CLI Reference
Explore command-line tools
API Reference
Python API documentation
Guides
Learn best practices
Core Principles
Safety-First Refactoring
Every change is previewed and risk-scored before anything touches disk. Automatic backups and one-command rollback mean there’s always a way back.
Behavior-Preserving Transforms
Refactron uses concrete syntax trees (libcst) — not regex, not heuristics — so formatting, comments, and semantics are preserved exactly. 5 refactorers and 14 auto-fixers, all structure-aware.
Deterministic Verification
Every proposed transform is verified — syntax, imports, and test coverage — before being written to disk. If verification fails, the original is restored automatically.
Not Just Another Linter
Tools like Ruff and pylint find issues. Refactron fixes them — safely, verifiably, with a full audit trail. There’s no manual patching, no broken builds, and no guessing whether a change preserved the original behavior.7 Built-in Analyzers
Security, performance, complexity, code smell, type hints, dead code, and dependency analysis — all in one pass.
AI-Powered Intelligence
LLM orchestration with RAG for context-aware suggestions grounded in your own codebase.
Pattern Learning
Learns from your accept/reject decisions over time and adapts suggestions to your project’s specific standards.
CI/CD Ready
GitHub Actions, GitLab CI, and pre-commit integrations with structured JSON logging and configurable quality gates.
Ready to Get Started?
Installation Guide
Install Refactron and start refactoring safely
