depGraph

CLI Guide

Scan your project's dependency tree from the terminal in seconds. Zero configuration required.

Installation

Run instantly with npx — no install step needed:

bash
npx depgraph-scanner check

Or install globally for frequent use:

bash
npm install -g depgraph-scanner
depgraph check

Commands

$ depgraph check

Scan the current project's dependencies and return a scored report.

bash
npx depgraph-scanner 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

bash
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

Link CLI scans to your dashboard by authenticating with your API key:

bash
npx depgraph-scanner auth

You will be prompted to paste your API key. Get it from your Settings → API Keys page at depgraph.vedanshh.dev/settings/api. Your key is saved to ~/.depgraph/config.json.

Or provide it directly without a prompt:

bash
npx depgraph-scanner auth --token YOUR_API_KEY

Once authenticated, all scans are automatically linked to your account and visible in your dashboard.

JSON Output (for CI)

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