CLI Guide

Installation

No installation required. You can run it instantly using npx:

npx depgraph check

Or install it globally if you prefer:

npm install -g depgraph depgraph check

Commands

depgraph check

Scan the current project's dependencies.

npx depgraph check [options]

Options

FlagDefaultDescription
--path <dir>.Directory containing package.json
--format <fmt>tableOutput format: table | json
--threshold <n>noneExit 1 if project score < n
--depth <n>2Transitive dependency depth
--no-colorDisable color output

Output Format

DepGraph v1.0 — Scanning 247 dependencies... Project Health Score: 71 / 100  ████████░░ CRITICAL (2) ───────────────────────────────────────── ✗  event-stream    Score: 12   Last commit: 3yr ago ↳ Abandoned. Migrate to mitt or eventemitter3. HIGH (7)  MEDIUM (18)  LOW (41)  HEALTHY (179) Full report: https://depgraph.vedanshh.dev/r/a3f9x2k1

Exit Codes

CodeMeaning
0All checks passed
1Score below --threshold
2Error (network failure, invalid project)

Authentication

If you have a Pro account and want to link your scans to your dashboard:

npx depgraph auth

This opens a browser for GitHub OAuth login and writes your API key to ~/.depgraph/config.json.

JSON Output (for CI)

npx depgraph check --format json | jq '.overallScore'