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)