MOONRAKER STATUS · 401 SPECS · CI LUA 5.1 + 5.4
REPO DOWNLOAD MIT
Real-Fruit-Snacks  //  multi-call binary  //  embedded lua vm via luastatic

MOONRAKER.

binary
~1.2 MB
applets
81 × POSIX
runtime
Embedded VM
stack
Lua 5.1 + 5.4
01 Premise

The Lua sibling — interpreter and all, in one binary.

Lua is the obvious language for a multi-call shell toolkit: small, fast, embeddable, and the standard library composes well with io.read/io.write pipelines. The historic blocker was distribution — Lua scripts need an interpreter, and "install Lua first" defeats the point of a single-binary tool.

luastatic solves that by linking the Lua interpreter, every required C extension, and your scripts into one executable. Moonraker ships 81 applets, 6 vendored C deps, and the full Lua VM in ~1.2 MB — no Lua install required.

02 Specs

What's in the box.

BINARY
One ~1.2 MB statically-linked executable · interpreter + scripts + cdeps.
APPLETS
81 POSIX utilities — text · files · hashing · archives · network · system.
RUNTIME
Embedded Lua VM via luastatic · Lua 5.1 + 5.4 portable.
VENDORED
LPeg · zlib · bzip2 · LuaSocket · pure_lua_SHA · re.lua — all hermetic.
TESTS
401 busted specs + 1 pending bz2 · luacheck-clean.
STACK
Lua 5.1 / 5.4 · LuaRocks · luastatic · CI on Ubuntu 22.04 + macOS.
03 Quickstart

Download, dispatch, build subset.

From a release no Lua install is required. From source: Lua 5.4 (or 5.1), LuaRocks, and a C toolchain.

# From a release — no Lua install required
$ curl -LO https://github.com/Real-Fruit-Snacks/Moonraker/releases/latest/download/moonraker-linux-x64
$ chmod +x moonraker-linux-x64 && ./moonraker-linux-x64 --list

# From source — Lua 5.4 (or 5.1), LuaRocks, C toolchain
$ luarocks install --local luastatic busted luacheck luafilesystem lua-zlib lpeg luasocket
$ make build
$ ./dist/moonraker --list

# Wire up multi-call dispatch so each applet runs by its own name
$ ln -s ./dist/moonraker /usr/local/bin/echo
$ echo "hello"

# Or use the wrapper
$ moonraker echo "hello"
$ moonraker awk --help                       # per-applet help

# Install every applet at once + tab-completion
$ moonraker install-aliases ~/.local/bin
$ moonraker completions bash | sudo tee /etc/bash_completion.d/moonraker

# Pick exactly the applets you need
$ lua build.lua --preset minimal             # 4 applets
$ lua build.lua --applets ls,cat,grep,sed,awk  # hand-picked
$ lua build.lua                              # full (81 applets)
04 Reference

The applet surface.

81 utilities organised by category. Real applets, not stubs — every find, sed, awk, and tar implements the common POSIX flag set.

FILE OPS

ls · cp · mv · rmList · copy · move · remove
mkdir · touch · findCreate · timestamp · expression-tree walk
chmod · ln · statMode · link · stat fields
truncate · mktemp · ddResize · scratch · block copy

TEXT

cat · tac · revConcat · reverse-line · reverse-byte
grep · head · tail · wc · nlSearch · slice · count · number
sort · uniq · cut · paste · trOrder · dedupe · field · merge · translate
tee · xargs · printf · echoTap · arg builder · format · output
expand · unexpand · split · cmp · commTab/space · partition · compare
fmt · fold · column · od · hexdump · base64Reflow · wrap · tabular · binary

HEAVY TEXT  // real engines, not stubs

seds/// d p q = y/// addresses ranges negation -i in-place BRE+ERE
awkBEGIN/END · regex · ranges · printf · arrays · 16+ builtins

NETWORK

httpcurl-style: GET/POST/PUT/DELETE/HEAD · -H · @file · --json · TLS
dig · ncUDP DNS (A/AAAA/MX/TXT/CNAME/NS/SOA/PTR) · TCP connect/listen/scan

HASHING & ARCHIVES

md5sum · sha1/256/512sumpure_lua_SHA — no OpenSSL
tarcreate / extract / list · gzip (-z) and bzip2 (-j) filters
gzip · gunzipStreaming compress/decompress · level 1–9
zip · unzipPKZip 2.0 · stored + deflated · path-traversal-safe

FILESYSTEM & PATHS

du · dfDisk usage · filesystem free
basename · dirname · realpath · pwd · whichPath components

PROCESS & SYSTEM

watch · timeoutRepeat · kill after N seconds
uname · hostname · whoami · id · groupsIdentity
date · env · sleep · getopt · uuidgenHelpers

CONTROL

true · false · yes · seqExit-status / fill / sequence

LIFECYCLE

install-aliasesSymlink every applet into a target dir
completionsbash · zsh · fish · powershell
updateAtomic self-update from latest GitHub release

VENDORED C / LUA DEPS  // all linked statically

LPeg 1.1.0Roberto Ierusalimschy · MIT · parsing engine
zlib 1.3.1Gailly + Adler · with lua-zlib 1.4-0
bzip2 1.0.8Julian Seward · ~150-line Lua binding
LuaSocket 3.1.0Diego Nehab · POSIX TCP/UDP/select
pure_lua_SHAEgor Skriptunoff v12 · backs *sum applets
re.lua + regex.luaPOSIX ERE-on-LPeg for sed/awk

BUILD TARGETS  // Makefile

make testbusted suite (401 specs)
make lintluacheck
make fmtstylua
make buildfull binary via luastatic
make cleanremove build artifacts
05 Architecture

Four-layer flow.

Entry → dispatch → registry → applet. Each applet is a Lua module exporting {name, help, aliases, main}.

src/
main.lua             // entry point · stashes binary path for `update`
   ↓
cli.lua              // dispatch · argv[0] multi-call + subcommand
                     // intercepts --help (long form only)
   ↓
registry.lua         // applet table + loader
applets/init.lua     // auto-generated by build.lua
   ↓
applets/<name>.lua   // {name, help, aliases, main(argv) -> int}

src/
common.lua           // err · IO · paths · walk · fnmatch
regex.lua            // POSIX ERE-on-LPeg compiler
hashing.lua          // shared *sum logic
socket.lua           // LuaSocket helper
vendor/              // pure-Lua deps (re.lua, sha2.lua)
cdeps/               // vendored C — lpeg, zlib, bzip2, luasocket

spec/                // 401 busted specs · mirrors src/ layout
06 The Family

Same idea, six languages.

Same applet contract. Same flag conventions. Same exit codes. Different size/portability tradeoffs.

ToolLangSizeNotes
rillASM~34 KBPure NASM · no libc
staysailZig~1 MB8 native targets
moonrakerLua~1.2 MBEmbedded Lua VM
jibRust~2.4 MB+ jq · http · dig
topsailGo~3.4 MB.deb · .rpm · .apk
mainsailPy~5.5 MBOr ~110 KB .pyz
→ START HERE

One Lua module,
one new applet.

Open repo