Skip to content

Instantly share code, notes, and snippets.

@hx-natthawat
Last active January 17, 2026 19:25
Show Gist options
  • Select an option

  • Save hx-natthawat/9bf9355469853ee4726ee2ca98831e13 to your computer and use it in GitHub Desktop.

Select an option

Save hx-natthawat/9bf9355469853ee4726ee2ca98831e13 to your computer and use it in GitHub Desktop.
Ultimate Zsh Dev Setup with Pastel Colors + AI - nvm (lazy), Git, Oh My Zsh, Nerd Fonts, bat, fzf, eza, difftastic, GitHub Copilot CLI | 100+ shortcuts

Ultimate Zsh Development Environment Setup

A complete guide to set up a modern, powerful terminal environment for developers on macOS.

🎯 What You'll Get

  • Dual Theme System - Cyberpunk (neon) & Pastel (soft) themes with instant switching
  • nvm - Node Version Manager with lazy-loading (50-60% faster startup)
  • Git - Fully configured with delta, difftastic, and 40+ aliases
  • Oh My Zsh - 8 powerful plugins
  • Nerd Fonts - Beautiful icons in your terminal
  • Modern CLI Tools - bat, fzf, eza, tldr, lazygit, ripgrep, zoxide, difftastic
  • GitHub Copilot CLI - AI-powered command suggestions
  • Advanced DevEx Tools - jq, yq, k9s, direnv, lazydocker, httpie, fd, tmux, glow, hyperfine, entr, thefuck, procs, bottom
  • 120+ shortcuts - Save hours of typing

