| title | Shell Bootstrap Kit |
|---|
A small, cross-platform Zsh setup that supports:
- One base config (shared)
- Per-platform overrides (selected at deploy time)
- Clean redeploys (your custom bits live in
~/.zshrc.local)
This repo contains no secrets. Keep secrets out of ~/.zshrc.local too.
config/zshrc- base~/.zshrc(cross-platform)config/zshrc.platform.*- platform overrides (deployed to~/.zshrc.platform)config/zprofile- base~/.zprofileconfig/zprofile.platform.*- platform overrides (deployed to~/.zprofile.platform)scripts/deploy.sh- deploys dotfiles with backups and selects platform override
From the repo root:
scripts/install.sh
exec zshzshgit- Network access to GitHub for fetching
oh-my-zshand plugins
macOS notes:
- If you want to use
Brewfile, install Homebrew first.
If you want Homebrew packages installed on macOS (optional):
scripts/install.sh --with-brew
exec zsh- Installs
oh-my-zshinto${ZSH:-~/.oh-my-zsh}if missing. - Installs plugins into
${ZSH_CUSTOM:-$ZSH/custom}/plugins/:zsh-autosuggestionszsh-syntax-highlighting
- Deploys repo-managed dotfiles via
scripts/deploy.sh(with backups). - Optionally runs
brew bundle installif--with-brewis set andbrewexists. - Optionally enables oh-my-zsh auto-update in
~/.zshrc.local(only if that file does not already exist).
scripts/deploy.sh writes:
~/.zshrc~/.zshrc.platform~/.zprofile~/.zprofile.platform
If any of those files already exist, it copies them to *.bak.<timestamp> first.
- Default: normal oh-my-zsh update checks (may prompt).
- To enable auto-update (no prompts), run
scripts/install.sh --enable-omz-auto-updateor addzstyle ':omz:update' mode autoto~/.zshrc.local.
If you want maximum stability, do not enable auto-update and instead update oh-my-zsh manually when you choose.
- Put aliases/functions in
~/.zshrc.local - Put login-only env changes in
~/.zprofile.local
Those files are not managed by this repo.
Templates:
config/zshrc.local.template- copy to~/.zshrc.local
From the repo root:
git pull
scripts/install.sh
exec zshThis is safe to re-run. It redeploys the managed dotfiles and keeps your personal overrides in ~/.zshrc.local.
This repo includes a minimal Brewfile you can extend.
brew bundle installscripts/deploy.sh detects:
darwin- macOSlinux- Linux (non-WSL)wsl- WSL on Linux
It deploys the matching config/zshrc.platform.<platform> and config/zprofile.platform.<platform> if present.
- Restore backups created by
scripts/deploy.sh(look for~/.zshrc.bak.<timestamp>etc). - Optionally remove
oh-my-zshand plugins:${ZSH:-~/.oh-my-zsh}${ZSH_CUSTOM:-$ZSH/custom}/plugins/zsh-autosuggestions${ZSH_CUSTOM:-$ZSH/custom}/plugins/zsh-syntax-highlighting
- No changes after install: run
exec zshor open a new terminal. - CI/headless shells:
config/zshrcexits early when the shell is non-interactive or missing a TTY. - Plugin not found: re-run
scripts/install.sh(it installs missing plugins).