▀▄▄▄ ▀▄▄▄
▐▄▄▌ ▄▄▄ ▐ █▌▄▄
▄ ▄▄▄▄▄█▌▄▄▄▄█▄▌▐ █▀▀▀▀
▐▐██▌▐▐██▌▐█▌▄▄█▌▐ █▌ ▄▌
░▀▀▀▀▀▀▀░▀▀▀▀▀▀ ▀▀▀▀▀▀▌
Personal macOS bootstrap and day-to-day maintenance CLI (dot). Automates Homebrew, mise, Lerd/Podman, yabai/skhd, Ghostty, Neovim, and related tooling.
Shell scripts target Zsh (macOS default). Run
./installanddotfrom Zsh.
- Sign in to the Mac App Store (needed for
maspackages in the Brewfile). - Update macOS via System Settings → Software Update.
- Rosetta (Apple Silicon only):
softwareupdate --install-rosetta - SSH keys in
~/.ssh(ed25519 preferred), added to GitHub — clones use SSH remotes. - Xcode Command Line Tools:
xcode-select --install
git clone git@github.com:milon/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./installNoninteractive (auto-confirms prompts; skips Atuin login and SSH key generation):
./install --yes
# or: DOT_NONINTERACTIVE=1 ./install./install ensures Homebrew and CLT when needed, then runs dot apply (full setup). Config is symlinked as part of that apply via the symlinks module — you do not need a separate post-install symlink step.
Canonical checkout path is ~/.dotfiles. DOTFILES_ROOT is still discovered from the repo, so another path works, but docs and skhd helpers assume this location.
After install, bin/dot is on your PATH (via shell env). Entry points:
dot # same as: dot help
dot help
dot help pull # per-command help (also: dot pull --help / -h)
dot --yes <command> # commands that opt into shared `yes` (see Shared options)Run dot help for the live categorized tree. Summary:
| Category | Commands | Purpose |
|---|---|---|
| CORE | doctor, lint, update, clean, symlinks, precheck, apply |
Health, maintenance, full setup |
| SETUP | brew, shell, git, atuin, xcode, mise, php, lerd |
Tooling install/configure |
| REPOS | clone, pull |
Personal git repos from inventory |
| SYSTEM | mac, hotkeys, manual |
macOS defaults, yabai/skhd, checklist |
Notable details:
- doctor — Read-only drift check (Homebrew, symlinks, mise, PHP, Podman/Lerd, git, Sheldon, Atuin, yabai/skhd, SSH, PATH). Non-zero if anything is broken. Alias:
dot check. - apply — Idempotent full setup (what
./installfinishes with). Optional module list accepts public names:dot apply brew symlinks clone. - symlinks — Link
config/onto~/~/.configperinventory/links.toml. Backups go to~/.local/share/dot/backup/. - update — Topgrade using
~/.config/topgrade.tomlwhen present, else the repo copy. - pull --update — Runs
composer updatein PHP repos, then commits and pushes lockfile bumps (Updates dependencies). - hotkeys — Start/reload yabai + skhd; writes
generated/skhd-bin. - shell — Runs
sheldon lockafterplugins.tomlchanges so new zsh plugins load.
Edit lib/commands.zsh — the registry for dispatch, dot help, per-command --help/-h, and tab-completion (config/zsh/completions/_dot). Help rendering lives in lib/help.zsh.
Typical checklist:
- Put the command in a
DOT_CMDS_<category>list and setDOT_CMD_MODULE/DOT_CMD_DESC(optionalDOT_CMD_HELP,DOT_CMD_USAGE,DOT_CMD_ARGS). - Implement
modules/<name>.zsh(or reuse an existing module + action). - Opt into shared flags and/or add command-only options (below).
Common flags are defined once and reused — same idea as Symfony Console shared InputOptions.
| Piece | Role |
|---|---|
DOT_SHARED_OPTS |
Catalogue: key → short|long<TAB>description (e.g. help, yes) |
DOT_CMD_SHARED |
Per-command opt-in: space-separated keys from the catalogue |
DOT_CMD_OPTS |
Command-only options (never repeat shared ones here) |
-h/--help is always attached; do not list help in DOT_CMD_SHARED.
# Opt into --yes for a prompting command:
DOT_CMD_SHARED[mycommand]="yes"
# Command-specific flag (pull's -u):
DOT_CMD_OPTS[pull]=$'u|update\tRun composer update…'
# New shared flag for everyone who opts in:
DOT_SHARED_OPTS[force]=$'f|force\toverwrite without asking'
DOT_CMD_SHARED[symlinks]="force" # or "yes force" to combineHelpers (also used by help + completions):
dot_cmd_has_shared <cmd> <key>— whether the command accepts that shared optiondot_cmd_option_lines <cmd>— merged lines: shared → specific → helpdot_cmds_with_shared <key>— command names that opted in (help-display order)
--yes / -y is parsed once in lib/ui.zsh (dot_consume_yes_args) and sets DOT_NONINTERACTIVE=1. Modules call dot_noninteractive / confirm_or_exit — they do not re-parse flags.
modules/*.zsh run as subprocesses with set -euo pipefail. They are never sourced into bin/dot, so a module failure cannot leak cd/set -e into the dispatcher. Standalone helpers under bin/yabai-* also use set -euo pipefail.
~/.dotfiles/
install Bootstrap → brew/CLT → dot apply
bin/dot User CLI
bin/yabai-* Window-manager helpers (skhd)
config/ All tracked config (one tree)
inventory/
Brewfile Homebrew formulae, casks, MAS
links.toml Symlink map (config/ → disk)
repos.toml Personal git clones
packages.toml Composer globals (mise lives in config/mise/)
modules/ apply|check scripts
lib/ Shared UI, inventory parsers, command registry
generated/ Gitignored stubs (e.g. skhd-bin)
tests/lint.zsh Shell lint (also CI / pre-commit)
optional/vscode/ Optional VS Code CSS/JS (not symlinked)
Apps still split destinations between ~ and ~/.config. In the repo, everything lives under config/. Only paths listed in inventory/links.toml are symlinked:
| In repo | On disk |
|---|---|
config/zshrc |
~/.zshrc |
config/gitignore |
~/.gitignore |
config/skhdrc |
~/.skhdrc |
config/yabairc |
~/.yabairc |
config/sheldon/ |
~/.config/sheldon/ |
config/atuin/ |
~/.config/atuin/ |
config/nvim/ |
~/.config/nvim/ |
config/ghostty/ |
~/.config/ghostty/ |
config/fastfetch/ |
~/.config/fastfetch/ |
config/mise/ |
~/.config/mise/ |
config/topgrade.toml |
~/.config/topgrade.toml |
Not linked (sourced via $DOTFILES_ROOT): config/zsh/*.zsh, config/zsh_aliases, config/fzf.sh, config/starship.toml, config/gitconfig (included by git config --global include.path).
Driven by inventory/Brewfile and mise:
- Shell: Sheldon, Starship, Atuin, zoxide, fzf, eza, bat, …
- Languages: mise (node, python, ruby, java, go, rust, …); host PHP/Composer via Homebrew; site runtime is Lerd on Podman
- Editors / terminal: Neovim, Ghostty, VS Code
- Desktop: yabai + skhd, Raycast, 1Password, Chrome, TablePlus, …
- OrbStack remains available for Docker Desktop–compatible Compose; Lerd does not use it
Per-machine extras go in untracked ~/.Brewfile.local (created by dot precheck).
- Secrets / machine overrides:
~/.zshrc.local(mode600, sourced last). Not tracked. - Shared aliases:
config/zsh_aliases. - Zsh plugins:
config/sheldon/plugins.toml, thensheldon lock(ordot shell). - New symlinks: add files under
config/and a row ininventory/links.toml, thendot symlinks. - Homebrew: shared packages →
inventory/Brewfile; one-off machine packages →~/.Brewfile.local. - Personal repos:
inventory/repos.toml(dot clone/dot pull). - VS Code Custom CSS/JS (optional): point the Custom CSS and JS Loader extension at
$DOTFILES_ROOT/optional/vscode/style.cssandscript.js.
dot doctor # drift / health
dot brew # refresh Brewfile packages
dot update # topgrade
dot clean # brew/npm/composer/mise caches
dot pull # update tracked repos
dot hotkeys # reload yabai + skhdPre-commit (this repo): dot lint + symlink source checks (via .githooks).
- SSH / clone failures: ensure a key exists and is loaded (
ssh-add -l), and is on GitHub. - Brewfile drift:
dot brew(shared +~/.Brewfile.local). - Broken symlinks after path moves:
dot symlinks(conflicts backed up under~/.local/share/dot/backup/). - Prompt / plugins odd after updates: open a new shell; run
dot shell(Sheldon lock) and confirmSTARSHIP_CONFIGpoints at$DOTFILES_ROOT/config/starship.toml. - Lerd / Podman:
lerd status/lerd start; doctor checks Podman reachability. - Unknown command:
dot help— registry lives inlib/commands.zsh.
See LICENSE.
- Twitter: @to_milon
- Email: contact[@]milon[.]im