πŸ“‹ Prerequisites

  • macOS
  • Homebrew installed (https://brew.sh)
  • VS Code (optional, for font configuration)

πŸš€ Quick Install (Copy & Paste)

Step 1: Install Oh My Zsh (if not already installed)

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Step 2: Install Starship Prompt (if not already installed)

brew install starship
echo 'eval "$(starship init zsh)"' >> ~/.zshrc

Step 3: Install nvm (Node Version Manager)

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

Step 4: Install Oh My Zsh Plugins

# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# zsh-completions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions

Step 5: Install Nerd Fonts

brew install --cask font-jetbrains-mono-nerd-font font-meslo-lg-nerd-font font-fira-code-nerd-font

Step 6: Install Modern CLI Tools

brew install bat fzf eza tldr lazygit ripgrep git-delta zoxide difftastic

# Setup fzf key bindings
$(brew --prefix)/opt/fzf/install --key-bindings --completion --no-update-rc

# Install GitHub Copilot CLI (optional - requires GitHub Copilot subscription)
gh extension install github/gh-copilot

Step 7: Configure Git

Create ~/.gitconfig:

cat > ~/.gitconfig << 'EOF'
[user]
	name = YOUR_NAME_HERE
	email = YOUR_EMAIL_HERE

[core]
	editor = code --wait
	autocrlf = input
	excludesfile = ~/.gitignore_global
	pager = delta

[init]
	defaultBranch = main

[interactive]
	diffFilter = delta --color-only

[delta]
	navigate = true
	line-numbers = true
	side-by-side = true
	syntax-theme = OneHalfLight
	line-numbers-minus-style = "#E06C75"
	line-numbers-plus-style = "#98C379"
	minus-style = "syntax #3d2a2a"
	minus-emph-style = "syntax #5a3131"
	plus-style = "syntax #2a3d2a"
	plus-emph-style = "syntax #31543d"

[pull]
	rebase = false

[push]
	default = current
	autoSetupRemote = true

[fetch]
	prune = true

[alias]
	st = status
	s = status -s
	br = branch
	co = checkout
	ci = commit
	cm = commit -m
	ca = commit --amend
	can = commit --amend --no-edit
	lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
	ll = log --pretty=format:'%C(yellow)%h%Cred%d %Creset%s%Cblue [%cn]' --decorate --numstat
	last = log -1 HEAD --stat
	df = diff
	dc = diff --cached
	unstage = reset HEAD --
	undo = reset --soft HEAD~1
	branches = branch -a
	remotes = remote -v
	stl = stash list
	stp = stash pop
	changed = show --pretty="format:" --name-only

[color]
	ui = auto

[diff]
	tool = vscode
	colorMoved = zebra

[difftool "vscode"]
	cmd = code --wait --diff $LOCAL $REMOTE

[merge]
	tool = vscode
	conflictstyle = diff3

[mergetool "vscode"]
	cmd = code --wait $MERGED
EOF

Create ~/.gitignore_global:

cat > ~/.gitignore_global << 'EOF'
# macOS
.DS_Store
.AppleDouble
.LSOverride
._*

# IDE & Editors
.vscode/
.idea/
*.swp
*.swo
*~

# Node.js
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# Environment
.env
.env.local
.env.*.local

# Logs
logs/
*.log

# Testing
coverage/
.nyc_output/

# Build outputs
dist/
build/
*.map

# Temporary files
tmp/
temp/
EOF

Don't forget to update your name and email in ~/.gitconfig!

Step 7b: Create Git Commit Message Template

Create ~/.gitmessage:

cat > ~/.gitmessage << 'EOF'
# <type>: <subject>
# |<----  Preferably using up to 50 chars  ---->|

# Explain why this change is being made

# --- COMMIT END ---
# Type can be: feat, fix, refactor, style, docs, test, chore, perf, ci, build, revert
# Remember to capitalize the subject line and use imperative mood
EOF

# Configure git to use the template
git config --global commit.template ~/.gitmessage

Step 8: Update ~/.zshrc

Replace the plugins=(git) line in your ~/.zshrc with:

plugins=(
  git
  node
  npm
  docker
  kubectl
  zsh-autosuggestions
  zsh-syntax-highlighting
  zsh-completions
)

Then add this configuration at the end of ~/.zshrc:

Note: This setup includes a dual theme system (Cyberpunk & Pastel). Cyberpunk is the default. See Step 9 for theme configurations.

# ===== Theme Switcher =====
# Default theme: cyberpunk (can be changed to "pastel")
export TERMINAL_THEME="${TERMINAL_THEME:-cyberpunk}"

# Cyberpunk Theme Colors (Neon Violet, Electric Green, Cyan)
apply_cyberpunk_theme() {
  # Autosuggestions - Cyan
  ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#00ffff"

  # LS_COLORS - Neon colors
  export LS_COLORS="di=1;35:ln=1;36:so=1;32:pi=1;33:ex=1;92:bd=1;34;46:cd=1;34;43:su=1;30;41:sg=1;30;46:tw=1;30;42:ow=1;30;43:*.ts=1;36:*.js=1;92:*.json=1;33:*.md=1;35:*.yml=1;33:*.yaml=1;33:*.sh=1;92:*.lock=1;90"

  # EZA_COLORS - Cyberpunk theme
  export EZA_COLORS="di=1;35:ln=1;36:ex=1;92:*.ts=1;36:*.js=1;92:*.json=1;33:*.md=1;35:*.yml=1;33:*.yaml=1;33:*.sh=1;92:*.lock=1;90:*.env=1;31"

  # BAT - Dark theme for cyberpunk
  export BAT_THEME="TwoDark"

  # FZF - Cyberpunk colors
  export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border --preview 'bat --style=numbers --color=always --line-range :500 {}' \
--color=fg:#00ff00,bg:#0a0a0a,hl:#ff00ff \
--color=fg+:#00ffff,bg+:#1a1a1a,hl+:#ff00ff \
--color=info:#00ffff,prompt:#ffff00,pointer:#ff00ff \
--color=marker:#00ff00,spinner:#ffff00,header:#00ffff"
}

# Pastel Theme Colors (RosΓ© Pine Inspired)
apply_pastel_theme() {
  # Autosuggestions - Light gray
  ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#a8a8a8"

  # LS_COLORS - Soft colors
  export LS_COLORS="di=34:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"

  # EZA_COLORS - Pastel theme
  export EZA_COLORS="di=34:ln=35:ex=31:*.ts=36:*.js=33:*.json=32:*.md=35:*.yml=33:*.yaml=33:*.sh=32:*.lock=90"

  # BAT - Light theme for pastel
  export BAT_THEME="ansi"

  # FZF - Pastel colors
  export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border --preview 'bat --style=numbers --color=always --line-range :500 {}' \
--color=fg:#d0d0d0,bg:#1a1a1a,hl:#c4a7e7 \
--color=fg+:#ffffff,bg+:#2a2a2a,hl+:#ebbcba \
--color=info:#9ccfd8,prompt:#f6c177,pointer:#eb6f92 \
--color=marker:#31748f,spinner:#f6c177,header:#3e8fb0"
}

# Apply theme based on selection
if [[ "$TERMINAL_THEME" == "pastel" ]]; then
  apply_pastel_theme
else
  apply_cyberpunk_theme
fi

# Theme switcher functions
theme-cyberpunk() {
  export TERMINAL_THEME=cyberpunk
  ln -sf ~/.config/starship-cyberpunk.toml ~/.config/starship.toml
  source ~/.zshrc
  echo "πŸŒƒ Cyberpunk theme activated! Neon violet, electric green, and cyan."
}

theme-pastel() {
  export TERMINAL_THEME=pastel
  ln -sf ~/.config/starship-pastel.toml ~/.config/starship.toml
  source ~/.zshrc
  echo "🎨 Pastel theme activated! Soft Rosé Pine colors."
}

theme() {
  echo "Current theme: $TERMINAL_THEME"
  echo ""
  echo "Available themes:"
  echo "  πŸŒƒ cyberpunk - Neon violet, electric green, cyan (default)"
  echo "  🎨 pastel    - Soft Rosé Pine colors"
  echo ""
  echo "Switch themes:"
  echo "  theme-cyberpunk"
  echo "  theme-pastel"
}

alias theme-show='echo "Current theme: $TERMINAL_THEME"'

# ===== Zsh Plugin Configuration =====
ZSH_AUTOSUGGEST_STRATEGY=(history completion)

# History settings
HISTSIZE=10000
SAVEHIST=10000
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_FIND_NO_DUPS
setopt SHARE_HISTORY

# ===== Git Aliases & Functions =====
# Quick status
alias gs='git status'
alias gss='git status -s'

# Branch operations
alias gb='git branch'
alias gba='git branch -a'
alias gco='git checkout'
alias gcb='git checkout -b'

# Commit shortcuts
alias gc='git commit'
alias gcm='git commit -m'
alias gca='git commit --amend'
alias gcan='git commit --amend --no-edit'

# Push/Pull/Fetch
alias gp='git push'
alias gpf='git push --force-with-lease'
alias gl='git pull'
alias gf='git fetch'
alias gfa='git fetch --all --prune'

# Diff & Log
alias gd='git diff'
alias gdc='git diff --cached'
alias glg='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit'
alias gll='git log --oneline -10'

# Stash operations
alias gst='git stash'
alias gstp='git stash pop'
alias gstl='git stash list'

# Reset & Clean
alias grh='git reset HEAD'
alias grhh='git reset --hard HEAD'
alias gclean='git clean -fd'

# Function: Create branch from develop and push
function gnb() {
  if [ -z "$1" ]; then
    echo "Usage: gnb branch-name"
    return 1
  fi
  git checkout develop && git pull && git checkout -b "$1" && git push -u origin "$1"
}

# Function: Quick add, commit, and push
function gacp() {
  if [ -z "$1" ]; then
    echo "Usage: gacp \"commit message\""
    return 1
  fi
  git add . && git commit -m "$1" && git push
}

# ===== General Aliases =====
# Navigation
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'

# pnpm shortcuts
alias pi='pnpm install'
alias pd='pnpm dev'
alias pb='pnpm build'
alias pt='pnpm test'
alias plint='pnpm check:fix'
alias pcheck='pnpm typecheck'

# Docker shortcuts
alias dps='docker ps'
alias dpa='docker ps -a'
alias di='docker images'
alias dc='docker compose'
alias dcu='docker compose up'
alias dcd='docker compose down'

# Kubernetes shortcuts
alias k='kubectl'
alias kgp='kubectl get pods'
alias kgs='kubectl get services'
alias kgd='kubectl get deployments'
alias kl='kubectl logs'
alias kd='kubectl describe'

# Code editor
alias c='code .'
alias cz='code ~/.zshrc'
alias sz='source ~/.zshrc'

# Clear terminal
alias cls='clear'

# Network
alias myip='curl ifconfig.me'

# ===== Modern CLI Tools =====
# bat (better cat with syntax highlighting)
alias cat='bat --style=auto'
alias catp='bat --style=plain'
alias bathelp='bat --list-themes'

# eza (modern ls with icons and git status)
alias ls='eza --icons --group-directories-first'
alias la='eza --icons --group-directories-first -a'
alias ll='eza --icons --group-directories-first -lh'
alias lla='eza --icons --group-directories-first -lha'
alias lt='eza --icons --group-directories-first --tree --level=2'
alias lta='eza --icons --group-directories-first --tree --level=2 -a'
alias lg='eza --icons --group-directories-first -lh --git'

# Developer-specific views
alias ldev='eza --icons --group-directories-first -lh --git --git-ignore'  # Hide gitignored files
alias lcode='eza --icons --group-directories-first -T -L 2 --git-ignore -I "node_modules|.git|dist|build"'  # Code-focused tree
alias lsize='eza --icons --group-directories-first -lh --sort=size --reverse'  # Sort by file size

# tldr (quick help with examples)
alias help='tldr'

# fzf configuration (colors set by theme)
export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :500 {}'"
export FZF_ALT_C_OPTS="--preview 'eza --icons --tree --level=1 {}'"

# fzf key bindings and completions
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# Custom fzf functions
# fh - Search command history with fzf
fh() {
  eval $(history | fzf --tac --no-sort | sed 's/^[ ]*[0-9]*[ ]*//')
}

# fcd - cd into directory with fzf
fcd() {
  local dir
  dir=$(find ${1:-.} -type d 2> /dev/null | fzf +m) && cd "$dir"
}

# fkill - Kill process with fzf
fkill() {
  local pid
  pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}')
  if [ "x$pid" != "x" ]; then
    echo $pid | xargs kill -${1:-9}
  fi
}

