Bootstrapping is the process of setting up dots on a new machine. dots supports both fresh initialization and cloning from an existing dotfiles repository.
If you don't have an existing dotfiles repo:
dots initThis creates a default config file at:
- Unix:
~/.config/dots/config.yaml - Windows:
%APPDATA%\dots\config.yaml
From there, add taps and install packages:
dots tap add personal git@github.com:you/dotfiles.git
dots install personal/nvimIf you already have a dotfiles repo, bootstrap everything in one command:
dots init --from git@github.com:you/dotfiles.git --path dotsThis:
- Clones the repo as a tap
- Installs the package at the specified
--pathwithin the tap - The installed package typically contains dots' own config, completing the bootstrap
After the initial bootstrap, apply a profile to install the rest:
dots profile apply workA common pattern is to include a dots package in your tap that manages dots' own configuration:
taps/personal/
dots/
Dotfile.yaml
config.yaml
nvim/
Dotfile.yaml
init.lua
...
The dots/Dotfile.yaml:
package:
name: dots
description: dots self-configuration
tags: [meta]
links:
config.yaml: "@config/dots/config.yaml"The config.yaml inside the dots package contains your tap registrations, aliases, and preferences. When dots init --from <url> --path dots installs this package, it links your config.yaml into place, giving dots full knowledge of your taps and settings.
If dots is installed but your config is missing or corrupted:
# Re-initialize with defaults
dots init
# Or re-bootstrap from your repo
dots init --from git@github.com:you/dotfiles.git --path dotsIf you have a profile exported:
dots profile import work-profile.yaml
dots profile apply workThe dots package can include platform-specific configuration:
package:
name: dots
description: dots self-configuration
links:
config.yaml: "@config/dots/config.yaml"
platform:
darwin:
hooks:
post_install: "xcode-select --install 2>/dev/null || true"
linux:
hooks:
post_install: scripts/install-deps.shThis lets the bootstrap process install platform-specific prerequisites automatically.
For fully automated setup on a new machine, create a small bootstrap script:
#!/bin/bash
# bootstrap.sh - Set up a new machine
# Install dots (via Homebrew or from source)
brew install jlrickert/formulae/dots
# Bootstrap from your dotfiles repo
dots init --from git@github.com:you/dotfiles.git --path dots
# Apply your profile
dots profile apply workSave this somewhere accessible (e.g., a GitHub gist) so you can run it on any new machine.