Idea - an intermediate representation as a bridge between babashka and bash


  1. Load bash script into IR
  2. Load babashka script into IR
  3. Write IR to bash script
  4. Write IR to babashka script


Ease migration from bash to babashka.


Middle-out – support a small subset of bash and babashka (starting out)

When hitting something we don’t support native translation for, shell out to either babashka or bash.


Fast shell script with CLI

Online converter

Option: other shells too

Once we have an IR, we could support other platforms. For the whole IR, or for parts of it. When we hit stuff we don’t understand, we can produce a comment. In the IR, we can represent “don’t understand” explicitly. Or just as a comment there too. Converting the “unsupported comment” back should work fine.



I think simply collecting some kind of bash/babashka rosetta might be a good way to start. And the place for that rosetta is … here! This page is the deliverable. There’s always a deliverable.