Execution and Output

Interactive rules, --yes behavior, dry-run behavior, and command output phases used by the CLI.

On this page

Interactive vs Non-Interactive

By default, commands can run interactively when stdin/stdout are TTY-capable.

  • Interactive mode prompts for missing selection, path, or package-manager input.
  • --yes disables prompts and uses explicit flags/defaults.
  • If prompts are required but no TTY is available, commands fail with guidance to use --yes.

create vs init

  • create scaffolds a new directory and then installs dependencies.
  • init inspects an existing project, plans merges, and can dry-run those merges before applying them.
  • Both commands can resolve a package manager from --pm, lockfiles, installed managers, or interactive selection.

Structured Output Phases

Current command implementations emit these sections:

Dry Run Contract

In dry-run mode:

  • Planned package-manager actions are printed with [dry-run] prefix.
  • No dependency changes are applied.
  • Output explicitly includes: No files were changed. for the dependency commands.
  • init --dry-run also reports the planned file/package merge set before any confirmation step.

Examples:

Global CLI

lattice init --dry-run
lattice add dialog,toast --preset overlay --dry-run
lattice remove --preset overlay --dry-run
lattice upgrade --preset form --dry-run

Monorepo Local Script

pnpm lattice init --dry-run
pnpm lattice add dialog,toast --preset overlay --dry-run
pnpm lattice remove --preset overlay --dry-run
pnpm lattice upgrade --preset form --dry-run