My Favorite Zsh Aliases for Terminal Productivity

Typing the same commands over and over again is frustrating. As a result, I created the following Zsh aliases (shortcuts) to save a few keystrokes when working with the terminal:

# Git
alias gs="git status"
alias gcm="git commit -m"
alias lm="git checkout main && git pull"
alias gp="git pull && git push"
alias ulc='git reset --soft HEAD~1'
alias gst="git stash"
alias pop="git stash pop"
alias gstapp="git stash apply"

# zsh
alias openzs="open ~/.zshrc"
alias sourcezs="source ~/.zshrc"

# Docker
alias dcb="docker compose build"
alias dcu="docker compose up -d"
alias dcd="docker compose down"

# npm
alias nrd="npm run dev"
alias nrb="npm run build"
alias ni="npm install"
alias nu="npm uninstall"
alias nr="npm run"
alias nrp="npm run prisma:studio"

# macOS
alias port="lsof -i"
alias stop="kill -9"

# Work
alias documenso="cursor ~/<my-folder>/Github/documenso"
alias documenso-repo="~/<my-folder>/Github/documenso"

# Bun
alias bx="bunx"
alias b="bun"
alias ba="bun add"
alias bi="bun install"
alias br="bun run"
alias bu="bun update"
alias bre="bun remove"
alias brd="bun run dev"
alias brb="bun run build"
alias bpm="bun pm"

If you want to learn more about oh-my-zsh, this article shows how to improve your Mac terminal with oh-my-zsh.

Pay what you like 🧡

If you like this content and it helped you, please consider supporting this blog.

Make a one-time donation 💫