Skip to content

Registry specification

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

  • registry/core.yaml — Installed automatically in Phase 1 (non-interactive, opinionated baseline).
  • registry/optional.yaml — Presented in Phase 2 (TUI); users choose editors, languages, databases, AI CLIs, themes, and optional apps.

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 core.yaml, tools is an ordered list; Phase 1 should respect order so dependencies (e.g. yq before registry-driven loops) can be enforced in the orchestrator when needed.

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).
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 run after install on Unix (lib/pkg.sh).
post_install_windowsstringnoPowerShell script run after install on Windows (lib/pkg.ps1). 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.
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
    verify: example-cli --version

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

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