It wasn’t perfect, but I built it — and that’s the vibe🌼
Hellooo Devs👋
It’s me, Khushi — A curious kid just figuring things out 🌸
This is not some expert tutorial.
This is just a lil story about how I learned to build a CLI (Command Line Interface) tool — in my own messy, random way 😭✨
🌼Where I Started
I just started with the basics — JavaScript vibes only.
Learning how to play with strings, arrays, and the console.
This gave me the lil push to actually try something on my own.
💭My First Thought:
What if I build a CLI that counts how many lines are there in my .txt file?
Sounds simple right? Let’s gooo.
For this, I used the Commander library 👉https://www.npmjs.com/package/commander?activeTab=readme
It helped me create and print commands easily.
Here’s what it looked like 👇
✨ Level Up: Gimme Some Colors!
After this lil project, I thought — let’s build something cuter and more interactive.
So I built a CLI that:
- Shows a fancy welcome banner using figlet (https://www.npmjs.com/package/figlet)
- Prompts the user’s name using inquirer (https://www.npmjs.com/package/inquirer)
- Greets them back with colorful text using gradient-string (https://www.npmjs.com/package/gradient-string?activeTab=readme)
Basically, a whole vibe.
🚧 The Problem I Faced (Yup, Struggled)
Okay, this one actually got me 😵💫
I had issues with type: module in package.json.
At first, my CLI wasn’t working because I was mixing Node.js modules and ES modules 💀
So I had to figure it out:
Use .cjs instead of .js (yeah that works!)
OR update package.json to support both module types.
Here’s a lil screenshot of that chaos:

When I saw that I can actually make my terminal look cute with colors and banners, I was sold 😂✨
🔗GitHub Repo link : - https://github.com/khushikumari239/CLI-Node.js.git
⚙️What I Built (the basic starter pack)
- Showed a cool banner
- Asked the user their name
- Greeted them back with colorful text (obviously)
All this — in the terminal.
Running it in Node.js was actually not that scary once I broke it down into small lil steps.
Also had to figure out promises, callbacks, and async code (not gonna lie, it fried my brain a bit but we survived 🫠)
🌸What I Learned (aka life lessons lol)
- Breaking stuff into tiny steps is literally the hack
- Using ready-made libraries is NOT cheating — it’s smart
- You learn the most by just TRYING and tweaking random stuff
If you’ve been thinking about building a CLI — just do it. Start small, keep it fun, don’t overthink.
Trust me, you’ll vibe.
So yeah — figuring this out was a whole mission but I did it 🤌
💌 Let’s Talk!
That’s my messy lil CLI story, straight from me to you 🤍
Not perfect, but definitely worth it.
Are you building something? Tell me in the comments!!
I wanna see your journey too — let’s build, fail, laugh, and vibe together 🫶
Big thanks to GeeksforGeeks (GFG)💚



