Opinionated workstation + Codespaces bootstrap.
- Idempotent
install.shthat picks Homebrew (macOS) or apt (Linux, Codespaces) and sets up:- Packages from the Brewfile
- Oh My Zsh and the Spaceship theme
- Neovim with a minimal config bootstrap
- Meslo Nerd Font (a Brewfile cask on macOS)
- Symlinks that never overwrite or repoint anything (existing files are backed up)
~/.zshrcand~/.gitconfigas local files that load the shared ones, so tools that edit them never touch tracked files
- Safety nets:
scan-secrets.sh(run by git hooks and CI), strict permissions for credential files,doctor.sh - A private overlay (
snapshot-private.sh) that carries non-secret local files to a new Mac - Managed Codespaces SSH config export (
export_codespace_cfg) - Codespace cleanup utility (
clean-codespaces.sh --dry-run) - Custom multi-model PR review/fix loop with the
multi-model-pr-loopCopilot skill - Shell linting, tests and secret checks via GitHub Actions + local
make lint test.
- Oh My Zsh - Zsh framework for managing configuration
- Spaceship Prompt - Minimalistic and powerful Zsh prompt
- tmux - Terminal multiplexer
- fzf - Command-line fuzzy finder
- Neovim - Hyperextensible Vim-based text editor
- bat - A cat clone with syntax highlighting
- ripgrep - Fast line-oriented search tool
- GitHub CLI - GitHub's official command-line tool
- GitHub Copilot CLI - Standalone coding agent used by the PR review commands
- Meslo Nerd Font - Patched font with icons from Nerd Fonts
- ShellCheck - Static analysis tool for shell scripts
- git - Git aliases and functions
- alias-finder - Find existing aliases
- kubectl - Kubectl autocompletion and aliases
- docker - Docker autocompletion and aliases
- gh - GitHub CLI autocompletion
- macOS: Homebrew installed (the installer stops and prints the install command if it is missing)
- Linux/Codespaces:
apt-getavailable (the installer installszshand the other tools) - Both:
gitandcurl
-
Clone the repository:
git clone https://github.com/JoannaaKL/dotfiles.git cd dotfiles -
Run the install script:
./install.sh
-
Start a new shell or source the configuration:
source ~/.zshrc
The install.sh script performs the following actions:
- Preflight checks - Verifies
gitandcurl(and Homebrew on macOS) - Git hooks - Enables
.githooksfor this clone unlesscore.hooksPathor a custom hook is already set. This comes first because it needs no network, so the secret scan is on even if a later step fails - Packages
- macOS:
brew bundle --no-upgradewith the Brewfile, so tools that are already installed are not upgraded, plus the Copilot CLI cask whencopilotis missing - Linux/Codespaces: one
apt-get installfor whatever is missing (batis exposed asbatalthough Debian names itbatcat), thenghon its own because the shared.gitconfigcallsgh auth git-credentialand not every apt release has it. A package failure, or a system withoutapt-get, only warns and the rest of the install carries on - Every platform: an existing
~/.netrcis set to mode 600 first, and a proxy entry is never appended through a symlinked~/.netrc
- macOS:
- Private overlay (optional) - Restores files from
~/.dotfiles-private/home(owner-only: mode 600, or 700 for files that are executable in the overlay) where the target does not exist yet, skipping any path behind a symlinked directory; the overlay'sBrewfileis installed as the last step - Symlinks -
.tmux.conf,.spaceship.zsh,.gitmessageand the global ignore file.gitignore_global(as~/.gitignore). Existing files are backed up. A symlink that points somewhere else, for example into another clone, is left alone;DOTFILES_FORCE=1 ./install.shrepoints it - Local config files -
~/.zshrcand~/.gitconfig(see Local config and safety) and a private~/.zshrc.localcreated from the template. An existing file is replaced only after a verified backup, and a failing step leaves it as it was. A block that is already current needs no write, so a read-only file is fine, and a refresh keeps the file's mode - Tools - Neovim config (a missing
nvimonly warns, and a symlinked~/.config/nvimis left alone), Oh My Zsh (cloned, not piped fromcurl), the Spaceship theme (skipped without Oh My Zsh; an incomplete directory is moved aside and the theme link is always ensured), and the Meslo Nerd Font on Linux workstations (macOS gets it from the Brewfile, Codespaces renders fonts in the client). The two clones are network steps: if one fails, the installer says so, finishes the remaining steps and exits 1 - PR review and catchup commands - Links
pr-review,pr-address-feedback,pr-review-loop,catchupand their Copilot skills
If you prefer to install components individually:
- Oh My Zsh: Follow the installation guide
- Spaceship Prompt: See the installation instructions
- Nerd Fonts: Download from Nerd Fonts releases
This repository is public, so machine-specific or secret data stays out of tracked files.
File in $HOME |
Kind | Purpose |
|---|---|---|
.tmux.conf, .spaceship.zsh, .gitmessage, .gitignore |
symlink into the repo | shared config (.gitignore links to .gitignore_global) |
.zshrc, .gitconfig |
regular local file | a managed block loads the shared file from the repo; everything else in the file is local |
.zshrc.local |
regular local file, mode 600 | your hosts, proxies and other private settings; start from .zshrc.local.example |
Tools such as Git Credential Manager, bun, uv and the Agency CLI append to ~/.zshrc or run
git config --global. When those two files were symlinks into this repo, the edits landed in
tracked files, and one git add -A could have published an Entra tenant ID, a work username
and absolute home paths. They now land in the local files instead. Keep tokens and keys in a
password manager (for example 1Password), never in a dotfile.
Safety nets:
scan-secrets.shscans tracked files, the index (--staged) or all history (--history) for GitHub, AWS and Slack tokens, AWS secret keys, Azure storage and Service Bus keys, PEM and PGP private keys, JWTs, bearer and Basic auth headers, credentials embedded in URLs (a user and password before the@, percent-encoded or not), credential-likekey = valueassignments (a quoted value of 8 or more characters, or an unquoted one of 8 or more that contains a digit; a letters-only unquoted passphrase is not caught), netrc entries (also with machine, login and password on separate lines) and npm passwords, Entra/Azure tenant and subscription IDs, hard-coded/Users/<name>/paths and credential file names, including ones a merge commit introduces. Binary files are searched as text, so a credential cannot hide in one. Its output does not depend on your git settings (color.ui,grep.column, ...). It printsfile:line [rule]and never the matched value, and it fails closed: exit 2 if git or the denylist cannot be read, or ifSCAN_SECRETS_DENYLISTnames a file that does not exist. Private patterns (internal hostnames) must not appear in a public repo, so list them one regex per line in the untracked~/.config/dotfiles/denylist;snapshot-private.shcarries that file to the private overlay and./doctor.shwarns when it is missing. The scanner is a backstop, not proof that nothing sensitive is present.- Git hooks (
.githooks) run the scanner onpre-commit(the index) andpre-push(every commit the remote does not have yet, which also covers merge commits and a secret added then removed). The push boundary is the SHA the remote advertises, never a possibly stale remote-tracking ref, and a new branch is scanned in full. Both hooks fail closed: a missing or non-executable scanner blocks the commit or push.--no-verifyskips them; GitHub secret scanning with push protection is the server-side backstop. ./doctor.shreports tool-written edits behind symlinks, loose permissions on~/.netrc,~/.sshkeys and~/.zshrc.local,IdentityFilepaths that do not exist and a missing scanner denylist.--fixonly runschmod;--timealso measures zsh startup.- Ignore files:
.gitignoreapplies to this repo only..gitignore_globalis deployed as~/.gitignore(core.excludesfile) and applies to every repo, so it holds only specific patterns. It still ignores*mcp*.jsonon purpose, because MCP client configs can contain tokens; that also hides intended files such as.vscode/mcp.json, which needgit add -f.
- Old Mac: run
./snapshot-private.sh(add--with-skillsfor your Copilot skills). It copies non-secret local files (.zshrc.local,.zshenv,.zprofile,.gitconfig,.ssh/config, the scanner denylist, ...) and aBrewfileof everything installed into~/.dotfiles-private, skipping anything that looks like a credential. It never writes through a symlink inside the overlay, and it adds an exception to the overlay's own.gitignorefor any copied file that your global ignore would hide (the shipped one lists.zshrc.local), so a plaingit add -Apicks everything up. It never deletes anything from the overlay: a file it did not refresh this time (its source is gone here, or it was skipped) is listed as "Not refreshed", so you can remove an obsolete one before it is restored onto the next Mac. Review it, then push it to a private repository, for examplegh repo create dotfiles-private --private --source ~/.dotfiles-private --push. - Secrets: keep SSH keys, access tokens and the
.netrctoken in 1Password (or similar), not in any repository. macOS Migration Assistant is the alternative for a 1:1 copy of everything. - New Mac: install Homebrew, then
git clone https://github.com/JoannaaKL/dotfiles.git ~/dotfiles git clone <your private repo> ~/.dotfiles-private # optional overlay ~/dotfiles/install.sh
install.shrestores overlay files (owner-only: 600, or 700 for executables) only where the target is missing and refreshes the managed blocks when the clone moved. A block that loads another clone which still exists is left alone (DOTFILES_FORCE=1 ./install.shrepoints it), so installing from a temporary worktree cannot break your shell. It installs the overlay'sBrewfilelast, and a failing entry there only warns, so it can never block the links and wrappers. - Sign in again (
gh auth login,copilot login), restore keys and tokens from the password manager, and run./doctor.shto confirm nothing is missing.
Older installs symlinked ~/.zshrc and ~/.gitconfig into the repo. install.sh converts them
only when the repo copy has no local edits; otherwise it leaves them untouched and says so.
If ./doctor.sh reports uncommitted edits behind those symlinks:
- Save the tool-added lines outside the repo (the patch can hold tenant IDs and usernames, so never
commit or share it):
git -C ~/dotfiles diff -- .zshrc .gitconfig > ~/dotfiles-local.patch && chmod 600 ~/dotfiles-local.patch - Copy the shell lines you still need (PATH additions, tool setup, proxies, employer hosts) from the
patch into
~/.zshrc.local. The shared.zshrcalready sources it, so nothing changes yet andPATHnever loses a tool such ascopilot. - Reset the clone, update it and install:
git -C ~/dotfiles checkout -- .zshrc .gitconfig && git -C ~/dotfiles pull && ~/dotfiles/install.sh. The two symlinks become local files. - Copy the Git settings you still need (credential helpers, per-host entries) from the patch into
~/.gitconfig, below the managed block. Then run./doctor.sh --fix.
Git reads the shared settings through the [include] in ~/.gitconfig, so every normal git
command sees them. git config --global --get <key> and --global --list only read the local
file; use git config --get <key> or git config --list --show-origin for the effective values.
The custom multi-model-pr-loop skill runs repeated review/fix rounds with two distinct Copilot model IDs per round. It is separate from the GitHub Copilot app's built-in PR review.
In a new app session, say:
Use the multi-model-pr-loop skill on <PR URL>
The shell command keeps its original name:
export PATH="$HOME/.local/bin:/opt/homebrew/bin:$PATH"
pr-review-loop <pr-url> [max-iters]Install the standalone copilot CLI separately and authenticate with
copilot login and gh auth login. Node.js, git, and jq must also be on PATH.
The old gh copilot extension is not a substitute for the standalone CLI.
The loop uses a blobless temporary checkout and stops at PASS or the iteration
cap, which defaults to 6. Checkouts with fixes are kept because the commits are
not pushed. Review-only checkouts can be removed automatically by passing an
explicit output path to pr-review. No GitHub review is posted.
As of 2026-09-07, the default pool contains 19 public model IDs from the
authenticated Copilot CLI catalog, including GPT-6 Astra. auto and
internal-only models are excluded. This is a snapshot, not automatic model
discovery; availability depends on the subscription and organization policies.
See the PR review commands guide for the full model pool, custom model overrides, review-only and fix-only commands, and exit codes.
Run locally:
make lint # shellcheck on every tracked Bash script, plus scan-secrets.sh --tracked
make test # fixture tests (temporary HOME, brew and apt stubbed)
make doctor # check this machine; ./doctor.sh --fix tightens credential file permissions
make hooks # enable the git hooks (install.sh already does)The CI workflow runs make lint and make test on every push and pull request. Its actions are
pinned to commit SHAs and kept current by Dependabot.
./export_codespace_cfgThis inserts/updates a managed block in ~/.ssh/config between markers:
# >>> codespaces (managed) >>>
# <<< codespaces (managed) <<<
Preview:
./clean-codespaces.sh --dry-runExecute deletions:
./clean-codespaces.sh- Brewfile / apt manifest abstraction
- Tmux plugin manager integration
- Advanced Neovim config module