// refactoring-assistant
Apply deterministic, scope-unaware refactorings to a pasted snippet — rename, inline, extract, and more — entirely in your browser.
// output will appear here
// diff
// result
// warnings
// how-it-works
Pure engine
All transformation logic lives in a DOM-free, side-effect-free engine. Each refactoring is a pure function from source text to source text plus a change count and warnings.
Line-based rewriting
The rewriter works line by line with word-boundary matching and light structural checks. It never calls out to a compiler or a language server.
Honest warnings
When a refactoring cannot be applied cleanly — ambiguous use counts, scope conflicts, wrong language — the tool leaves the code unchanged and explains why.
Runs entirely locally
No network calls, no server, no telemetry. Your snippet never leaves the browser tab.
// limitations
- Rename is scope-unaware: it renames every whole-word occurrence, not just the binding you meant.
- Inline only fires on single-assignment, single-use locals; reassigned or multiply-used variables are refused.
- Extract uses indentation for Python and brace-counting for JS/TS — it is not a real parser.
- Comment and string handling is heuristic; occurrences inside them may be skipped or missed.
- Parameter inference for Extract is best-effort and often needs manual completion.