AI refac

بِسْمِ ٱللَّهِ ٱلرَّحْمَـٰنِ ٱلرَّحِيمِ

AI refac

Move files and folders and rename symbols with every reference updated. A language-aware CLI for TypeScript, Kotlin, Python, Go, Rust, Dart, and Markdown.

Pre-alpha

refac is built for personal use and is not finished. Commands, output, and behavior change whenever the author needs them to, and there is no guarantee that the project keeps being worked on.

refac moves files and folders, renames symbols, and updates every reference that points at them: imports, module declarations, package lines, Android XML, and Markdown links. After a change your project should inshallah build the way it did before.

It is built for scripted and agent-driven workflows where no IDE is in the loop. A language server is started for one command and stopped when the command ends, so nothing stays running and no memory is held afterwards. These pages will inshallah show you how to use it, language by language.

Languages

How it stays safe

  • Plan first. Nothing is written until the whole change is planned. A rename is also proven in memory: the server is shown the renamed text and must find exactly the same places again, so a name that clashes with or shadows something is refused.
  • Undo log. Every write goes through a journal, so a failed step inshallah won't leave half a refactor behind. Every file is put back and the message says so.
  • Loud failures. A missing server, an unsupported layout, or an ambiguous symbol stops the command with the reason and the fix. refac does not guess.
  • Preview. --dry-run shows the paths that would move and the edits per file, and changes nothing. The real command will inshallah do what the preview showed.

Where to go next

These pages get you moving.


About the author

I am Javed Arshad Butt. I built refac while setting up my own development infrastructure, the kind of tool you write because nothing existing fits the workflow you actually have. These docs are everything you need to use it. If you would like to know more about me, javedab.com is the place.

On this page