Node.js is a JavaScript runtime that lets you run JavaScript outside the browser. It is commonly used for backend apps, scripts, and command-line tools.
- Install Node.js (LTS recommended): https://nodejs.org
- Verify installation:
node -v
npm -vThis nodejs folder contains learning material and hands-on CLI examples:
00_Introduction/- basic Node.js starter content01_Modules/- notes and examples for core, custom, and third-party modulescli-2026/- focused CLI practice series
cli-2026 is organized as a step-by-step CLI learning track.
Purpose:
- Introduces executable Node scripts using a shebang (
#!/usr/bin/env node) - Prints a welcome message from
index.js
Current package behavior:
- Package name:
bui - Bin command:
bui
Run locally:
cd cli-2026/00_Intro
npm install
npm startPurpose:
- Demonstrates command-line argument parsing with
process.argv - Shows full argv and sliced arguments (
process.argv.slice(2))
Current package behavior:
- Bin command is also
buiin this lesson
Run locally:
cd cli-2026/01_args
npm install
node index.js hello worldPurpose:
- Builds terminal text styling utilities using ANSI escape codes
- Includes reusable helpers for:
- text colors (
utils/colors.utils.js) - text styles (
utils/styles.utils.js) - background colors (
utils/backgrounds.utils.js) - combined formatter (
utils/format.utils.js)
- text colors (
Run locally:
cd cli-2026/projects/00_clrs
npm install
node index.jsPurpose:
-
A mini CLI framework that supports basic utility commands
-
Implemented commands:
-
version/--v- reads version from localpackage.json -
clear/cls- clears terminal screen -
ls- lists files and folders in the current working directory -
lsd- lists only directories in blue text
Run locally:
cd cli-2026/projects/02_mini_cli_frmwk
npm install
npm link
mini-cli version
mini-cli ls
mini-cli lsdMIT License
Copyright (c) Saqib Bedar