@1ipluto/health-check-cli
v1.0.0
Published
A lightweight CLI tool to validate environment variables and check project health.
Maintainers
Readme
🩺 health-check-cli
A lightweight, zero-config CLI tool for Node.js developers to validate environment variables and inspect project health — right from the terminal.
🌐 Live Demo
✨ Features
| 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
📦 Installation
From npm (recommended)
npm install -g health-check-cliLocal development with npm link
git clone https://github.com/1iPluto/health-check-cli.git
cd health-check-cli
npm install
npm linkTo unlink later:
npm unlink -g health-check-cli🚀 Usage
Navigate to any Node.js project directory and run:
Validate Environment Variables
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.localCheck node_modules Size
health-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 scaleRun All Checks at Once
health-check allGet Help
health-check --help
health-check env --help
health-check size --help⚙️ Options
| 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 |
🗂 Project Structure
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🛠 Tech Stack
🤝 Contributing
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
📄 License
MIT — free to use, modify, and distribute.
