Skip to main content
zo init <project> is the first command in the pipeline. It creates everything ZO needs to track a project, plus a delivery repo scaffold.

Synopsis

What it does

1

Detects host environment

Calls zo.environment.detect_environment() to capture platform, Python version, GPU/CUDA details, Docker availability. Used to populate the plan’s ## Environment section and pick an appropriate Docker base image.
2

Resolves delivery repo path

Three modes: explicit --existing-repo PATH (overlay), explicit --scaffold-delivery PATH (new scaffold), or default (../<project>-delivery).
3

Writes ZO-side artifacts

memory/{project}/{STATE,DECISION_LOG,PRIORS}.md, targets/{project}.target.md, plans/{project}.md.
4

Writes delivery-side artifacts

.zo/{config.yaml, memory/, plans/} (portable project state), full src/, configs/, experiments/, reports/, notebooks/phase/, tests/, docker/ scaffold.
5

Picks Docker compose template

Platform-aware: GPU template on Linux+CUDA, CPU template on macOS / no-GPU Linux. The deploy.resources.devices: capabilities: [gpu] block is omitted on CPU to avoid docker compose up failures.

Modes

Launches the Init Architect in a tmux pane. The agent:
  • Greets you with the brand banner
  • Asks 5–6 confirming questions (project location, delivery repo, base image, GPU host, data path, layout mode)
  • Inspects the target repo if it already exists (Glob, Read, Bash)
  • Runs zo init ... --no-tmux --dry-run to preview exactly what will be written
  • Asks you to approve before committing writes
  • Routes the actual file writes through zo init ... --no-tmux ... so the CLI is the single source of truth
Use this on first runs of a new project, or when adopting an existing repo where you’re not sure what layout mode to pick.

Layout modes

--layout-mode controls how the scaffold interacts with existing code:
Creates the full ZO layout: configs/, src/{data,model,engineering,inference,utils}/, data/{raw,processed}/, experiments/, reports/, notebooks/{,phase}/, tests/{unit,ml,fixtures}/, docker/.Best for: fresh projects, existing repos with no established code layout.

Options

Examples

Launches the Init Architect. Default delivery repo at ../mnist-demo-delivery.
Adds only ZO meta-dirs. Init Architect customises STRUCTURE.md to your existing src/ layout.
Prints the file tree, target.md, plan.md Environment block. Re-run without --dry-run to commit.
Wipes ZO artifacts. Delivery repo is preserved.

What gets written

After a successful zo init my-project:

Next

zo draft

Now that the skeleton exists, draft the plan.

The plan

What goes into plans/<project>.md.