Is there a tool to obfuscate/compress luau code?

So, I’m working on a project in Roblox-TS, that I want to automatically minify and/or obfuscate after building. Is there a tool that does something like that (and can be called from a bash script)? Features should be:

  • removing comments
  • removing whitespace (pressing everything on one line)
  • preferably obfuscating it

You can try using this:

Which requires Node.JS and NPM to run, both Node.JS and NPM can be ran from a bash script.

Thank you for your response. This does look more like a game framework/template rather than a tool that can be used from the command line. Also, for context, I am developing a plugin, not a game.

I’ve managed to create a bash script that removes comments starting with – and all line-breaks. Still not 100% what I want it to be but good enough

# Remove comments from file
grep -Eov '\-{2}.*' "$file"

# Remove line breaks
tr '\n' ' ' < "$file"