What is Refactron?
Refactron is a TypeScript CLI that analyzes your codebase for issues, automatically fixes what it can, and verifies every change is safe before writing a single byte to disk. It is built around one core idea: every code change has a blast radius. A one-liner fix in an isolated utility is low-risk. A change to a function imported by 40 files that has no tests is extremely high-risk. Refactron measures this mathematically and scales its verification strictness accordingly.The Problem Refactron Solves
Most refactoring tools answer “what should I fix?” but leave you to figure out “is it safe to fix?”. Refactron answers both.| Tool Category | Finds Issues | Auto-fixes | Verifies Safety | Blast Radius |
|---|---|---|---|---|
| Linters (ESLint, Pylint) | ✓ | Partial | ✗ | ✗ |
| Formatters (Prettier, Black) | ✓ | ✓ | ✗ | ✗ |
| Refactron | ✓ | ✓ | ✓ | ✓ |
Core Differentiators
Blast Radius Scoring
Every issue carries a mandatory 0–100 impact score computed from transitive import and call graphs. You always know how dangerous a change is before making it.
Verification Gate
Changes are verified (syntax, imports, test suite) before being written to disk. Strictness scales automatically with blast radius.
Atomic Writes
All file writes use a temp-file-then-rename strategy. Partial writes and corrupted files are impossible.
Backup & Rollback
Every session is backed up automatically. Run
rollback to restore the previous state at any time.Interactive Browser
After analysis, an interactive TUI opens automatically. Navigate issues, preview diffs, fix and verify — all without leaving the terminal.
Work Sessions
Every
analyze run creates a persistent session. Fix and verify against it later — no re-scanning needed.