// manifest

Manifest reference

A manifest is a JSON file in manifests/ that tells the engine what to do. Copy an example, rename it local-<name>.json (gitignored), and edit it.

Shape

{
  "name": "Human-readable name",
  "description": "Optional notes.",
  "config": { ... },
  "steps": [ ... ]
}

config

A flat object of string values. Each key is exported to step scripts as CFG_<UPPERCASE_KEY>. Keys used by the shipped steps:

KeyUsed byMeaning
packageManagerpackage-manager, packagesbrew or port
dotfilesRepodotfilesgit URL to clone (SSH for private submodules)
dotfilesCloneDirdotfilesclone path relative to $HOME
dotfilesInstalldotfilesinstaller command run inside the repo
commitMonoUrldotfilesoptional font zip staged before install
brewfilepackagesBrewfile path relative to the data dir
portfilepackagesport list path relative to the data dir
macportsPkgUrlpackage-manager.pkg URL for your macOS version
secretsDmgsecretsencrypted bundle path relative to the data dir
extraDefaultsmacos-defaultsoptional extra defaults script path

Add your own keys; they become CFG_* for any custom step you write.

steps

An ordered array. Each step:

FieldReqMeaning
idyesstable identifier, used by --only
titleyesshown in the progress UI
subtitlenoshown under the title in the GUI
runyespath to the step script, relative to the repo root
validationnoshell expression run with bash -c. Passes before → step is skipped. Empty → always run.
requirednotrue aborts the run on failure; otherwise warn and continue

Execution model

For each step the engine:

  1. Skips it if --only is set to a different id.
  2. Runs validation. If it passes, the step is "Already set" and skipped.
  3. Otherwise runs the script, streaming output to the terminal and the log.
  4. Re-checks validation. A still-failing check counts as a failure.
  5. On failure: abort if required, else warn and continue.

Step script contract

A step script is plain bash. It inherits this environment:

MIGRATE_ROOTrepo root — call "$MIGRATE_ROOT/migrate" restore ... to reuse restore phases
MIGRATION_DATAdata directory (payload/, manifest/, secrets/); also aliased as BASE
STEP_IDthis step's id
CFG_*every key from config

Make it idempotent, return non-zero only on real failure, and prefer a manifest validation over re-checking inside the script.

Example step

{
  "id": "dotfiles",
  "title": "Dotfiles",
  "subtitle": "Clone the repo and run its installer",
  "run": "steps/dotfiles.sh",
  "validation": "test -e $HOME/.config/dotfiles",
  "required": false
}

Full examples ship in the repo: manifests/example-homebrew.json and manifests/example-macports.json.