Intro
After covering infrastructure tools like kubectl and AWS CLI in my previous article, this guide focuses on shell productivity toolsβthe ones that make the terminal itself more productive.
The default macOS terminal works, but it's minimal. No autocomplete from history. No syntax highlighting. No smart directory navigation. These 5 tools transform the terminal from functional to actually productive.
1. Spaceship Prompt
GitHub: spaceship-prompt/spaceship-prompt
Spaceship is a customizable zsh prompt showing git branch, language versions, AWS profiles, Kubernetes contexts, and more.
Install
1brew install spaceship23# Add to ~/.zshrc4source /opt/homebrew/opt/spaceship/spaceship.zsh
What It Shows
1my-project/scripts is π¦ 0.1.0 via π v3.11.0 at βΈοΈ v1.32.9 dev-cluster2β―
- Current directory
- Package version from package.json/pyproject.toml
- Language version (Python, Node, Go, etc.)
- Kubernetes cluster and version
In git repos:
1blog/articles on main via π’ v18.17.02β―
- Git branch
- Node version
Context awareness prevents deployment accidents. Seeing βΈοΈ production-cluster makes it hard to accidentally run destructive commands in the wrong environment.
2. zsh-autosuggestions
GitHub: zsh-users/zsh-autosuggestions
Fish-like autocomplete that suggests commands from history as you type.
Install
1git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions23# Add to ~/.zshrc4source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
How It Works
Type kubectl lo and it suggests:
1kubectl logs -f deployment/api -n production --tail=1002 β greyed out suggestion
Press β to accept. Commands that took 30 seconds to type now take 3 seconds.
3. zsh-syntax-highlighting
GitHub: zsh-users/zsh-syntax-highlighting
Real-time command validation. Valid commands show green, invalid show red.
Install
1git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting23# Add to ~/.zshrc4source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Visual Feedback
Type git stats:
1git stats β RED (invalid)
Type git status:
1git status β GREEN (valid)
Catches typos before execution. No more "command not found" surprises.
4. fzf
GitHub: junegunn/fzf
Fuzzy finder for command history, files, and directories.
Install
1brew install fzf23# Install keybindings4$(brew --prefix)/opt/fzf/install
Sets up:
Ctrl+R- Search command historyCtrl+T- Search filesAlt+C- Search directories and cd
History Search
Press Ctrl+R, type kubectl:
1> kubectl get pods -n production2 kubectl logs -f api-7d8f9c8b-xk2m93 kubectl describe deployment api -n staging4 kubectl port-forward svc/api 8080:805 15/15 βββββββββββββββββββββββββββββ6> kubectl
Navigate with arrows, press Enter to run. No more endless up-arrow pressing.
File Search
Press Ctrl+T, type part of filename:
1> next.config.js2 tsconfig.json3 src/config/api.ts4 4/157 ββββββββββββββββββββββββββ5> config
Select and press Enter to insert into command.
5. zoxide
GitHub: ajeetdsouza/zoxide
Smart cd replacement that learns directory patterns.
Install
1brew install zoxide23# Add to ~/.zshrc4eval "$(zoxide init zsh)"
Usage
Instead of:
1cd ~/Projects/work/frontend/src/components/buttons
Just:
1z buttons
zoxide remembers frequently visited directories and jumps there directly.
Fuzzy matching works too:
1z blog art # β ~/Projects/blog/articles
After a week, muscle memory kicks in:
1z proj # β ~/Projects/2z comp # β ~/Projects/work/frontend/src/components/
Git Aliases
Save keystrokes on git commands.
Setup
1git config --global alias.st status2git config --global alias.co checkout3git config --global alias.br branch4git config --global alias.cm 'commit -m'5git config --global alias.ca 'commit --amend'6git config --global alias.p push7git config --global alias.pl pull8git config --global alias.l 'log --oneline --graph --decorate'9git config --global alias.undo 'reset HEAD~1 --soft'
Usage
Instead of:
1git status2git checkout -b feature/dashboard3git commit -m "feat: add dashboard"4git push origin feature/dashboard
Now:
1git st2git co -b feature/dashboard3git cm "feat: add dashboard"4git p origin feature/dashboard
Useful aliases:
git l - Pretty one-line log:
1* 2a0dfc5 (HEAD -> main) fix: update API endpoint2* df8fa26 feat: add dashboard component3* 1067bbf refactor: clean up old code
git undo - Undo last commit, keep changes:
1git cm "typo in message"2git undo # Keeps changes staged3git cm "fix: correct message"
History Configuration
Default zsh history is limited. Fix it:
1# Add to ~/.zshrc2HISTFILE=~/.zsh_history3HISTSIZE=500004SAVEHIST=500005setopt APPEND_HISTORY6setopt SHARE_HISTORY
HISTSIZE/SAVEHIST=50000 - Store 50k commands instead of 2k
APPEND_HISTORY - Append to history file, don't overwrite
SHARE_HISTORY - Share history across all terminal tabs immediately
Complete .zshrc
1# Spaceship Prompt2source /opt/homebrew/opt/spaceship/spaceship.zsh34# zsh-autosuggestions5source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh67# zsh-syntax-highlighting8source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh910# fzf11[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh1213# zoxide14eval "$(zoxide init zsh)"1516# History17HISTFILE=~/.zsh_history18HISTSIZE=5000019SAVEHIST=5000020setopt APPEND_HISTORY21setopt SHARE_HISTORY2223# Useful aliases24alias pip='python3 -m pip'25alias vihost='sudo vi /etc/hosts'
Reload:
1source ~/.zshrc
15-Minute Setup Checklist
1. Install Homebrew
1/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. Install tools
1brew install spaceship fzf zoxide
3. Install zsh plugins
1git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions2git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting3$(brew --prefix)/opt/fzf/install
4. Set up git aliases
1git config --global alias.st status2git config --global alias.co checkout3git config --global alias.br branch4git config --global alias.cm 'commit -m'5git config --global alias.ca 'commit --amend'6git config --global alias.p push7git config --global alias.pl pull8git config --global alias.l 'log --oneline --graph --decorate'9git config --global alias.undo 'reset HEAD~1 --soft'
5. Configure ~/.zshrc
Add configuration from "Complete .zshrc" section above.
6. Reload
1source ~/.zshrc
7. Verify
- Prompt shows Spaceship
- Typing shows suggestions (zsh-autosuggestions)
- Invalid commands turn red (zsh-syntax-highlighting)
Ctrl+Rsearches history (fzf)zjumps to directories (zoxide)git stworks (git aliases)
Total: 15 minutes.
Time Savings
- zsh-autosuggestions: ~10s per command Γ 200/day = 30+ min/day
- zoxide: ~5s per cd Γ 50/day = 4 min/day
- fzf: ~20s per search Γ 30/day = 10 min/day
- Git aliases: ~3s per command Γ 50/day = 2.5 min/day
Total: 46+ minutes/day, 3.8+ hours/week
Optional Tools
bat - Better cat with syntax highlighting:
1brew install bat2alias cat='bat'
ripgrep - Faster grep:
1brew install ripgrep2alias grep='rg'
tldr - Simplified man pages:
1brew install tldr
Wrapping Up
Shell productivity tools turn the terminal from functional to productive. Install these 5 tools, configure your .zshrc, and save hours per week.
Copy your .zshrc to new machines for instant productivity. No more painful setup days. Just clone dotfiles, run install commands, and you're productive.
Next laptop? Follow this checklist. 15 minutes to fully productive terminal.
