Terminal
setup

A ready-made macOS Terminal: Brogrammer theme, a Nerd Font, zsh plugins and handy aliases — in five steps or one command.

Buy me a coffee

Free, no ads, no sign-up. If this saved you time, a crypto tip keeps it going — send each coin only on its network.

  • BTCBitcoin
  • LTCLitecoin
  • ETHEthereum
  • USDTERC-20
  • USDTTRC-20
user@mac [~] $ ll Developer
total 0
drwxr-xr-x   5 user  staff   160B Oct 29 12:00 .
drwxr-xr-x  24 user  staff   768B Oct 29 11:17 ..
drwxr-xr-x  12 user  staff   384B Oct 29 11:17 Projects
user@mac [~] $ Developer/Projects/site
user@mac [~/Developer/Projects/site] (main*) $ gti status
zsh: correct 'gti' to 'git' [nyae]? y
On branch main
Changes not staged for commit:
        modified:   index.html
user@mac [~/Developer/Projects/site] (main*) $ myip
203.0.113.42
user@mac [~/Developer/Projects/site] (main*) $ git push origin main
Green — valid command, red — typo (zsh offers the fix), dim — autosuggestion from history (press → to accept). A bare folder name is enough to cd into it; (main*) is the git branch, * — unstaged changes, + — staged.

Setup in 5 steps:

All at once

One command does all 5 steps below: it asks before changing anything, lets you pick the font size and backs up your ~/.zshrc. Read the script first — it's short.
  1. Install Homebrew

    The package manager for macOS. Skip if brew already works. At the end the installer prints two commands to add brew to your shell — run them.
  2. Install zsh plugins and the font

    zsh-autosuggestions suggests commands from your history as you type, zsh-syntax-highlighting colors commands green or red before you hit Enter. The font is SF Mono with Nerd Font icons and ligatures.
  3. Import the Brogrammer theme

    An exported Terminal.app profile: pure black background with blur, SF Mono 17pt, blinking bar cursor, Option as Meta key. Download and double-click it, or run:
    Then make it the default: Terminal → Settings → Profiles → Brogrammer → Default.
    Font too small, or icons show up as empty boxes? In the same place open Text → Font: Change…, pick Liga SFMono Nerd Font (Regular) and a size you like. ⌘+ / ⌘− zoom any window on the fly.
    Brogrammer.terminal
  4. Install the .zshrc

    The user@host [~/path] (branch) prompt, history shared between tabs where ↑ / ↓ search by what you've typed, typo fixes, a completion menu that ignores case, aliases and plugins. Your current file is backed up to ~/.zshrc.bak.
    API keys, tokens and anything machine-specific go to ~/.zshrc.local — it's loaded automatically, so the main file stays safe to share: chmod 600 ~/.zshrc.local. A line typed with a leading space isn't saved to history — handy for commands with a password.
  5. Reload

    Open a new Terminal window or reload the config in the current one.

The .zshrc:

~/.zshrc
Download
Show all 97 lines
# ~/.zshrc — Shattershard terminal setup
# https://shattershard.com/terminal

# ── Environment ──────────────────────────────────────────────────
export EDITOR=nano
export VISUAL="$EDITOR"
export GPG_TTY=$TTY

export CLICOLOR=1
export LSCOLORS=ExGxFxdxCxDxDxBxBxExEx

# ── History ──────────────────────────────────────────────────────
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt SHARE_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE      # leading space = not saved
setopt HIST_REDUCE_BLANKS

# Up/Down search history by the typed prefix
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey '^[[A' up-line-or-beginning-search
bindkey '^[OA' up-line-or-beginning-search
bindkey '^[[B' down-line-or-beginning-search
bindkey '^[OB' down-line-or-beginning-search

# ── Shell options ────────────────────────────────────────────────
setopt AUTO_CD
setopt CORRECT                # suggest a fix for mistyped commands

# ── Completion ───────────────────────────────────────────────────
# Full security check of the dump at most once a day
autoload -Uz compinit
zcompdump_stale=(~/.zcompdump(N.mh+24))
if [[ ! -f ~/.zcompdump ]] || (( $#zcompdump_stale )); then
  compinit
else
  compinit -C
fi
unset zcompdump_stale

zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' list-colors 'di=1;34:ln=1;36:ex=1;31'

# ── Prompt ───────────────────────────────────────────────────────
# user@host [~/path] (branch*+) $   * unstaged, + staged
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' unstagedstr '*'
zstyle ':vcs_info:git:*' stagedstr '+'
zstyle ':vcs_info:git:*' formats       ' %F{cyan}(%b%u%c)%f'
zstyle ':vcs_info:git:*' actionformats ' %F{cyan}(%b|%a%u%c)%f'
precmd_functions+=(vcs_info)

setopt PROMPT_SUBST
PROMPT='%B%F{green}%n@%m %F{yellow}[%~]%b%f${vcs_info_msg_0_} $ '

# ── Aliases ──────────────────────────────────────────────────────
alias c='clear'
alias h='history'
alias k9='kill -9'

alias ..='cd ..'
alias ...='cd ../..'
alias home='cd ~'
alias rt='cd /'
alias desktop='cd ~/Desktop'
alias documents='cd ~/Documents'
alias downloads='cd ~/Downloads'
alias projects='cd ~/Developer/Projects'

alias ll='ls -lah'
alias la='ls -A'
alias l='ls -CF'

alias myip='curl -s https://ident.me; echo'
alias connections='sudo lsof -i -n -P'
alias hosts='sudo nano /etc/hosts'
alias wifi='sudo wdutil info'

# ── Local ────────────────────────────────────────────────────────
# Secrets and machine-specific settings; keep out of git
[[ -r ~/.zshrc.local ]] && source ~/.zshrc.local

# ── Plugins ──────────────────────────────────────────────────────
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=23'
# syntax-highlighting must be sourced last
for plugin in zsh-autosuggestions zsh-syntax-highlighting; do
  file="$HOMEBREW_PREFIX/share/$plugin/$plugin.zsh"
  [[ -r $file ]] && source "$file"
done
unset plugin file

Aliases cheat sheet:

connections
Show open network connections
myip
Show your external IP
hosts
Edit /etc/hosts
wifi
Wi-Fi diagnostics (signal, noise, channel)
c
Clear the terminal
h
Show command history
k9 <pid>
Kill a process with SIGKILL
.. / ...
Go up one / two levels
home / rt
Go to ~ / to /
downloads
cd ~/Downloads
desktop
cd ~/Desktop
documents
cd ~/Documents
projects
cd ~/Developer/Projects
ll
Detailed list with sizes
la
All files except . and ..
l
Columns with type markers
Vaporwave radio