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
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.Resolves delivery repo path
Three modes: explicit
--existing-repo PATH (overlay), explicit --scaffold-delivery PATH (new scaffold), or default (../<project>-delivery).Writes ZO-side artifacts
memory/{project}/{STATE,DECISION_LOG,PRIORS}.md, targets/{project}.target.md, plans/{project}.md.Writes delivery-side artifacts
.zo/{config.yaml, memory/, plans/} (portable project state), full src/, configs/, experiments/, reports/, notebooks/phase/, tests/, docker/ scaffold.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
| Option | Default | Purpose |
|---|---|---|
--no-tmux | (off) | Disable conversational mode. Implies headless flag-driven init. |
--dry-run | (off) | Preview writes without filesystem changes. Requires --no-tmux. |
--reset | (off) | Delete ZO artifacts for this project. Requires --yes or typing the project name. |
--yes, -y | (off) | Skip confirmation prompts. Used with --reset. |
--branch | main | Git branch on the delivery repo. |
--existing-repo PATH | (none) | Apply ZO scaffold as overlay to an existing repo. Requires .git/. |
--scaffold-delivery PATH | (auto) | Create scaffold at this absolute path. Default is ../<project>-delivery. Mutually exclusive with --existing-repo. |
--base-image IMAGE | (auto) | Docker base image. Auto-detected via suggest_base_image(env). |
--gpu-host HOST | (auto) | GPU host. local if running on the GPU machine, user@host:/path for remote. |
--data-path PATH | (auto) | Path to data. Use host:/abs/path for remote-data flows. |
--no-detect | (off) | Skip host environment auto-detection. Leaves the plan’s ## Environment as TODO. |
--layout-mode MODE | standard | standard or adaptive. Adaptive requires --existing-repo. |
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.