Note: this is a fork of mathiasbyrnes/dotfiles. Check out the original for the latest and greatest.
Warning: If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove things you don’t want or need. Don’t blindly use my settings unless you know what that entails. Use at your own risk!
- Clone:
git clone https://github.com/DSchau/dotfiles.git ./init/init.sh: creates~/Projects/{Personal,Work,Scripts}, copies scripts and Ghostty config, creates an SSH key and~/.ssh/config, and installs oh-my-zsh, nvm and bun./bootstrap.sh: copies the dotfiles (.zshrc,.bash_profile,.aliases, …) into~, copies Claude Code commands to~/.claude/commands, installs nvm and node (if missing), sets up pi and syncs Zed./brew.sh: installs Homebrew, CLI tools and apps (casks)./init/mas.sh: installs the Mac App Store apps listed ininit/mas_apps.txt(sign in to the App Store first)./.macos: sets macOS defaults- Optional:
./git.shclones the repos ingit_repos.txtinto~/Projects/{Personal,Work/<Org>}
./init/doctor.sh lists missing brew casks / App Store apps and checks global dependencies.
To update, from this repo: source bootstrap.sh (use set -- -f; source bootstrap.sh to skip the prompt).
bootstrap.sh installs pi if it's missing (to ~/.pi/agent, added to $PATH in .bash_profile). It then merges pi/settings.json into ~/.pi/agent/settings.json and installs the packages listed there (e.g. pi-open-tui). The repo's packages list replaces your local one.
pi-memory gives pi memory that carries across sessions. It's stored as markdown in ~/.pi/agent/memory/, which is not committed because it's personal.
-
pi/AGENTS.md→~/.pi/agent/AGENTS.md: tells the agent to save preferences, decisions, lessons and deferred work without being asked to "remember" -
pi/prompts/memory-promote.md→/memory-promote [days]: moves durable facts from recent daily logs intoMEMORY.mdand prunes stale entries. Run it about once a week -
bootstrap.shinstallsqmdglobally somemory_searchworks (keyword search immediately; semantic search after the first embed downloads its model) -
.exportssetsPI_CACHE_RETENTION=long, sends exit summaries to Haiku instead of Opus (with a 30s timeout instead of 10s), and also writes summaries on/new,/resume,/forkand/reload -
pi/patches/pi-memory@0.4.2.patchis a local patch, applied bypi/patch-packages.sh(whichbootstrap.shruns). It does two things:- Exit summaries become short index entries (Topic/Outcome/Files/Open) instead of long Decisions/Lessons write-ups
- The summary is written by a detached background process, so Ctrl+D and
/quitexit immediately. SetPI_MEMORY_EXIT_SUMMARY_BACKGROUND=0to go back to waiting. Worker errors go to$TMPDIR/pi-memory-exit-summary.log
pi updatereinstalls packages without the patch, so run~/dotfiles/pi/patch-packages.shafterwards. pi-memory is pinned to 0.4.2 inpi/settings.jsonso the patch keeps applying. To upgrade, bump the pin, rebase the patch, and rename the patch file to match the new version -
showCacheMissNoticesinpi/settings.jsonshows prompt-cache misses, which are where tokens get wasted
The default is claude-code/default (same as pi --model claude-code/default), from the pi-claude-code package. It sends requests through the Claude Code CLI (claude -p, installed by brew.sh), so they use your Claude Pro/Max subscription instead of API credits. Log in once with claude auth login, then check it with /claude-code-status in pi.
default is whatever Claude Code currently recommends. It's Opus 5.5 with 1M context (claude-opus-5-5[1m], Claude Code 2.1.311, November 2026). Thinking defaults to high. Run pi --list-models | grep claude-code to see what it resolves to now. To pin a specific model, use its ID instead, e.g. pi --model claude-code/claude-opus-5-5.
OpenRouter models are still enabled (/model or pi --model openrouter/anthropic/claude-opus-5.5). The API key is not committed. bootstrap.sh merges pi/auth.json into ~/.pi/agent/auth.json. That entry tells pi to read the key from the macOS Keychain (service openrouter-api-key) the first time it needs it, and to fall back to op read op://Personal/OpenRouter/credential if the Keychain doesn't have it. pi keeps the key in memory only, so it's never written to a file or exported to your shell, where the agent's own commands could read it with env.
The Keychain comes first because the 1Password CLI has to be approved separately in each terminal, and pi hides the lookup's errors. A new tab then shows "No models available" with no explanation. To copy the key into the Keychain once on each Mac, run security add-generic-password -a "$USER" -s openrouter-api-key -U -w and paste the key from the OpenRouter item in your 1Password Personal vault. Create the key at openrouter.ai/keys with a credit limit.
init/Zed is the source of truth. bootstrap.sh overwrites ~/.config/zed/settings.json and keymap.json. Extensions are installed by Zed itself from auto_install_extensions. It also links the zed CLI into ~/.local/bin.
- Dracula Pro is paid and not committed:
bootstrap.shcopies the Zed theme from iCloud if it's there - The editor font (Fira Code) is installed by
brew.sh
Copies photos and videos from the camera's SD card (/Volumes/Videos) to the NAS through the HTPC, then starts the HTPC's photo-backup (R2 + Google Photos). The full flow is in htpc-knowledge CAMERA.md.
media(scripts/media.sh): runsvideos.shandpictures.sh, then startsphoto-backupon the HTPC only if both succeeded. Logs to~/logs/media.log. It refuses to run off the home network (ALLOW_REMOTE=1overrides)media status: the lastphoto-backuprun. Card files are deleted once they're on the NAS (REMOVE_FROM_CARD=0keeps them; then reformat once all four jobs end withexit 0)media-on-mount.sh: runsmediaautomatically when the camera (USB-C, Mass Storage mode) or its SD card mounts.bootstrap.shinstalls it as the LaunchAgentcom.dschau.media-on-mount(StartOnMount); once per mount, only for volumes withDCIM/orPRIVATE/M4ROOT/, and not whilemediais already running. Notifications say when the card is seen, and when the copy finishes or fails (a failed run is retried by plugging it in again); output goes to~/logs/media-on-mount.log. The first run may ask to letbashaccess removable volumes. Off:launchctl bootout gui/$(id -u)/com.dschau.media-on-mountpictures.sh: copies the originals first, then converts only the files rsync sent: oneexiftoolcall for the years,sipsin paralleldrop.sh:~/Movies/Drop/*.mov→~/Movies/Home/*.mp4, remuxed when possible, otherwise re-encoded with VideoToolbox HEVC
~/.path: sourced first; use it to extend$PATH, e.g.export PATH="/usr/local/bin:$PATH"~/.extra: extra settings (git name/email); tracked and copied bybootstrap.sh
Suggestions/improvements welcome!
If specific to this repository, feel free to use these issues.
Original author
| Mathias Bynens |
- @ptb and his macOS Setup repository
- Ben Alman and his dotfiles repository
- Cătălin Mariș and his dotfiles repository
- Gianni Chiappetta for sharing his amazing collection of dotfiles
- Jan Moesen and his ancient
.bash_profile+ shiny tilde repository - Lauri ‘Lri’ Ranta for sharing loads of hidden preferences
- Matijs Brinkhuis and his dotfiles repository
- Nicolas Gallagher and his dotfiles repository
- Sindre Sorhus
- Tom Ryder and his dotfiles repository
- Kevin Suttle and his dotfiles repository and macOS-Defaults project, which aims to provide better documentation for
~/.macos - Haralan Dobrev
- Anyone who contributed a patch or made a helpful suggestion