As developers, we optimize APIs, databases, and smart contracts.
But we rarely optimize our own workflow.
I realized I was typing the same commands every single day:
npm run devgit add .git commit -m "message"git pushdocker compose up --buildnpx hardhat testforge build
It seems small.
But friction compounds.
So I reduced it.
🧠 What Are Shell Aliases?
Aliases are shortcuts you define in your shell (bash or zsh) that map short commands to longer ones.
Instead of typing:
npm run dev
You type:
nd
Same result. Less friction.
🛠 Step 1: Open Your Shell Config
If you’re using:
Zsh (Mac / Linux default nowadays)
nano ~/.zshrc
Bash
nano ~/.bashrc
✍ Step 2: Add Aliases
Here are some practical ones for Full-Stack + Web3 developers:
# 📦 NPM
alias nd="npm run dev"
alias nb="npm run build"
alias ni="npm install"
# 🌿 Git
alias gs="git status"
alias ga="git add ."
alias gc="git commit -m"
alias gp="git push"
alias gpl="git pull"
alias gcb="git checkout -b"
alias gl="git log --oneline"
# 🐳 Docker
alias dcu="docker compose up"
alias dcub="docker compose up --build"
alias dcd="docker compose down"
alias dps="docker ps"
# 🔐 Hardhat
alias hhc="npx hardhat compile"
alias hht="npx hardhat test"
alias hhn="npx hardhat node"
# ⚒ Forge
alias fb="forge build"
alias ft="forge test"
Save the file.
Then reload:
source ~/.zshrc
(Or source ~/.bashrc)
Done.
🔥 Real Before vs After
Before
git add .
git commit -m "fix: JWT verification bug"
git push
After
ga
gc "fix: JWT verification bug"
gp
Before
docker compose up --build
After
dcub
Before
git checkout -b feature/jwt-auth
After
gcb feature/jwt-auth
⚡ Level 2: Combine Commands
You can even chain commands:
alias gacp="git add . && git commit -m"
Now:
gacp "feat: add middleware"
gp
One step closer to flow state.
🎯 Why This Matters
This isn’t about saving 3 seconds.
It’s about reducing cognitive load.
When friction decreases:
- You stay in flow longer
- You ship faster
- You feel less drained
Most developers try to optimize performance.
Few optimize themselves.
🧩 Bonus: Modern Git Alternative
Instead of:
git checkout -b feature/auth
You can use:
git switch -c feature/auth
And alias it:
alias gsw="git switch -c"
💭 Final Thought
Productivity isn’t about working more hours.
It’s about removing unnecessary resistance from your system.
If you’re a developer:
What’s one shortcut you can’t live without?
Top comments (0)