Skip to content

Registry specification

Botstrap defines installable tools in YAML. There are three files:

  • registry/prerequisites.yaml — Installed in Phase 0 only (non-interactive): git, curl, jq, yq, gum so registry parsing, TUI, and later installs can run. Same per-tool schema as core.yaml; passed to botstrap_pkg_install / Install-BotstrapPackageFromRegistry with this path.
  • registry/core.yaml — Presented in Phase 2 (TUI) as a multi-select list (all selected by default); installed after confirm in Phase 3 for the subset stored in BOTSTRAP_CORE_TOOLS / ~/.config/botstrap/core-tools.env.
  • registry/optional.yaml — Presented in Phase 2 (TUI); users choose optional GUI editors (Cursor, VS Code, Zed), languages, databases, AI CLIs, themes, and optional apps. Neovim (with LazyVim) lives in core.yaml when selected as a core tool; Phase 2 still offers neovim as a primary editor choice for Phase 3 templates only.

General rules

  • Encoding: UTF-8.
  • Indentation: Two spaces (YAML).
  • Names: Tool name fields use lowercase letters, digits, and hyphens (kebab-case). They must be unique within their file.
  • Shell install snippets (Unix): Multi-line scalar blocks are run with bash (e.g. bash -c or equivalent). Use non-interactive flags (-y, --yes) everywhere.
  • PowerShell snippets (Windows): Use non-interactive winget, scoop, or documented silent installers.
  • Order: In each tools list, order is significant: Phase 0 / Phase 3 install in YAML order (e.g. dependency-friendly ordering within prerequisites.yaml and core.yaml).

registry/prerequisites.yaml schema

Same as registry/core.yaml below: top-level schema_version, tools list, and the same fields on each tool (name, description, category, install, optional update, verify, optional verify_windows, post_install, post_install_windows, configure). Only prerequisites.yaml and core.yaml use this shape; optional.yaml uses groups.

registry/core.yaml schema

Top-level keys:

KeyTypeRequiredDescription
schema_versionintegerrecommendedBump when breaking the schema (default 1).
toolslistyesOrdered list of core tool definitions.

Each tool object:

FieldTypeRequiredDescription
namestringyesIdentifier; used by pkg_install and verify.
descriptionstringyesShort human-readable summary.
categorystringyesLogical grouping (e.g. shell, git, container, security).
installmapyesPlatform-keyed install commands (see keys below).
updatemapnoPlatform-keyed upgrade commands (same keys as install). Used by botstrap update --tools / install/update-tools.* only when verify passes (tool is present). If absent for the resolved platform key, the updater logs and skips that tool. Do not silently fall back to install.
verifystringrecommendedSingle shell command that exits 0 when the tool works (e.g. mise --version). Often bash -c on Unix.
verify_windowsstringnoPowerShell snippet for Windows verification when verify is bash-only or needs a different PATH (e.g. mise). If absent, the Windows package layer may normalize verify (e.g. strip bash -c) or fall back to Get-Command.
post_installstringnoBash script on Unix (lib/pkg.sh): runs after a successful install and again when install is skipped because verify already passes, so idempotent hooks (e.g. LazyVim starter, mise globals) still apply.
post_install_windowsstringnoPowerShell script on Windows (lib/pkg.ps1): same timing as post_install (after install or after verify-skip). If absent on Windows, post_install is not run (Unix bash).
configurestringnoHuman-oriented note or machine path mapping, e.g. configs/shell/prompt.toml -> ~/.config/starship.toml (Phase 3 interprets this).

install map keys (core)

The package layer picks the first matching key for the current environment. Implementations should define a deterministic resolution order.

KeyWhen to use
darwinmacOS (Homebrew or documented curl installer).
linux-aptDebian / Ubuntu and derivatives (apt).
linux-dnfFedora / RHEL / derivatives (dnf).
linux-pacmanArch Linux (pacman).
linuxGeneric Linux when distro-specific key is absent (often curl | sh installers).
windowsWindows (winget or PowerShell). Omit this key for a tool to skip native Windows install (e.g. Linux-only shells).
allCross-platform when the same command works everywhere (e.g. npm install -g ... after Node is available). On Windows, prefer a dedicated windows entry when the all snippet is bash-only.

Note: If both linux-apt and linux exist, the implementation should prefer the distro-specific key.

Optional extended keys (allowed if the pkg layer supports them):

  • linux-brew — Linuxbrew when used as a gap-fill.
  • windows-scoop — Fallback when winget lacks a package.

registry/optional.yaml schema

Top-level keys:

KeyTypeRequiredDescription
schema_versionintegerrecommendedDefault 1.
groupslistyesTUI groups (editor, languages, etc.).

Each group object:

FieldTypeRequiredDescription
namestringyesDisplay name for the TUI (e.g. Editor).
idstringrecommendedStable id (editor, languages, …) for env vars and scripts.
selectstringyessingle or multiple.
itemslistyesSelectable entries.

Each item object:

FieldTypeRequiredDescription
namestringyesTool id (kebab-case).
descriptionstringyesShown in the TUI.
installmapyesSame platform keys as core install.
updatemapnoSame semantics as core update (optional; same platform keys as install).
verifystringnoPost-install check when selected.
verify_windowsstringnoLike core verify_windows.
requireslist of stringsnoNames of other tools that must be installed first (e.g. node for npm-based CLIs).
post_installstringnoLike core.
post_install_windowsstringnoLike core post_install_windows.
configurestringnoLike core.

Environment variables

Phase 2 should export selections in a stable way, for example:

  • Single-select group with id editor: BOTSTRAP_EDITOR=cursor
  • Multi-select group with id languages: BOTSTRAP_LANGUAGES=node,python,go (comma-separated)

Exact naming is implemented in install/phase-2-tui.sh; contributors should document any new group id in docs/CONTRIBUTING.md and docs/REFERENCE.md.

Validation

Contributors should keep YAML valid and avoid breaking yq queries used by lib/pkg.sh. Prefer adding a new tool via YAML before adding bespoke script logic.

Example (minimal)

yaml
schema_version: 1
tools:
  - name: example-cli
    description: "Example CLI"
    category: utility
    install:
      darwin: brew install example-cli
      linux-apt: sudo apt-get update && sudo apt-get install -y example-cli
      windows: winget install --id Example.ExampleCLI -e --accept-package-agreements
    update:
      darwin: brew upgrade example-cli
      linux-apt: sudo apt-get update && sudo apt-get install --only-upgrade -y example-cli
      windows: winget upgrade --id Example.ExampleCLI -e --accept-package-agreements --accept-source-agreements
    verify: example-cli --version

See registry/prerequisites.yaml, registry/core.yaml, and registry/optional.yaml for the live manifests.

Botstrap — cross-platform bootstrap for developers and AI coding agents.

Docs build:1d685d8