@dephealth/cli
v1.1.0
Published
Check npm package health scores from the command line
Maintainers
Readme
@dephealth/cli
Check npm package health scores from the command line.
Installation
npm install -g @dephealth/cli
# or
npx @dephealth/cli check lodashRequires Node.js 20+.
Setup
Get your API key at dephealth.laranjo.dev.
# Option 1: Interactive setup
dephealth config set
# Option 2: Environment variable (for CI)
export DEPHEALTH_API_KEY=dh_your_key_hereCommands
Check a package
dephealth check lodash
dephealth check @babel/core
dephealth check lodash --json # JSON outputScan package.json
dephealth scan # Scan ./package.json
dephealth scan ./path/to/project
dephealth scan --fail-on HIGH # Exit 1 if HIGH or CRITICAL (CI mode)
dephealth scan --fail-on CRITICAL # Exit 1 only on CRITICAL
dephealth scan --json # JSON outputCheck API usage
dephealth usageConfiguration
dephealth config set # Set API key
dephealth config show # Show configuration
dephealth config clear # Clear configurationCI/CD Integration
# GitHub Actions example
- name: Check dependencies
env:
DEPHEALTH_API_KEY: ${{ secrets.DEPHEALTH_API_KEY }}
run: npx @dephealth/cli scan --fail-on HIGHExit Codes
| Code | Meaning | |------|---------| | 0 | Success | | 1 | Risk threshold exceeded (with --fail-on) | | 2 | CLI error (network, auth, invalid args) |
License
MIT
