https://github.com/tangowithfoxtrot/rizzybox
A multicall coreutil CLI written in Rust.
https://github.com/tangowithfoxtrot/rizzybox
cli command-line coreutil coreutils multicall rust
Last synced: 4 months ago
JSON representation
A multicall coreutil CLI written in Rust.
- Host: GitHub
- URL: https://github.com/tangowithfoxtrot/rizzybox
- Owner: tangowithfoxtrot
- License: gpl-3.0
- Created: 2024-10-20T18:45:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-04T14:32:42.000Z (7 months ago)
- Last Synced: 2025-11-04T15:11:46.786Z (7 months ago)
- Topics: cli, command-line, coreutil, coreutils, multicall, rust
- Language: Rust
- Homepage:
- Size: 8.83 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
```powershell
8888888b. d8b 888888b.
888 Y88b Y8P 888 "88b
888 888 888 .88P
888 d88P 888 88888888 88888888 888 888 8888888K. .d88b. 888 888
8888888P" 888 d88P d88P 888 888 888 "Y88b d88""88b `Y8bd8P'
888 T88b 888 d88P d88P 888 888 888 888 888 888 X88K
888 T88b 888 d88P d88P Y88b 888 888 d88P Y88..88P .d8""8b.
888 T88b 888 88888888 88888888 "Y88888 8888888P" "Y88P" 888 888
888
Y8b d88P
"Y88P"
```
A multicall coreutil binary written in Rust.
[](https://asciinema.org/a/oruhe7BpwPa13QQyZse8bpJ4z)
## Usage
### As a multicall binary
Rizzybox consists of a handful of coreutil implementations, as well as a few
original coreutils (see the [stem](./src/command/stem.rs) command for an
example). Each one can be executed with `rizzybox `. For a list of
supported commands, you can run `rizzybox --help` or `rizzybox --list`.
### As rudimentary coreutils
Rizzybox can be symlinked or "installed" in such a way that allows you to
execute the various supported coreutils without needing to invoke them as
`rizzybox `. This allows you to simply run `cat` to invoke
`rizzybox cat`. To do so, simply run
`rizzybox --install-self `. The installation
dir must be in `$PATH` to be used this way, and you will need write permissions
to that directory or invoke it with `sudo` or `doas`.
### Debug scratch or distroless container images
Since Rizzybox is a set of coreutils with a **very** rudimentary,
interactive-only shell, we can use it for debugging container images that are
built from empty filesystems. Doing so requires using a build of Rizzybox that
has been built with a statically-linked libc. If your docker host is not running
Linux, you will need a **Linux** build of rizzybox to do this because we need to
mount rizzybox inside of the container image at runtime to enable this
functionality.
[](https://asciinema.org/a/NMRvMZTeXJKA4iDWPIYeNX6oe)
#### Configure rizzybox to work as a docker plugin
1. Locate your Docker plugins directory. This is usually in
`~/.docker/cli-plugins` or `/usr/lib/docker/cli-plugins`. If you are unsure,
you can inspect the output of `docker info` or use the following one-liner:
```sh
dirname $(docker info | grep -iA3 Plugins | grep Path | awk '{ print $2 }' | head -n1)
```
2. Symlink Rizzybox to `"$docker_plugins_dir/docker-debug"` (or
`"$docker_plugins_dir/docker-rebug"`, if you're already using `docker-debug`)
```sh
sudo ln -sf $(which rizzybox) "$docker_plugins_dir/docker-debug"
```
3. Use the Rizzybox shell to get an interactive session into a minimal container
image:
```sh
docker debug tangowithfoxtrot/scratch
# or, if you symlinked it as docker-rebug:
docker rebug tangowithfoxtrot/scratch
```
## Goals
1. Do something fun in Rust.
2. Learn more about `coreutils`.
3. Provide fancier alternatives to GNU coreutils with things like
syntax-highlighting and robust completions. For now, perfect GNU
compatibility is not a goal. In the future, this may change, but if you would
like a Rust coreutil project that _does_ strive for GNU compatibility, please
check out [uutils](https://github.com/uutils/coreutils).
4. Create original coreutils.
### Acknowledgements
- [bubble-shell](https://github.com/JoshMcguigan/bubble-shell); for
demonstrating basic shell logic
- [Bat](https://github.com/sharkdp/bat); enables niceties like
syntax-highlighting in `cat`, `echo`, and others