Skip to main content

Getting Started

This setup is managed with chezmoi. The basic loop is:

  1. Initialize from GitHub
  2. Review the changes chezmoi wants to apply
  3. Apply them (which can trigger install hooks)

Chezmoi renders the source files under home/ into your home directory.

Preconditionsโ€‹

  • Use macOS with 1Password installed and signed in for SSH keys and secrets. Using another secret manager requires template changes.
  • Install chezmoi before using the preview commands below; the bootstrap command also installs it.
  • Applying the setup installs tools, changes your login shell and macOS preferences, and can remove Homebrew packages not listed in the Brewfile. Inspect the hooks before applying it to an existing machine.

Safe Preview Flowโ€‹

Review the file changes before applying:

chezmoi init kapral18
chezmoi diff

You can also do a dry-run apply (no changes):

chezmoi apply --dry-run --verbose

If the diff looks good:

chezmoi apply

One-Liner Bootstrap (What The README Uses)โ€‹

The repo root README.md uses the upstream chezmoi installer + init in one line:

sh -c "$(curl -fsLS get.chezmoi.io/lb)" -- init --apply kapral18

This command applies the setup immediately. Use the preview flow first if you need to inspect changes.

What chezmoi apply Can Trigger Hereโ€‹

This setup uses chezmoi hooks under home/.chezmoiscripts/. On first run, you should expect:

HookWhat it does
run_once_before_00-install-xcode.shXcode Command Line Tools install + license acceptance
run_once_after_01-install-brew.shHomebrew install
run_once_after_02-install-fish.shFish install + switching your login shell
run_onchange_after_03-install-brew-packages.fish.tmplBrew bundle install + cleanup
run_onchange_after_04-update-fish-packages.fish.tmplFish packages update

There are also hooks that manage language/tool versions and global packages (mise, cargo, go, gems, pnpm, uv) and some macOS preferences.

Init Promptsโ€‹

During init/apply, chezmoi will prompt for values via home/.chezmoi.toml.tmpl:

  • email / SSH public key
  • PGP cache TTL

Those values are used by templates (for example: git identity and SSH signing).