# ===== Git + Modern Tools Integration =====
# Preview git diff with syntax highlighting
alias gdiff='git diff | bat --language=diff'

# difftastic (semantic diff) - understands code structure
alias gdft='GIT_EXTERNAL_DIFF=difft git diff'
alias gdfts='GIT_EXTERNAL_DIFF=difft git diff --staged'
alias gshowdft='GIT_EXTERNAL_DIFF=difft git show'

# Git log with fzf preview
fglog() {
  git log --oneline --color=always | fzf --ansi --preview 'git show --color=always {1}' --preview-window=right:60%
}

# Git checkout branch with fzf
fgco() {
  local branch
  branch=$(git branch -a | grep -v HEAD | fzf --preview 'git log --oneline --graph --date=short --pretty="format:%C(auto)%cd %h%d %s" {1} | head -20' | sed 's/.* //' | sed 's#remotes/[^/]*/##')
  if [[ -n "$branch" ]]; then
    git checkout "$branch"
  fi
}

# ===== Quick Shortcuts =====
# Edit common config files
alias vimrc='code ~/.zshrc'
alias gitconfig='code ~/.gitconfig'

# System
alias ports='lsof -i -P -n | grep LISTEN'
alias psg='ps aux | grep -v grep | grep -i -e VSZ -e'

# ===== Advanced Dev Tools =====
# lazygit (Git TUI)
alias lg='lazygit'

# ripgrep (faster grep)
alias rg='rg --smart-case'
alias rgf='rg --files | rg'  # Search filenames

# zoxide (smarter cd)
eval "$(zoxide init zsh)"
alias cd='z'  # Replace cd with zoxide
alias cdi='zi'  # Interactive zoxide with fzf

# GitHub Copilot CLI (AI-powered command suggestions)
alias ghcs='gh copilot suggest'
alias ghce='gh copilot explain'
alias '??'='gh copilot suggest -t shell'
alias 'git?'='gh copilot suggest -t git'
alias 'gh?'='gh copilot suggest -t gh'

# Function: Search in files with ripgrep + fzf + bat preview
frg() {
  local result
  result=$(rg --color=always --line-number --no-heading --smart-case "${*:-}" |
    fzf --ansi \
        --color "hl:-1:underline,hl+:-1:underline:reverse" \
        --delimiter : \
        --preview 'bat --color=always {1} --highlight-line {2}' \
        --preview-window 'up,60%,border-bottom,+{2}+3/3,~3')
  [ -n "$result" ] && ${EDITOR:-code} $(echo "$result" | cut -d: -f1) +$(echo "$result" | cut -d: -f2)
}

