CLI commands and options summary
This page only summarizes the CLI commands and the options for each command. For details, use the links in this summary to open the help docs page for the command you are using. The help docs pages are the same as the help in the CLI.
snyk [COMMAND] [SUBCOMMAND] [OPTIONS] [PACKAGE] [CONTEXT-SPECIFIC-OPTIONS]
To learn more about each Snyk CLI command, use the
--helpoption, for example,
snyk auth --helpor
snyk container --help. Each command in this list is linked to the corresponding help page in these docs.
Note: Lists of all the options for Snyk CLI commands are on this page. The options are explained in detail in the help for each command.
Authenticate Snyk CLI with a Snyk account.
Test a project for open source vulnerabilities and license issues.
Snapshot and continuously monitor a project for open source vulnerabilities and license issues.
Print a list of the
snyk container monitorand
snyk container test.
Test container images for any known vulnerabilities.
Print a list of the
snyk iac describe,
snyk iac update-exclude-policy, and
snyk iac test.
Generate a mapping artifact that contains the minimum amount of information needed to generate, from Terraform state files, resource mappings from code to Cloud, such as resource IDs and names, and send the mapping artifact to Snyk.
Detect, track, and alert on infrastructure drift and unmanaged resources.
Generate exclude policy rules to be used by
snyk iac describe.
Test for any known security issue.
Initialize custom rules project structure, relation, rule, or spec
Run tests for all custom rules
Bundle and upload custom rule bundles to Snyk Cloud API
Print the name of the snyk codecommand
with its help option: snyk code test
Test for any known security issues using Static Code Analysis.
Find Log4Shell vulnerability.
Manage Snyk CLI configuration.
generates a mapping artifact that contains the minimum amount of information needed to generate, from Terraform state files, resource mappings from code to Cloud, such as resource IDs and names, and sends the mapping artifact to Snyk.Display the
.snykpolicy for a package.
.snykpolicy to ignore stated issues.
Generate an SBOM for a local software project in an ecosystem supported by Snyk.
Apply the recommended updates for supported ecosystems automatically.
Create a Snyk App using the Snyk CLI.
The following is a list of the sub-commands for Snyk CLI commands. Each sub-command is followed by the command(s) to which the sub-command applies. The commands are linked to their help docs. For details concerning each sub-command, see the help docs.
-doption to output the debug logs for any command.
Exit codes for the
testcommands are all the same. See the exit codes in the following help docs:
Additional CLI commands have exit codes as listed in the following help docs:
Lists of the options for Snyk CLI commands follow. Each option is followed by the command(s) to which the option applies. The commands are linked to their help docs. For details concerning each option, see the help docs.
Currently the following options are not supported: