Skip to main content

CLI Reference

cve-lite [path] [options]
cve-lite advisories sync [options]

path defaults to the current directory if omitted.


Scan options

FlagDefaultDescriptionExample
--prod-onlyoffExclude dev dependencies from the scancve-lite . --prod-only
--min-severitymediumOnly show findings at or above this severity (critical, high, medium, low)cve-lite . --min-severity high
--alloffShow all findings including low and unknown; appends a full table in compact modecve-lite . --all
--search-depth4How many directory levels deep to search for a lockfilecve-lite . --search-depth 2
--batch-size100Number of packages sent per OSV API requestcve-lite . --batch-size 50

Output options

FlagDefaultDescriptionExample
--verboseoffFull output: severity table, fix plan, findings table, coverage notescve-lite . --verbose
--jsonoffMachine-readable JSON output (suppresses all other output)cve-lite . --json
--report[=<path>]off / ./cve-reportGenerate an HTML report; optional path sets output directory (default ./cve-report); opens in browser by default; cannot be used with --jsoncve-lite . --report
cve-lite . --report ./reports
--no-openoffGenerate the HTML report without opening it in the browsercve-lite . --report --no-open

Offline options

FlagDefaultDescriptionExample
--offlineoffUse the local advisory DB only — no OSV API callscve-lite . --offline
--offline-db=<path>autoPath to a specific advisory DB filecve-lite . --offline-db ./advisories.db
--osv-url=<url>OSV APIUse a custom OSV-compatible endpoint instead of the public APIcve-lite . --osv-url https://osv.example.com

Sync the local advisory DB with:

cve-lite advisories sync
cve-lite advisories sync --output ./advisories.db # write to a specific path

See Offline Advisory DB for the full offline workflow.


CI / Automation options

FlagDefaultDescriptionExample
--fail-oncriticalExit with code 1 if any finding meets or exceeds this severity (critical, high, medium, low); exit 0 otherwisecve-lite . --fail-on high
--fixoffAuto-apply direct-dependency fix commands (direct deps only, v1); cannot be used with --jsoncve-lite . --fix
--usageoffScan source files to detect which packages are actually importedcve-lite . --usage
--only-usedoffShow only findings for packages that are imported in source code (implies --usage)cve-lite . --only-used

Note: --usage-hints is a deprecated alias for --usage.

See Workflow Integration for CI/CD patterns and GitHub Actions templates.


Cache options

FlagDefaultDescriptionExample
--cache-dir=<path>OS temp dirUse a specific directory for the advisory response cachecve-lite . --cache-dir ./.cache