Step 9: Configure Starship Themes (Dual Theme System)

This setup includes two beautiful themes that you can switch between:

  1. Cyberpunk Theme (Default) - Neon violet, electric green, cyan
  2. Pastel Theme - Soft RosΓ© Pine colors

Step 9a: Create Cyberpunk Starship Theme

Create ~/.config/starship-cyberpunk.toml:

# Cyberpunk Starship Theme - Neon Violet & Electric Green

format = """
[β”Œβ”€](bold bright-magenta)\
$username\
$hostname\
$directory\
$git_branch\
$git_status\
$nodejs\
$python\
$rust\
$golang\
$line_break\
[└─λ](bold bright-green) """

[username]
style_user = "bold bright-cyan"
style_root = "bold bright-red"
format = "[$user]($style) "
disabled = false
show_always = true

[hostname]
ssh_only = false
format = "[@$hostname](bold bright-magenta) "
disabled = false

[directory]
style = "bold bright-green"
format = "[$path]($style) "
truncation_length = 3
truncate_to_repo = true

[git_branch]
symbol = " "
style = "bold bright-magenta"
format = "[$symbol$branch]($style) "

[git_status]
style = "bold bright-cyan"
format = '([\[$all_status$ahead_behind\]]($style) )'
modified = "●"
untracked = "?"
staged = "+"
conflicted = "!"
ahead = "⇑"
behind = "⇣"
diverged = "⇕"

[nodejs]
symbol = " "
style = "bold bright-green"
format = "[$symbol($version)]($style) "

[python]
symbol = " "
style = "bold bright-cyan"
format = "[$symbol($version)]($style) "

[rust]
symbol = " "
style = "bold bright-red"
format = "[$symbol($version)]($style) "

[golang]
symbol = " "
style = "bold bright-cyan"
format = "[$symbol($version)]($style) "

[docker_context]
symbol = " "
style = "bold bright-blue"
format = "[$symbol$context]($style) "

[character]
success_symbol = "[Ξ»](bold bright-green)"
error_symbol = "[Ξ»](bold bright-red)"

Step 9b: Create Pastel Starship Theme

Create ~/.config/starship-pastel.toml:

# Pastel Starship Theme - RosΓ© Pine Inspired

format = """
[β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€](fg:#9ccfd8)\
$username\
$hostname\
$directory\
$git_branch\
$git_status\
$nodejs\
$python\
$rust\
$golang\
$line_break\
[└─>](fg:#9ccfd8) """

[username]
style_user = "fg:#c4a7e7"
style_root = "fg:#eb6f92"
format = "[$user]($style) "
disabled = false
show_always = true

[hostname]
ssh_only = false
format = "[@$hostname](fg:#ebbcba) "
disabled = false

[directory]
style = "fg:#9ccfd8 bold"
format = "in [$path]($style) "
truncation_length = 3
truncate_to_repo = true

[git_branch]
symbol = " "
style = "fg:#ebbcba"
format = "on [$symbol$branch]($style) "

[git_status]
style = "fg:#f6c177"
format = '([\[$all_status$ahead_behind\]]($style) )'
modified = "●"
untracked = "?"
staged = "+"
conflicted = "!"
ahead = "⇑"
behind = "⇣"
diverged = "⇕"

[nodejs]
symbol = " "
style = "fg:#31748f"
format = "via [$symbol($version)]($style) "

[python]
symbol = " "
style = "fg:#c4a7e7"
format = "via [$symbol($version)]($style) "

[rust]
symbol = " "
style = "fg:#eb6f92"
format = "via [$symbol($version)]($style) "

[golang]
symbol = " "
style = "fg:#9ccfd8"
format = "via [$symbol($version)]($style) "

[docker_context]
symbol = " "
style = "fg:#31748f"
format = "via [$symbol$context]($style) "

[character]
success_symbol = "[>](fg:#9ccfd8)"
error_symbol = "[>](fg:#eb6f92)"

Step 9c: Set Default Theme (Cyberpunk)

Create symlink to active theme:

# Set cyberpunk as default
ln -sf ~/.config/starship-cyberpunk.toml ~/.config/starship.toml

