Member-only story
How To Create Beautiful Command Line Interactions With Node.js
Inquierer.js, a must-known Node.js library

Node.js has seen a lot of competition lately. The most well-known competitor for a while has been Deno. Recently it has seen how Bun has gained a lot of traction and popularity. However, don’t be fooled into thinking that Node.js is dead just yet. It has always had many problems and controversy, but as of today, it is still a good choice to make.
Deno still has a lot of catching up to do. Its initial hype has seemed to cool off. The ecosystem of Node.js is huge, and it will take a bit more time for Deno to mature and get used. On the other hand, Bun is not yet production-ready. Although I am a big fan of Bun, Node.js will still be around for a while.
In this article, I want to exemplify the richness of the Node.js ecosystem by seeing how simple it is to create a command line interactive user interface. How can we achieve that? By using Inquirer.js
. You must likely have come across it. Popular libraries like Remix
or NextJs
use it behind the scenes.
Installation
It is a npm
dependency, so it can be installed easily by just doing the following:
npm install --save inquirer