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 and publishes. It is the same directory as /zero/source/tmp. |
~ | Your home, /zero/source/local: the open world's local folder, kept on this machine for this world, synced to no one and outside what the world publishes. Another world opened in the engine has its own, and this one's is back when this world is opened again. |
/zero/home/<account> | Your home world's files, mounted in every world you open while your account has a home world. |
/tmp and ~ name these same folders for every tool: read_file, write_file, vfs.read and vfs.write, execute { file }, a capture's save_path and set_world_cover all take a path the shell wrote.
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 '<phrasing>' ...asks the search, one search per argument (its answer holds two separate lists with a count each:assetsandworlds, the direct hits, andsuggested_resources, a separate search for what to make the request with; the counts are on the first lines, then the resources, then the hits; a resource and a hit both name their identityguid),zero --search --tools <query>searches the tools, toolboxes and workflows alone, andzero <toolbox> <tool> --helpshows one tool's arguments before you run it.- A world adds its own shell command by adding a tool to a toolbox: the tool
addin the toolboxchangelogruns aszero changelog add, its parameters and--!flaglines are the command line, and itsrender.luauprints the result.guides core/toolscovers it under "A tool's command line". 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'