Skip to content

Bootstrap flow

Step-by-step diagram of what bootstrap.sh actually does, with the DF_DO_* skip flag for each phase. Steps run in order, and any selected phase that misses its postconditions aborts the rest.

bootstrap flow

6 language runtimes (each independent)

macOS

macOS

macOS

curl bootstrap.sh

0 scratch links

DF_DO_SCRATCH

0.1 ~/dev ~/bones ~/misc

DF_DO_DIRS

0.5 clone repo to ~/dotfiles

0.6 source real repo + detect PLAT

(always; tunes compiler flags)

1 install chezmoi binary

(idempotent)

2 chezmoi init --apply --force

(renders home/*.tmpl into ~/)

2.7 PATH sanity check

(verifies ARCH_BIN writable, no broken symlinks)

3 oh-my-zsh + plugins

DF_DO_ZSH

4 Homebrew + Brewfile

DF_DO_PACKAGES

lean/latex.sh

DF_DO_LEAN / DF_DO_LATEX

Quarto

DF_DO_QUARTO

5 Colima service

DF_DO_MACOS_SERVICES

5.5 defaults write

DF_DO_MACOS_SETTINGS

5.6 Quick Actions

DF_DO_MACOS_QUICK_ACTIONS

python.sh

DF_DO_PYTHON

node.sh

DF_DO_NODE

rust.sh

DF_DO_RUST

julia.sh

DF_DO_JULIA

claude.sh

DF_DO_CLAUDE

codex.sh

DF_DO_CODEX

cursor/vscode.sh

DF_DO_CURSOR / DF_DO_VSCODE

cmake.sh

DF_DO_CMAKE

6.5 local LLM + OpenCode config

DF_DO_LOCAL_LLM / DF_DO_OPENCODE

6.6 agent memory stack

DF_DO_MEMORY

6.7 blender-mcp addon

DF_DO_BLENDER_MCP

7 auth.sh walk

DF_DO_AUTH (default 0)

8 overlay bootstraps

DF_DO_OVERLAYS

final runtime verification

install/verify-tools.sh

Wide diagrams scroll horizontally. Focus the figure to use arrow keys.

StepScriptWhatIdempotent?
0install/scratch.shSymlink heavy $HOME dirs to $DF_SCRATCH/.paths/. No-op if DF_SCRATCH unset.Yes
0.1install/dirs.shCreate ~/dev, ~/bones, ~/misc (or $DF_DIRS).Yes
0.5inlinegit clone if first run; git pull --ff-only in update/upgrade modes.Yes
0.6inlineRe-source the cloned repo’s _lib.sh, rebinding repo, overlay, PLAT, and platform-local paths authoritatively.Yes
1install/chezmoi.shDownload chezmoi to $ARCH_BIN/chezmoi. Skipped if file already executable.Yes
2(inline)chezmoi init --apply --force --exclude=scripts. Renders home/*.tmpl into ~/. --exclude=scripts skips run_onchange_*.sh.tmpl (bootstrap calls install scripts directly).Yes
2.5install/git-tools.sh, install/agent-tools.shDeploy architecture-independent helper commands into $ARCH_BIN, including git-wt, df-agent-doctor, and the explicit local-agent launcher.Yes
2.7inlineSanity-check that $ARCH_BIN, $CARGO_HOME, $RUSTUP_HOME, $NVM_DIR parents exist and aren’t broken symlinks. Aborts if anything’s wrong.Yes
3install/zsh.shClone or update oh-my-zsh + plugins.Yes
4install/homebrew.sh (macOS) or install/linux-packages.shInstall Homebrew, run brew bundle install --file=Brewfile, optionally brew upgrade and brew upgrade --cask --greedy.Yes
4.5install/quarto.shVerify the macOS cask or install a checksum-verified rootless Linux release under $LOCAL_PLAT.Yes
5install/macos-services.shWire Docker plugins and apply the opt-in login-service policy. Reconcile an idle app-owned Ollama server to the formula with model-inventory verification and rollback. macOS only.Yes
5.5install/macos-settings.shdefaults write for Dock, Finder, keyboard, trackpad, Safari, iTerm2, screen lock. Sudo-gated extras (skipped if sudo unavailable): power management, Touch ID for sudo (/etc/pam.d/sudo_local, with pam_reattach so it works in tmux), and a global 60-min sudo ticket (/etc/sudoers.d/df-ticket).Yes
5.6install/macos-quick-actions.shDeploy *.workflow bundles to ~/Library/Services/; flush pbs.Yes
6variousSee language-runtime table below. Each script is independent; failures cascade only via die (not log_warn).Yes
6.5install/local-llm.sh + install/opencode.shVerify the selected local-inference tools (full by default; skipped by core). Independently verify and reconcile OpenCode when DF_DO_OPENCODE is enabled.Yes
6.6install/memory.shAgent memory stack: cass binary/archive setup (indexing is manual), ~/kb knowledge repo, qmd collections/embeddings, qmd daemon.Yes
6.65install/skills-sync.shInstall agent skills from agent-skills.txt into the shared ~/.claude/skills tree.Yes
6.7install/blender-mcp.shDownload addon.py into Blender’s user addons, enable it headlessly, and verify the enabled state. Default-on on macOS where the Brewfile installs Blender; default-off on Linux.Yes
7install/auth.shWalk every service, prompt [k] keep / [u] update / [d] delete per service. Default off — set DF_DO_AUTH=1 to enable.Yes
8overlay scriptsRun bash $DF_ROOT/dotfiles-*/bootstrap.sh "$DF_MODE" for each overlay.Per overlay
finalinstall/verify-tools.shVerify selected commands resolve from PATH and pass their runtime postconditions.Yes
Sub-stepScriptWhatNotes
6ainstall/python.shInstall uv to $ARCH_BIN; create $PYTHON_ENV with python.txt; install pip.txt plus pip-full.txt when DF_PROFILE=full (each CLI gets an isolated venv).Plain python includes SymPy. Runs before Node so node-gyp can use uv’s Python.
6binstall/node.shInstall pinned nvm; install/upgrade Node 24 LTS; install npm.txt packages globally.The parent bootstrap activates nvm before later agent/skill steps.
6cinstall/rust.shInstall rustup and rust-analyzer; in the full profile, install the rust-docs MCP nightly and every entry in cargo.txt.Prebuilt first, host-target source fallback; self-update only in upgrade mode.
6dinstall/go.shInstall CLI tools from go.txt into $ARCH_BIN.Go itself is owned by the Brewfile.
6einstall/julia.shInstall/default Juliaup’s release channel in PLAT-isolated depots.Upgrade mode runs juliaup update release.
6finstall/lean.shInstall elan to $ELAN_HOME; install and default the pinned Lean toolchain.Pin moves only alongside Mathlib; upgrade updates elan, not exact project pins.
6ginstall/latex.shmacOS: verify MacTeX. Linux: install TinyTeX below $LOCAL_PLAT, route sys_bin into $ARCH_BIN, and install baseline packages.Upgrade mode runs tlmgr update --self --all.
6hinstall/claude.shDownload Claude Code; install plugins; register MCP servers; deploy overlay skills.Atomic binary replacement.
6iinstall/codex.shSync private config, hooks, guards, prompt-free MCP servers, and run the healthcheck.The healthcheck parses every profile and hook trust entry.
6jdesktop scriptsMerge tracked Claude/Codex Desktop and LinearMouse settings on macOS.Preserve app-owned state.
6kinstall/cursor.sh / install/vscode.shSync Cursor MCP/settings/CLI merge/worker and editor extensions.Defaults on for macOS and off for Linux. When selected, the CLI and every declared extension must pass the final check. The My Machines worker does not fail bootstrap on missing TCC.
6linstall/cmake.shCopy CMake toolchain files into $LOCAL_PLAT/cmake/toolchains/.Always overwrites deployed copies.
ModeWhat changes
install (default)Full idempotent setup. DF_DO_SCRATCH=1 (run scratch step).
updateSame steps, but: git pull --ff-only in step 0.5, DF_DO_SCRATCH=0 (assume scratch is already set up), tools self-update where they support it.
upgradeSame as update, plus Homebrew, rolling Rust channels/Cargo tools, Go @latest tools, Node 24/npm 12 globals, uv tools, Julia release, TeX, and editor refreshes. It ends with audit-versions.sh --strict.

The canonical source is bootstrap.sh itself — header comment block has the full flag table, then numbered ### N. ### step markers. To trace what a single step actually does, jump to install/<step>.sh. Each install script sources _lib.sh for path variables and logging helpers.