Portable dev environment for macOS and Linux (including WSL).
curl -fsSL https://raw.githubusercontent.com/ianad/dotfiles/main/bootstrap.sh | bash
exec zshThe bootstrap is idempotent — safe to re-run.
- Detects OS (
macos/wsl/linux). - Installs Xcode CLT (macOS) or
git,curl,build-essential,zsh,wslu, etc. (Linux). - Clones this repo to
~/dotfiles. - Installs Homebrew if missing.
- Runs
brew bundleagainstBrewfile(stow, direnv, gh, ripgrep, uv, …). - Installs oh-my-zsh.
- Clones
~/.claude(a separate repo) and runs itssetup-plugins.sh. - Backs up any conflicting files in
$HOMEto~/.dotfiles-backup/<timestamp>/. - Symlinks
home/*into$HOMEvia GNU stow.
| Path | Purpose |
|---|---|
bootstrap.sh |
curl-and-run entrypoint |
Brewfile |
declarative brew package list |
apt-packages.sh |
apt prereqs (Linux only) — minimal, just enough to run brew |
lib/detect-os.sh |
sourced helper, sets $OS_KIND |
home/ |
stowed into $HOME |
home/.zshrc |
shell config (oh-my-zsh, direnv, NVM, claude() router) |
home/.zshenv |
minimal env for non-interactive shells |
home/.gitconfig |
git config + gh credential helper |
home/.config/direnv/direnvrc |
direnv customizations (currently empty stub) |
~/.zshrc defines a claude() function that reads $CCS_PROFILE from direnv
and dispatches to the right ccs workspace. Drop a .envrc in any project:
echo 'export CCS_PROFILE=cognician' > .envrc
direnv allow…and claude in that directory automatically uses the cognician profile.
- Brew package → add to
Brewfile, runbrew bundle. - New dotfile → drop it in
home/, re-runbootstrap.sh(or juststow -d ~/dotfiles -t ~ home). - System (apt) package → add to
apt-packages.sh, re-run it.
Stow uses symlinks, so editing ~/.zshrc edits the file in this repo. No
re-stow needed for content changes. Re-stow only when adding/removing files:
stow -d ~/dotfiles -t ~ homeOn first run, anything in $HOME that would clash gets moved to
~/.dotfiles-backup/<timestamp>/. To roll back the whole thing:
stow -D -d ~/dotfiles -t ~ home # remove symlinks
# restore backup contents from ~/.dotfiles-backup/<timestamp>/ as needed~/.claude→ https://github.com/ianad/.claude (cloned by bootstrap)