Start With An Agent
Zerolang is designed for a human working with an agent.
The agent should author the program through the graph. The human should review
the graph summary, command output, and the .0 projection when useful. A
projection is readable and bidirectional, but it is not the normal place for an
agent to write code.
Install
curl -fsSL https://zerolang.ai/install.sh | bash
export PATH="$HOME/.zero/bin:$PATH"
zero --versionThen install the agent bootstrap skill:
npx skills add vercel-labs/zerolangUse the installed zero command in public examples. If you are developing Zero
itself, follow the repository contributor notes for checkout-local compiler
work.
Hello World
Start by asking:
The expected projection is:
pub fn main(world: World) -> Void raises { check world.out.write("hello from zero\n")}That file is a projection of zero.graph. Humans can read it, review it, and
occasionally edit it. Agents should normally keep using zero query and
zero patch.
The Daily Loop
Use this loop for most tasks:
zero query
zero patch --op help
zero patch --op 'addMain'
zero check
zero test
zero run -- <args>The default input is the current directory, so a package command does not need
. unless you want to be explicit.
Reviewing A Projection
When a human wants to see readable text:
zero export
zero verify-projectionWhen a human intentionally edits src/main.0, import the projection back into
the graph before checking or running:
zero import
zero checkDo not use projection export as an automatic agent step. Export when a human asks to review source-like text or when CI wants a projection drift gate.
Build An Artifact
Use zero build for executable, object, or LLVM IR artifacts:
zero build --emit exe --target linux-musl-x64 --out .zero/out/appFor early exploration, zero run is usually enough.