CLI reference

Command syntax and options for the Pharos CLI.

Command

pharos <package>@<version> [options]

The package spec must include an exact version.

Options

OptionDescription
-p, --path <PATH>Directory to search. Defaults to the current directory.
-r, --recursiveSearch subdirectories for additional lockfiles.
--jsonPrint a machine-readable JSON report instead of human-readable text.
--fixed <VERSION_OR_RANGE>Verify remediation against a minimum fixed version or complete safe range.
--no-registrySkip npm registry requests and print dependency chains only.

Examples

Check the current directory:

pharos minimist@1.2.5

Check a specific project:

pharos qs@6.13.0 --path ./my-app

Search nested projects:

pharos semver@7.0.0 --path ~/projects --recursive

Emit JSON:

pharos qs@6.13.0 --path ./my-app --json

Verify every proposed dependency range excludes the vulnerable release:

pharos qs@6.13.0 --fixed ">=6.14.0 <7"

An exact value such as --fixed 6.14.0 is normalized to >=6.14.0.

Trace chains without registry remediation:

pharos qs@6.13.0 --no-registry