My dotfiles for macOS, with Linux and WSL support. GNU Stow links home/ into $HOME, config/ (and config-macos/ on macOS) into $XDG_CONFIG_HOME, and data/ into $XDG_DATA_HOME.
The repo is public and the stowed files are symlinks into it, so a tool that writes to one (git config --global, Gradle, Claude Code settings, ssh) writes into git. Keep secrets and machine-specific values in the *.local files listed under Machine-local overrides.
On a fresh Mac, or on Linux and WSL, run:
curl -fsSL https://raw.githubusercontent.com/vakesz/dotfiles/main/install.sh | bashOn macOS this installs the Xcode Command Line Tools. On Linux it installs git, stow and zsh with the distro package manager, which needs root or sudo. Either way it then clones the repo to ~/projects/dotfiles and runs bootstrap.sh, which installs Homebrew and the Brewfile (macOS), links the dotfiles, and offers the platform setup.
To pass flags to bootstrap.sh, use bash -s --:
curl -fsSL https://raw.githubusercontent.com/vakesz/dotfiles/main/install.sh | bash -s -- --adopt--adopt: move your existing files into the repo withstow --adopt, replacing the repo's versions. Interactive only. Review the result withgit diff.--skip-preflight: skip installing the Command Line Tools, Homebrew and the Brewfile.DOTFILES_REPO,DOTFILES_DIRandDOTFILES_BRANCHchange the repo URL, clone location and branch thatinstall.shuses.
If the repo is already cloned, run ./bootstrap.sh directly. After pulling, rerun it if files were added or moved. Platform details: macOS, Linux / WSL. macOS is the first-class platform. Debian and Ubuntu, including WSL, are tested; Fedora, Arch and openSUSE are best-effort.
home/: stowed into$HOME. Only files that must live directly there:.zshenv,.ssh/configand.claude/(CLAUDE.md, settings.json with deny rules, agents).config/: stowed into$XDG_CONFIG_HOME.config-macos/is the macOS-only part.data/: stowed into$XDG_DATA_HOME.scripts/:doctor.sh, the repo checks, shared libraries inlib/and platform setup inplatform/.assets/: files the macOS setup uses. They are not stowed.docs/: longer notes: macOS, Linux / WSL, Omnimount.
Per-user agent state at the repo root (/.claude/, /.agents/, /skills-lock.json) is gitignored. The tracked home/.claude is not.
make help lists them all. The ones used most:
make bootstrapandmake adopt: the full bootstrap.make macosandmake linux: the platform setup on its own. Each macOS sub-script (hardening, Omnimount, Office tweaks, Spotlight) has its ownmacos-*target too.make doctor: check a bootstrapped machine. It never changes anything and exits non-zero on a failed check.scripts/doctor.sh --only stowruns just the stow link checks.make check: the repo checks..editorconfigsets the shell formatting thatcheck-fmtenforces.make hooks: points this clone at.githooks/. The pre-commit hook runsgitleakson staged changes and fails if gitleaks is missing (bypass with--no-verify).
CI (.github/workflows/checks.yml) runs make check, gitleaks over the full history, and bootstrap on Ubuntu 22.04 and 24.04. On macOS it runs bootstrap and doctor with /bin/bash. A weekly run also fails on Brewfile entries Homebrew has deprecated or disabled.
Shell policy: install.sh, bootstrap.sh and scripts/lib must stay compatible with bash 3.2. Other scripts may assume Homebrew bash 5, which the Brewfile installs.
config/zsh/.zshenv: XDG directories,ZDOTDIR,EDITOR,VISUAL,HOMEBREW_NO_*, tool locations (Go, Rust, uv, pnpm, ccache, Gradle, Android SDK) and thePATHevery shell gets, in this order:~/.local/bin, rustup wrappers, cargo/uv/go/gem/composer bins, pnpm, Homebrew. Missing directories are skipped. There is no cachedbrew shellenv. On macOSJAVA_HOMEis JDK 17: the JDK folders first, then Homebrew'sopenjdk@17, withjava_homeas the fallback.home/.zshenvis a shim that setsZDOTDIRand sources it. GUI apps get only itsPATH(details).config/zsh:.zshrcloadsrc.d/*.zshin order: helpers, PATH, options, tools, completion, commands, Python venvs, keybindings, then plugins (25-wsl.zshon WSL). The PATH step adds keg-only formulae and ccache just ahead of Homebrew's bin, in interactive shells only. Tool init scripts are cached in$XDG_CACHE_HOME/zsh. Commands you type have plain names; internal helpers start with_dotfiles_.config/starship.toml: the prompt.config/ghostty: the terminal.config/git: config and global ignores. HTTPS credentials go through Git Credential Manager.transfer.fsckObjectsis on, andcore.fsmonitoris off globally (enable it per large repo). The Git LFS filter is part of the config.config/gh: only the non-default keys (HTTPS protocol, thecoalias).home/.ssh/config: GitHub uses~/.ssh/id_ed25519; hosts andIncludes for container tools are listed there. No keys are tracked.data/gradle/gradle.properties: parallel builds, the build cache and the configuration cache. It is stowed fromdata/because Gradle reads user settings only from$GRADLE_USER_HOME.config-macos/linearmouse: mice get no acceleration and reversed scrolling; trackpads keep the system settings.config-macos/mole: Mole's purge paths and whitelists.config/fd,config/ripgrep,config/tealdeer,config/topgrade.toml: CLI tool settings.make check-configkeeps the fd and ripgrep ignore lists in sync.home/.claude: Claude Code's global CLAUDE.md, settings (includingpermissions.denyfor~/.ssh,.envfiles, keychain reads and force pushes) and agents.
Bootstrap links files one by one (--no-folding), so $XDG_CONFIG_HOME/zsh and $XDG_CONFIG_HOME/git are real directories. Put machine-local files there, not in the repo:
$XDG_CONFIG_HOME/zsh/.zshrc.localand$XDG_CONFIG_HOME/zsh/rc.d/*.local.zsh$XDG_CONFIG_HOME/git/gitconfig.local: signing key,commit.gpgsign, credential helpers~/.ssh/config.local: machine-specific hosts- Gradle secrets:
ORG_GRADLE_PROJECT_*environment variables or a project-localgradle.properties
The repo git-ignores and stow-ignores *.local files as a guard.
rgf <rg args>: search with ripgrep, pick a match in fzf, and open it in$EDITORat that line.venv [dir]: activate a virtualenv, creating it withuvif needed.venv-offdeactivates it.venv-auto [dir]: create the virtualenv if needed, write a.envrcthat points direnv at it, and rundirenv allow. It won't edit an existing.envrc.zsh-profile [runs]: time shell startup.dotsandc: jump to the repo clone and to~/projects.clisclaude.- Vi mode with the usual gaps filled (backspace and
^Wpast the insert point, history search onk/j,vedits the line, text objects, block and bar cursors).
- Homebrew installs everything in the Brewfile, including the zsh plugins, so there's no plugin manager. The login shell is the system
/bin/zsh. - JavaScript: Node, pnpm and Bun from Homebrew. Python:
uv. Ruby: Homebrew's, gems in$GEM_HOME. Rust: Homebrew's rustup, toolchains in rustup's default~/.rustupso GUI apps find them. - Updates go through
topgrade. Xcode is installed separately.
More in docs/macos.md.