Comment on page

CLI help

Snyk CLI scans and monitors your projects for security vulnerabilities and license issues.
For more information visit the Snyk website
For details see the CLI documentation

How to get started

  1. 1.
    Authenticate by running snyk auth.
  2. 2.
    Test your local project with snyk test.
  3. 3.
    Get alerted for new vulnerabilities with snyk monitor.

Available commands

To learn more about each Snyk CLI command, use the --help option, for example, snyk auth --help.
Note: The help on the docs site is the same as the --help in the CLI.

snyk auth

Authenticate Snyk CLI with a Snyk account.

snyk test

Test a project for open-source vulnerabilities and license issues.
Note: Use snyk test --unmanaged to scan all files for known open-source dependencies (C/C++ only).
Snapshot and continuously monitor a project for open-source vulnerabilities and license issues.
These commands test and continuously monitor container images for vulnerabilities and generate an SBOM for a container image.

snyk iac

These commands find and report security issues in Infrastructure as Code files; detect, track, and alert on infrastructure drift and unmanaged resources; and create a .driftigore file.

snyk code

The snyk code test command finds security issues using Static Code Analysis.

snyk sbom

Produce an SBOM for a local software project in an ecosystem supported by Snyk.
Find Log4Shell vulnerability.
Manage Snyk CLI configuration.
Display the .snyk policy for a package.
Modify the .snyk policy to ignore stated issues.


Use -d option to output the debug logs.

Configure the Snyk CLI

You can use environment variables to configure the Snyk CLI and also set variables to configure the Snyk CLI to connect with the Snyk API. See Configure the Snyk CLI