Every manual, repetitive task is a bug in your workflow waiting for you to fix it. But automating has a cost too, and not everything repetitive deserves a script.
The rule of three (again)
- Once: do it by hand.
- Twice: do it by hand, but take notes.
- Three times: automate it.
There’s a famous XKCD calculation about how much time you can invest in automating before it stops paying off. The trap: sometimes you automate something that took 10 seconds and pour 4 hours into it. That’s not engineering, it’s procrastination in disguise.
Start small
You don’t need a huge tool. An alias, a shell script, a package.json task:
{
"scripts": {
"release": "npm run test && npm run build && npm publish"
}
}
Three commands that always go together → now they’re one, and you never forget a step.
When it grows, make it a CLI
If the script starts to have flags, branches and user input, turn it into a real CLI. That’s how gitzen was born, my tool to automate semantic commits: it started as a script and ended up using AI to generate the message.
The right measure
Automate to remove human error and mental load, not just to save seconds. A script’s greatest value isn’t speed: it’s doing the same thing, the same way, every time.