A lightweight, zero-config CLI tool for Node.js developers to validate environment variables and inspect project health — right from the terminal.
| Command | Description |
|---|---|
health-check env |
Validates your .env file against all keys in .env.example |
health-check size |
Calculates and displays total size of node_modules |
health-check all |
Runs all checks and prints a full Project Health Report |
- ✅ Detects missing and empty environment variables
- 📊 Color-coded visual size bar for
node_modules - 🌈 Beautiful terminal output with colors and spinners
- 🛡️ Graceful error handling — never crashes on missing files
- ⚡ Built with ES Modules, zero custom build step
npm install -g @1ipluto/health-check-cligit clone https://github.com/1iPluto/health-check-cli.git
cd health-check-cli
npm install
npm linkTo unlink later:
npm unlink -g @1ipluto/health-check-cliNavigate to any Node.js project directory and run:
health-check env✔ DATABASE_URL
✔ JWT_SECRET
⚠ REDIS_URL (defined but empty)
✖ STRIPE_SECRET (missing from .env)
✖ 2 issue(s) found (2/4 variables OK)
Custom paths:
health-check env --example .env.staging --local .env.localhealth-check size node_modules Size Report:
Path: /Users/you/my-project/node_modules
Size: 312.47 MB
Status: Average size. Consider auditing with `npm ls`.
[█████████░░░░░░░░░░░░░░░░░░░░░] 312.47 MB / ~1 GB scale
health-check allhealth-check --help
health-check env --help
health-check size --help| Command | Option | Default | Description |
|---|---|---|---|
env |
--example <path> |
.env.example |
Path to the example env file |
env |
--local <path> |
.env |
Path to the local env file to validate |
size |
--dir <path> |
./node_modules |
Path to the directory to measure |
health-check-cli/
├── index.js # Main CLI entry point
├── utils/
│ ├── envCheck.js # Env validation logic
│ └── sizeCheck.js # node_modules size calculation
├── docs/
│ └── index.html # GitHub Pages demo site
├── .github/
│ └── workflows/
│ └── pages.yml # Auto-deploy demo to GitHub Pages
├── package.json
├── LICENSE
└── README.md
Contributions, issues and feature requests are welcome!
- Fork the repo
- Create your feature branch:
git checkout -b feat/my-new-feature - Commit your changes:
git commit -m "feat: add my new feature" - Push to the branch:
git push origin feat/my-new-feature - Open a Pull Request
MIT — free to use, modify, and distribute.
Made with ❤️ for the developer community