In short, Amber is a programming language with Rust like syntax that compiles down to bash. More details here: https://amber-lang.com/
On the surface, it seems nice. Cleaner syntax, types, compile-time safety checks, etc. So you get to write in something nicer than bash but get the portability of bash.
My wonder is if there are pitfalls that make it worse than instead writing it in something like Python or even bash itself. I’d guess the generated bash code probably isn’t the prettiest to look at or debug.


If your comfortable writing rust, why not just use rust and compile to rust binaries? Rust has toolchains for realistically everything…
It’s not Rust, OP was mistaken. It’s ECMA-Script-like with Rust-like features and also Python-like features.
I think the idea is, you can develop Amber scripts “at home” then deploy them on any machine that has Bash without needing to install anything. This benefits system admins.
Well, their FAQ isn’t exactly production ready.
Unless OP edited their post, they said “Rust like”, not that it is Rust.
Yeah, it’s a blurry line whether to call it rust-like if it borrows features, when actually most syntax is more like ECMA Script or Python. So I shouldn’t really have said “OP was wrong”. But they also kind of are. I dunno.
Eh, go is really good for this kind of stuff. It compiles to a single binary you can just execute from shell
Doesn’t that describe most languages?
I’d say no. Even C needs external libraries.
I guess Rust does this too though - in which case transpiling rust to bash is even less appealing :shrug:
You can compile a C program while statically linking the libraries, thereby producing a single binary with no runtime dependencies. Just because Go can do this, too, doesn’t mean it’s special. It’s just that most libraries for Go ship as source code and not as compiled libraries. But as soon as you import some actual library like Sqlite, OpenSSL, GTK or whatever, using some wrapper code, you’re going to have the same dependency issue.
Rust is the same mostly. One upside of bash is that if binary signing was enabled, go and rust binaries would get blocked, but bash would be fine.