What it does
Everything your project needs to stay healthy
Env Validator
Reads .env.example, extracts all keys, and compares them against your local .env. Reports missing and empty variables in red.
node_modules Size
Recursively calculates the total size of your node_modules folder. Displays a visual bar and contextual advice based on size.
Global CLI Command
Install once with npm link or npm install -g. Run `health-check` anywhere in your terminal — no config files needed.
Live Demo
See it in action
Getting Started
Step-by-step setup guide
Install Node.js 18+
Make sure you have Node.js version 18 or higher installed. Check your version:
node --version
Download from nodejs.org if needed.
Clone the repository
git clone https://github.com/1iPluto/health-check-cli.git cd health-check-cli
Install dependencies
npm install
This installs commander, chalk, and ora.
Link globally with npm link
npm link
This creates a symlink so health-check is available as a global command in any terminal window.
Navigate to any Node.js project and run it
cd ~/your-other-project health-check env health-check size health-check all
(Optional) Unlink when done testing
npm unlink -g @1ipluto/health-check-cli
GitHub Workflow
Publish with a clean commit history
Follow this commit sequence to tell a professional story on GitHub. Uses Conventional Commits format.
-
a1b2c3d
chore
chore: initialize project with package.json and ES module config Sets up name, version, bin field, type:module, and engines.
-
b2c3d4e
feat
feat: add main CLI entry point with commander setup index.js wires up the program with env, size, and all commands.
-
c3d4e5f
feat
feat(env): implement .env validator against .env.example utils/envCheck.js — parses both files, reports missing/empty keys.
-
d4e5f6a
feat
feat(size): add node_modules size checker with visual bar utils/sizeCheck.js — recursive size, human-readable output, MB bar.
-
e5f6a7b
fix
fix: handle missing .env and node_modules gracefully All commands now show helpful tips instead of crashing.
-
f6a7b8c
docs
docs: add README with install, usage, and project structure Covers npm link workflow, all commands, and options table.
Full GitHub publish commands
# 1. Init git repo in the project folder git init git add . git commit -m "chore: initialize project with package.json and ES module config" # 2. Create repo on GitHub (via gh CLI or github.com), then: git remote add origin https://github.com/1iPluto/health-check-cli.git git branch -M main # 3. Stage and commit each logical piece separately git add index.js git commit -m "feat: add main CLI entry point with commander setup" git add utils/envCheck.js git commit -m "feat(env): implement .env validator against .env.example" git add utils/sizeCheck.js git commit -m "feat(size): add node_modules size checker with visual bar" git add README.md git commit -m "docs: add README with install, usage, and project structure" # 4. Push everything git push -u origin main