# Or set pastel as default
# ln -sf ~/.config/starship-pastel.toml ~/.config/starship.toml

Switching Themes

After setup, you can switch themes anytime with:

# Switch to Cyberpunk theme (neon colors)
theme-cyberpunk

# Switch to Pastel theme (soft colors)
theme-pastel

# Show current theme
theme

Step 10: Configure VS Code Terminal Font (Optional)

Add to VS Code settings.json:

{
  "terminal.integrated.fontFamily": "JetBrains Mono Nerd Font",
  "terminal.integrated.fontSize": 14,
  "terminal.integrated.lineHeight": 1.2,
  "editor.fontFamily": "JetBrains Mono, Menlo, Monaco, 'Courier New', monospace",
  "editor.fontSize": 14,
  "editor.fontLigatures": true
}

Step 11: Reload Configuration

source ~/.zshrc

Step 12: Install Node.js (using nvm)

nvm install 24          # Install Node.js 24 LTS
nvm alias default 24    # Set as default
node --version          # Verify

πŸ”₯ Advanced DevEx Tools (Optional but Recommended)

Take your terminal to the next level with these powerful DevEx tools!

Quick Install

brew install jq yq k9s direnv lazydocker httpie fd tmux glow hyperfine entr thefuck procs bottom

Tool Overview

Tool Purpose Key Command
jq JSON processor cat file.json | jq .
yq YAML processor cat file.yaml | yq .
k9s Kubernetes TUI k9s
direnv Auto-load env vars Auto-loads .envrc files
lazydocker Docker TUI lazydocker
httpie Better HTTP client http GET api.example.com
fd Better find fd pattern
tmux Terminal multiplexer tmux new -s work
glow Markdown viewer glow README.md
hyperfine Benchmarking hyperfine 'command'
entr File watcher ls *.ts | entr pnpm test
thefuck Command correction fuck (after typo)
procs Better ps procs
bottom Better top btm

Configuration

Add to your ~/.zshrc (after the section added in Step 8):

# ===== Advanced DevEx Tools =====
# direnv - Auto-load environment variables
eval "$(direnv hook zsh)"

# thefuck - Command correction
eval $(thefuck --alias)

# jq - JSON processor helpers
alias jqless='jq -C . | less -R'
alias jqkeys='jq "keys"'
alias check-json='jq empty'
alias pretty-json='jq .'

# yq - YAML processor helpers
alias yqless='yq -C . | less -R'
alias check-yaml='yq eval "." > /dev/null'
alias pretty-yaml='yq -P'

# httpie - Better HTTP client
alias http='http --pretty=all --style=monokai'
alias api='http'

# fd - Better find
alias f='fd'
alias fh='fd --hidden'
alias fe='fd --extension'

# k9s - Kubernetes TUI
alias k9='k9s'

# lazydocker - Docker TUI
alias lzd='lazydocker'
alias docker-clean='docker system prune -af'

# procs - Better ps
alias ps='procs'
alias pst='procs --tree'

# bottom - Better top
alias top='btm'

# glow - Markdown viewer
alias mdv='glow'
alias mdp='glow -p'

# tmux shortcuts
alias ta='tmux attach -t'
alias ts='tmux new-session -s'
alias tl='tmux list-sessions'

# Hyperfine - Benchmarking
alias bench='hyperfine'
alias measure='hyperfine --warmup 3'

# entr - File watcher
alias watch-test='entr pnpm test'
alias watch-build='entr pnpm build'

Quick Examples

JSON Processing:

curl api.github.com/users/octocat | jq '.name'
cat config.json | jq '.services[] | select(.enabled==true)'

YAML Processing:

yq '.services[].name' docker-compose.yml
yq -o=json config.yaml  # Convert YAML to JSON

Kubernetes (k9s):

k9              # Launch interactive UI
# Inside k9s:
# :pods       # View pods
# :svc        # View services
# /           # Filter
# l           # View logs

API Testing (httpie):

http GET api.example.com/users
http POST api.example.com/users name=John age:=30
http PUT api.example.com/users/1 name=Jane

File Finding (fd):

fd config                # Find files matching "config"
fd -e ts                 # Find all .ts files
fd -H .env               # Find hidden files

Docker Management (lazydocker):

