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)