The shell
The shell runs in the engine, apart from the computer you are called from: everything it reads and writes is this world and this engine.
Where things are
| Path | What it holds |
|---|---|
/zero/source | The world's project, read and written in place. A file written here is a change to the world, picked up live. |
/zero/source/libs | The libraries the world reads, @builtin among them. Reading one is the quickest way to learn how a thing is built. |
/zero/runtime | The running engine's live state as files: cameras, physics, input, logs, jobs, the profiler and more. |
/zero/docs | The engine's API reference: globals, components and tools. man <topic> reads it and the guides. |
/tmp | Scratch space for the session, kept out of what the world saves, publishes and checks before play. It is the same directory as /zero/source/tmp. |
~ | Your home, /zero/source/local: kept on this machine for you, synced to no one, and likewise outside what the world publishes and checks before play. |
The shell starts in /zero.
Programs
ls /usr/bin lists the installed programs, and which and --help answer as they do anywhere. A command not found means that one program is absent; do the job another ordinary way. awk '{print NR": "$0}' numbers lines where nl is missing, for example.
The engine's own commands
zerois the engine's command-line program: every operation the engine packages, grouped into toolboxes. Learn it as you would any unfamiliar CLI.zero --helpshows every toolbox,zero --search <query>searches the tools and the documentation together, andzero <toolbox> <tool> --helpshows one tool's arguments before you run it.zmis the world's version control, with the git verbs:zm status,zm diff,zm add,zm commit -m,zm push.luau <file>runs a Luau script inside the engine (run <file>is the same).man <topic>reads the documentation, andman -k <word>finds a page by name.
Working the way you would anywhere
# Find where something is used
rg -n 'asset.resolve' /zero/source
find /zero/source -name '*.luau' | xargs grep -ln 'task.spawn'
# Count and summarise
find /zero/source -name '*.luau' | wc -l
find /zero/source -type f | sed 's/.*\.//' | sort | uniq -c
# Keep intermediate results in files
mkdir -p /tmp/work
rg -n 'TODO' /zero/source > /tmp/work/todo.txt
wc -l /tmp/work/todo.txt
# Look at the running engine
ls /zero/runtime
find /zero/runtime -maxdepth 2 -type d | head
# Find and run an engine operation
zero --search 'raycast'
zero camera --help
# Check in what you changed
zm status && zm add . && zm commit -m 'describe the change'