lzd             # Launch TUI
# Navigate with arrows, view logs, restart containers

Terminal Sessions (tmux):

ts work         # Create session named "work"
ta work         # Attach to "work" session
tl              # List all sessions

# Inside tmux:
# Ctrl+b %    # Split vertically
# Ctrl+b "    # Split horizontally
# Ctrl+b d    # Detach

Auto-load Environment (direnv):

cd my-project
echo 'export DATABASE_URL=postgres://localhost/mydb' > .envrc
direnv allow .
# Now DATABASE_URL auto-loads when you cd here!

Benchmarking (hyperfine):

hyperfine 'pnpm install' 'npm install'
measure 'pnpm build'  # With warmup

Auto-testing (entr):

ls *.ts | watch-test    # Auto-run tests on file changes
ls src/**/*.ts | entr pnpm build

Command Correction (thefuck):

$ git psh
# git: 'psh' is not a git command
$ fuck
# git push [enter to confirm]

Process Monitoring:

procs               # Better ps
pst                 # Process tree
btm                 # System monitor with graphs

Markdown Viewing (glow):

mdv README.md       # View markdown file
mdp                 # Browse all .md files

Why These Tools?

  • jq/yq: Essential for working with JSON/YAML configs in cloud-native development
  • k9s: Way faster than typing kubectl commands repeatedly
  • direnv: Perfect for multi-project environments with different configs
  • lazydocker: Visual Docker management saves tons of time
  • httpie: Cleaner syntax than curl for API testing
  • fd: 10x faster than find with simpler syntax
  • tmux: Work on multiple projects without opening 10 terminal windows
  • hyperfine: Optimize your build scripts with real benchmarks
  • entr: TDD workflow - tests run automatically as you code

🎨 Dual Color Theme System

This setup includes two beautiful themes that you can switch between instantly:

πŸŒƒ Cyberpunk Theme (Default)

Inspired by max-SS's Cyberpunk theme with neon colors:

