A batteries-included .zshrc for macOS with fast defaults, friendly aliases, and practical developer workflows.
Use this as your day-to-day Zsh profile or as a reference you can cherry-pick from.
- PATH hygiene and sensible defaults (Google Cloud SDK, Mojo, Protobuf, pipx)
- Modern prompt via Starship, tab completion, and sane Zsh options
- Git power shortcuts (single-letter base
g, commit helper, rich logs) - Python virtual environment helpers (
act,mkvenv) - dbt build helpers (
db,db+,db++) - Elastic dot navigation (
..,..., up to 10 levels) - Handy utilities (
mkcd,extractfor common archive types) - Fuzzy note-taking workflow with previews (
notes,n), plus--todaytemplated notes - GitHub PR comments overview with one command (
ghprc)
- Back up your current Zsh config
cp -a ~/.zshrc ~/.zshrc.bak.$(date +%Y%m%d-%H%M%S)- Use this
.zshrc(symlink or copy)
ln -sf /Users/nick/Documents/GitHub/CLI-Setup/.zshrc ~/.zshrc- Reload your shell
exec zsh
# or
source ~/.zshrcThis config will work without everything below, but you’ll get the best experience with:
- Starship prompt:
brew install starship - lsd (better
ls):brew install lsd - fzf (fuzzy finder):
brew install fzf - bat or glow (note preview):
brew install batorbrew install glow - GitHub CLI:
brew install gh - dbt (optional if you use the dbt helpers)
- Google Cloud SDK (optional)
- Protobuf
protoc(optional)
Note: Some PATH entries in the file are intentionally optional (Mojo, Google Cloud, Protobuf, pipx). Remove or adjust them if they don’t apply to your machine.
- Status:
gsorgst(short + branch view) - Add:
ga,gaa(all) - Commit:
gc,gcmsg "Message", amend withgca - Quick commit widget: press Ctrl+G then Ctrl+M to insert
git commit -m ""with the cursor in the quotes - Branching:
gco(checkout),gcb(new branch), orgsw/gswc - Pull/push:
gpl,gp, force-with-lease:gpf - Diffs/logs:
gd,gds, pretty log:gl - Stash/clean:
gsta,gstp,gclean
- Activate an env:
act(auto-detectsvenv,.venv,env, or~/.venv) - Create + activate:
mkvenv(uses the system Python’svenvand upgrades tooling)
db my_model→dbt build -s my_modeldb+ my_model→dbt build -s +my_modeldb++ my_model→dbt build -s +my_model+
- Open the note picker:
notesorn - Create a date-based note:
notes todo --today - Inside the picker:
- Ctrl-D: delete selected file (with confirmation)
- Ctrl-Y: copy the selected filename back into the query
- Ctrl-U: clear the query
- Previews use
glowif available, otherwisebat, otherwisecat - Default directory is
~/notes(override withNOTES_DIR)
- Run
ghprcinside a repo with an open PR to print a clean, readable list of review comments across files.
- Elastic dots:
..,..., up to..........to jump multiple levels - Quick
cd:mkcd project-name(creates directory then cds into it) - Extract archives:
extract file.(zip|tar.gz|tgz|rar|...) - Fuzzy search:
search(alias tofzf)
- Starship prompt: remove or tweak
eval "$(starship init zsh)"if you use a different prompt - PATH entries: trim anything you don’t use (Mojo, Google Cloud SDK, Protobuf, etc.)
- Company-specific dirs: update or remove
cdplan,cdlake - dbt path/aliases: adjust if your dbt binary lives elsewhere
- Notes directory: set
export NOTES_DIR="/absolute/path/to/notes"
- If the prompt doesn’t change, install Starship and restart the shell
- If
notespreviews aren’t colored, installgloworbat - If
ghprcwarns about a missing PR, ensure your branch has an open PR andghis authenticated (gh auth login) - If
lslooks unchanged, verifylsdis installed and on your PATH
MIT. See LICENSE.