Space.sh – Server apps and automation in a nutshell
space.sh
space.sh
I once had to manage a large, locked-down installation of extremely custom Linux distros running on extremely custom legacy hardware.
Python was not available, and definitely not Ruby, so that eliminates a bunch of CM tools. Not sure if it'd even fit on the ROMs of some of them. The hardware was a mix of ancient MIPS and PowerPC and ARM and x86 in the same stack, so compiling anything for the targets would have been painful. Nevermind kernel/libc versions so old that lots of commonly available tools wouldn't even compile on them. Golang has a minimum kernel version, you know. :P
Guess what all these systems could run though. Good old sh and sshd. I could send/receive files with cat and tar. I could collect system info from /proc. I could do pretty much whatever I needed. I ended up writing a tool very similar to this one in spirit, though not nearly as polished, and I didn't get to take it with me when I left the company.
Shell syntax can be obscure and confusing, but when you have nothing else, a shell gets the job done. I'm happy to see someone had a similar problem and solved it, and then made it a thing. :)
I often deal with embedded systems, but they run busybox or ash for ahell. And they often didn’t have find, or sha256, or some other tools considered essential.
And the last thing I would want there is to download files directly from random 3rd party repos without any integrity checks - that is just direct path to weird undebuggable outages.
Yes, there are use cases for shell-based tools, but space.sh isn’t it.
- Main file is ~7K lines of bash.
- There is a bash-based YAML parser ! It says it can handle "well-formed YAML document"
- It is has "download and run code from the web" -- if the command is not found, it will go to pre-defined github location and try to download and run that command. The versions are optional, and there are no package lock / integrity checks.
I am surprised how far some people go to avoid real programming languages... lua for example is <400 kb installed and provides infinitely better syntax and list processing tools.