did you look into bunster, I posted a about this long ago.
Link: https://bunster.netlify.app
Compiles bash scripts to static binaries
Supports modules
Supports static asset embedding
Native support for .env files
And much more features. I guess it is what you're looking for