Color Palette:

  • Neon Violet/Magenta (#ff00ff) - Directories, Git branches, borders
  • Electric Green (#00ff00) - JavaScript, executables, prompts
  • Cyan Glow (#00ffff) - TypeScript, links, info text
  • Gold/Yellow (#ffff00) - JSON, config files
  • Bright Red (#ff0000) - Errors, env files

Perfect for:

  • Night coding sessions
  • Cyberpunk aesthetic lovers
  • High-contrast visibility
  • Making your terminal look badass

🎨 Pastel Theme

Soft, eye-friendly RosΓ© Pine inspired colors:

Color Palette:

  • Lavender (#c4a7e7) - Highlights and selections
  • Rose (#ebbcba) - Git branches and important info
  • Foam (#9ccfd8) - Directories and prompts
  • Gold (#f6c177) - Warnings and status
  • Soft Red (#eb6f92) - Errors and pointers
  • Teal (#31748f) - Node.js and markers

Perfect for:

  • Long coding sessions
  • Reduced eye strain
  • Professional look
  • Daytime work

Theme Coverage

Both themes are applied consistently across:

  • eza file listings (color-coded icons)
  • bat syntax highlighting (theme-specific)
  • fzf fuzzy finder (full UI theming)
  • git-delta diffs (OneHalfLight theme)
  • Starship prompt (dedicated theme files)
  • zsh autosuggestions (theme-matched colors)

Switching Themes

# Switch to Cyberpunk (neon colors)
theme-cyberpunk

# Switch to Pastel (soft colors)
theme-pastel

# Show current theme
theme

🎯 Available Commands

Theme Switcher

theme-cyberpunk # Switch to Cyberpunk theme (neon violet, electric green, cyan)
theme-pastel    # Switch to Pastel theme (soft RosΓ© Pine colors)
theme           # Show current theme and available options
theme-show      # Quick show current theme

Git Shortcuts

gs              # git status
gcm "message"   # git commit -m
gp              # git push
gl              # git pull
glg             # beautiful graph log
fgco            # fuzzy checkout branch with preview
fglog           # browse git log interactively
gnb branch-name # create branch from develop and push
gacp "message"  # add all, commit, push

Modern CLI Tools

# fzf (Fuzzy Finder)
Ctrl+R          # Search command history
Ctrl+T          # Find files
Alt+C           # cd into directory
fcd             # Fuzzy cd
fkill           # Kill process interactively

# bat (Better cat)
cat file.js     # View with syntax highlighting
catp file.js    # Plain view
gdiff           # Git diff with highlighting

# eza (Modern ls)
ls              # List with icons
ll              # Detailed list
lt              # Tree view
lg              # List with git status
ldev            # Hide gitignored files
lcode           # Code-focused tree (no node_modules)
lsize           # Sort by file size

# tldr (Quick help)
tldr git        # Quick git help
help docker     # Docker cheatsheet

Advanced Dev Tools

# lazygit (Git TUI)
lg              # Launch lazygit (visual git interface)

# ripgrep (Ultra-fast search)
rg "search"     # Search code (10x faster than grep)
rgf "file"      # Search filenames
frg "search"    # Interactive search with fzf + preview

# zoxide (Smart cd)
cd cxp          # Jump to any visited directory (fuzzy match)
z platform      # Same as cd with zoxide
cdi             # Interactive directory picker

# git-delta (Beautiful diffs)
git diff        # Side-by-side syntax-highlighted diffs
git log -p      # Pretty commit history with diffs
git show HEAD   # Beautiful file changes

# difftastic (Semantic diffs)
gdft            # Semantic diff (understands code structure)
gdfts           # Semantic diff for staged changes
gshowdft        # Semantic show

# GitHub Copilot CLI (AI Assistant)
??              # AI suggests shell commands
git?            # AI suggests git commands
gh?             # AI suggests GitHub CLI commands
ghcs "question" # Get command suggestions
ghce "command"  # Explain what a command does

Navigation

..              # cd ..
...             # cd ../..
c               # Open VS Code in current dir
cz              # Edit .zshrc
sz              # Reload .zshrc

pnpm Shortcuts

pi              # pnpm install
pd              # pnpm dev
pb              # pnpm build
pt              # pnpm test
plint           # pnpm check:fix
pcheck          # pnpm typecheck

Docker & Kubernetes

dps             # docker ps
dc              # docker compose
dcu             # docker compose up
dcd             # docker compose down
k               # kubectl
kgp             # kubectl get pods
kgs             # kubectl get services

System

ports           # Show listening ports
psg node        # Find processes matching "node"
myip            # Show public IP
cls             # Clear screen

🎨 Features

zsh-autosuggestions

  • Suggests commands as you type based on history
  • Press β†’ (right arrow) to accept

zsh-syntax-highlighting

  • Valid commands = green
  • Invalid commands = red
  • Real-time feedback

fzf Integration

  • Instant fuzzy search across files and history
  • Live preview with syntax highlighting
  • Works seamlessly with Git

bat Integration

  • Syntax highlighting for 200+ languages
  • Git integration showing added/removed lines
  • Line numbers and grid

eza Integration

  • Beautiful icons for file types
  • Git status indicators
  • Tree view support

πŸ’‘ Pro Tips

  1. Ctrl+R is your best friend - Never forget a command again
  2. Use fgco - Visually browse and checkout git branches
  3. Use fglog - Explore commit history with full diff preview
  4. Use lg - See which files have uncommitted changes
  5. Type and press β†’ - Accept command suggestions instantly
  6. Use tldr before man - Get practical examples quickly
  7. Use lt - Quick tree view of directories

πŸ”§ Customization

Change Project Directory Alias

Edit in ~/.zshrc:

alias cdp='cd /path/to/your/project'

Add Custom Aliases

Add to the end of ~/.zshrc:

alias myalias='my command here'

Change Font

In VS Code settings or terminal preferences, choose:

  • JetBrains Mono Nerd Font (recommended)
  • MesloLGS Nerd Font
  • FiraCode Nerd Font

πŸ› Troubleshooting

Icons not showing?

Make sure you're using a Nerd Font in your terminal.

fzf not working?

Run: $(brew --prefix)/opt/fzf/install

Plugins not loading?

Check that plugin directories exist in ~/.oh-my-zsh/custom/plugins/

Commands not found after install?

Run: source ~/.zshrc


πŸ“š Resources


πŸ“ License

MIT - Feel free to use and modify!


Made with ❀️ for developers who love productivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment