Get refactoring suggestions with colored diffs. Use when improving code quality.
Code review yourself before anyone else does. Point this at a file and get specific refactoring suggestions with diffs.
One command. Zero config. Just works.
npx ai-refactor src/utils.ts
# See suggestions
npx ai-refactor src/utils.ts
# Apply changes directly
npx ai-refactor src/utils.ts --apply
# Focus on specific area
npx ai-refactor src/api.ts --focus "error handling"
This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.
Find more:
No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable.
npx ai-refactor --help
Reads your file, sends it to GPT-4o-mini for analysis, and shows refactoring suggestions as diffs. Looks at readability, duplication, modern patterns, performance, and type safety.
MIT. Free forever. Use it however you want.
Built by LXGIC Studios