Menu

CLI Reference

Every DevCompass command, grouped by what it's for.

On this page

Core Analysis

analyzeAnalyze Project Dependencies

Comprehensive dependency analysis with security scanning and health metrics.

$ devcompass analyze
$ devcompass analyze --deep
$ devcompass analyze --ai
$ devcompass analyze --json
$ devcompass analyze --silent
$ devcompass analyze --ci --threshold 8.0
  • Default — Top 3 critical issues, clean and focused
  • Deep — complete analysis, all issues categorized
  • JSON — structured data for automation
  • CI — exit code driven by health score threshold
devcompass analyze finding real CVEs in a sample project

Security

cveCVE Vulnerability Management

Manage CVE detection settings and the local vulnerability cache.

$ devcompass cve key --set --api-key YOUR_KEY
$ devcompass cve key --remove
$ devcompass cve test
$ devcompass cve cache --stats
$ devcompass cve cache --clear
  • NVD cache TTL is 24 hours — first run 2-5s, cached under 100ms
  • Get a free NVD key at nvd.nist.gov/developers/request-an-api-key
devcompass cve key and cache --stats output

Fixing & Automation

fixAutomated Issue Resolution

Fix dependency issues with intelligent risk classification and safety guarantees.

$ devcompass fix
$ devcompass fix --yes
$ devcompass fix --all
$ devcompass fix --dry-run
  • Automatic backup before any change
  • Risk classification: safe / moderate / risky
  • Rollback support via `devcompass backup restore`
devcompass fix previewing, backing up, and applying safe fixes

Visualization

graphDependency Graph Visualization

Generate interactive dependency graphs with multiple layouts and filters.

$ devcompass graph --open
$ devcompass graph --layout force
$ devcompass graph --layout radial
$ devcompass graph --layout conflict
$ devcompass graph --filter vulnerable
$ devcompass graph --output my-deps.html --width 1600 --height 900
devcompass graph generating a force-directed layout filtered to vulnerable packages

History & Tracking

snapshotSnapshot Management

Save and manage project state snapshots for comparison over time.

$ devcompass snapshot save
$ devcompass snapshot list --limit 50
$ devcompass snapshot view 123 --verbose
$ devcompass snapshot delete 123 --yes
devcompass snapshot list and snapshot view output

compareSnapshot Comparison

Compare two snapshots to track changes over time.

$ devcompass compare 51 52
$ devcompass compare 51 52 --verbose
$ devcompass compare 51 52 -o report.md
devcompass compare showing packages removed and health score change between two snapshots

historyHistorical Analysis

View and analyze snapshot history.

$ devcompass history list --limit 50
$ devcompass history list --project myapp
$ devcompass history list --month 08-2026
$ devcompass history summary
$ devcompass history stats
$ devcompass history cleanup --keep 10
  • history only takes a subcommand — for a single snapshot's details, use `devcompass snapshot view <id>` or `devcompass compare <id1> <id2>` instead
devcompass history list and history stats output

timelineTimeline Visualization

Generate an interactive timeline showing dependency evolution.

$ devcompass timeline --open
$ devcompass timeline --days 30
$ devcompass timeline --days 90
devcompass timeline showing an improving health score trend

Backup & Recovery

backupBackup Management

Manage package.json and package-lock.json backups.

$ devcompass backup list
$ devcompass backup info --name backup-2025-05-10T19-50-37-541Z
$ devcompass backup restore --name backup-xxx --force
$ devcompass backup clean --keep 3
devcompass backup list and backup restore output

AI

aiAI-Powered Insights

Interact with AI for dependency analysis and recommendations.

$ devcompass ai ask "Why is axios outdated?"
$ devcompass ai alternatives moment
$ devcompass ai chat
$ devcompass ai recommend
devcompass ai ask giving a real answer from a local Ollama model

llmAI Provider Management

Configure and manage AI/LLM providers.

$ devcompass llm add --provider openai --token sk-xxx --model gpt-4o-mini
$ devcompass llm add --provider local --model llama3.2 --base-url http://localhost:11434
$ devcompass llm list
$ devcompass llm default openai
$ devcompass llm test openai
$ devcompass llm stats
$ devcompass llm remove anthropic
devcompass llm list and llm test output

Configuration

configDevCompass Configuration

Manage DevCompass settings.

$ devcompass config --github-token YOUR_TOKEN
$ devcompass config --show
$ devcompass config --remove-github-token
devcompass config --show output

Maintenance

cleanClean Output Directories

Manage the .devcompass/ output directory in the current project (cache, backups, generated graphs, reports, exports, and temp files).

$ devcompass clean
$ devcompass clean --all
$ devcompass clean --cache
$ devcompass clean --graphs --force
  • With no flags, it only prints a summary — nothing is deleted until you pass a category (or --all) plus --force to skip confirmation
  • --backups clears the internal .devcompass/backups/ dir, not the package.json/package-lock.json backups fix and backup restore create — manage those with `devcompass backup clean`
devcompass clean summary followed by devcompass clean --graphs --force