buzzybox
is a multicall binary like busybox
that brings a subset of shell
utilities to multiple platforms. It can be run as a standalone program
(buzzybox
) or imported as a library (lesiw.io/buzzybox/hive
).
- Written in a memory safe language.
- Uses only Go Project dependencies.
- Compatible with tinygo.
- Open-sourced under a permissive license.
go install lesiw.io/buzzybox@latest
echo "hello embedded world" | buzzybox awk '{ print $1, $3 }'
ln -s "$(which buzzybox)" awk
echo "hello embedded world" | ./awk '{ print $1, $3 }'
package main
import (
"strings"
"lesiw.io/buzzybox/hive"
)
func main() {
cmd := hive.Command("awk", "{ print $1, $3 }")
cmd.Stdin = strings.NewReader("hello embedded world")
cmd.Run()
}
echo "hello embedded world" | docker run -i lesiw/buzzybox awk '{ print $1, $3 }'
One of the following:
- The app is defined in the POSIX standard.
- The app isn’t in POSIX, but is found in multiple *nix environments, like
MacOS, busybox, and at least one major non-busybox Linux distribution. (
tar
is a good example of a non-POSIX utility that is near-ubiquitous.)
And all of the following:
- Orthogonal: the app solves a problem that cannot reasonably be solved by using the existing apps in combination.
App | Linux | Windows | MacOS | TinyGo |
---|---|---|---|---|
arch |
✅ | ✅ | ✅ | ✅ |
awk |
✅ | ✅ | ✅ | ✅ |
base64 |
✅ | ✅ | ✅ | ✅ |
basename |
✅ | ✅ | ✅ | ✅ |
cat |
✅ | ✅ | ✅ | ✅ |
false |
✅ | ✅ | ✅ | ✅ |
true |
✅ | ✅ | ✅ | ✅ |