Docs/Reference

zli.json

The project file that sets up worktrees and shares prompts with your team.

zli.json is a project file at the root of your repository. Commit it, and everyone on your team gets the same worktree setup and shared prompts.

Example

{
  "version": 1,
  "worktree": {
    "copy": [".env", "apps/web/.env.local"],
    "setup": ["pnpm install --frozen-lockfile"]
  },
  "prompts": [
    { "name": "Review", "prompt": "Review the changes on this branch for bugs." }
  ]
}

Fields

FieldTypeDescription
version1Required. Must be 1.
worktree.copylist of paths or globsFiles copied from the main checkout into each new worktree, such as .env. Up to 100.
worktree.setuplist of commandsShell commands run in order inside each new worktree after the copy. Up to 20.
promptslist of { name, prompt }Prompts shared with everyone who opens the project. Up to 100.
$schemastringOptional, for editor support.

Rules for copy paths

Paths are relative to the repository root and use forward slashes. A path cannot:

  • start with / or a drive letter,
  • contain .. or empty segments,
  • start with ! (no negations),
  • point into .git.

Rules for setup commands

Put each command on its own line in the list; a command cannot contain a line break. Setup commands always ask before they run, and each runs in its own terminal.

Errors

If the file is not valid, ZLI names the field that failed, for example worktree.copy.0. The file can be up to 256 KB.

Something wrong or missing? Tell us on GitHub