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
- Conversational (default)
- Headless (--no-tmux)
- Dry-run (preview)
- Reset
- 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-runto 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
Layout modes
--layout-mode controls how the scaffold interacts with existing code:
- standard (default)
- adaptive
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
Fresh project, conversational
Fresh project, conversational
../mnist-demo-delivery.Adopt an existing repo, adaptive layout
Adopt an existing repo, adaptive layout
src/ layout.Headless for CI
Headless for CI
Preview before committing
Preview before committing
--dry-run to commit.Start over
Start over
What gets written
After a successfulzo init my-project:
Next
zo draft
Now that the skeleton exists, draft the plan.
The plan
What goes into
plans/<project>.md.