Skip to main content
After running liza setup globally, run liza init inside each repository where you want Liza active. This command creates the .liza/ directory, wires up contract discovery files and provider hooks, establishes project state, and — when you supply a goal — creates the integration branch that agents merge approved work into.

What liza init Does

liza init bridges the global contracts in ~/.liza/ with the specific project you are working in. It writes or updates files at three levels: the project root (contract discovery files), provider config directories (hooks and settings), and the .liza/ workspace directory (state and pipeline configuration).

Contract Discovery Files

Creates CLAUDE.md, AGENTS.md, or GEMINI.md at the project root — usually as symlinks to ~/.liza/CORE.md — so provider CLIs find the behavioral contract automatically.

Provider Hooks & Settings

Writes .claude/settings.json, .claude/hooks/, .codex/hooks.json, and related files that enforce session initialization, inject project context, and guard Git usage.

Project State

Creates .liza/state.yaml and .liza/pipeline.yaml — the runtime configuration files you tune to match your task size, team cadence, and infrastructure.

Integration Branch

Creates the configured integration branch. Liza merges approved tasks here. Pushing that branch to a remote is your responsibility.

Command Syntax

1

Run the interactive wizard or pass flags

Run liza init with no flags to walk through provider selection, mode selection, and project-local activation interactively. Pass --claude, --codex, or --opencode to skip the prompts and activate those providers directly.
2

Supply a goal for multi-agent mode

Pass a description string and optionally --spec <file> to initialize Liza for a full multi-agent pipeline run. Liza writes the planning spec reference into .liza/state.yaml and prepares the integration branch.
3

Customize state.yaml

After init, open .liza/state.yaml and tune the config section to match your project’s task size and infrastructure. See the configuration matrix below.
4

Customize GUARDRAILS.md

Edit the GUARDRAILS.md placeholder that liza init creates. This file lets you define project-specific agent constraints that override or extend the global contract.

What Gets Created

Running liza init --claude --codex in a project produces:
.claude/settings.json is generated from Liza’s embedded template and includes all required permissions for Liza CLI commands, skills, and Git operations. Do not hand-craft a subset of this file — missing permissions will block agents at runtime.

The Interactive Wizard

When you run liza init with no flags, the wizard prompts you for:
  • Providers — which coding agent CLIs to activate (Claude, Codex, OpenCode)
  • Mode — Pairing mode (single agent + human) or Multi-Agent mode (autonomous pipeline)
  • Goal — a description of what you want to build, used as the pipeline seed for multi-agent runs
You can always re-run liza init later with specific flags to activate additional providers without re-running the full wizard.

GUARDRAILS.md

liza init creates a GUARDRAILS.md placeholder at the project root. This file is optional but powerful — it lets you define project-specific agent constraints that supplement or override the global behavioral contracts. GUARDRAILS.md supports Tier 0–3 overrides, letting you tune agent autonomy, permitted file paths, allowed commands, and escalation rules per project. Leave it as the generated placeholder if you have no project-specific constraints; agents will read it and find no additional restrictions.
For regulated codebases, sensitive data environments, or monorepos with multiple team boundaries, invest time in GUARDRAILS.md before your first multi-agent run. It is your primary lever for constraining what agents can touch.

Brownfield Projects

liza init respects existing contract files. If your repository already has its own CLAUDE.md, AGENTS.md, or GEMINI.md, Liza does not overwrite them. It falls back to a global symlink instead: If both the repo-root file and the global fallback are non-Liza files, liza init warns and skips that provider activation path. If a Liza symlink already exists at either location, liza init reports it and does not create a duplicate.

The Integration Branch

liza init creates the integration branch that Liza uses as the merge target for approved tasks. During a multi-agent run, every task that passes review gets merged into this branch automatically. The integration branch is local-only after liza init. Pushing it to a remote — and any CI/CD integration — is your responsibility. Liza never pushes to a remote on your behalf.

Configuration Matrix

All tunable parameters live under the config section of .liza/state.yaml. Edit this file directly after liza init to adjust Liza’s behavior for your project.

Agent Execution Timeouts

These timeouts are enforced by the supervisor and are not directly configurable per agent, but they inform how you tune agent_progress_timeout and lease_duration: When a timeout is exceeded, the supervisor kills the CLI, resets the agent to IDLE, and retries after a 5-second delay.

Worktree Setup with post_worktree_cmd

Worktrees are bare checkouts — they do not contain build artifacts like node_modules/ or vendor/. Set post_worktree_cmd to a shell command that runs after every worktree creation so agents start with a build-ready workspace:
liza init auto-detects common Node.js lockfile patterns and suggests the appropriate install command. For monorepos with multiple subdirectories, it prompts for manual configuration.

Tuning Presets