Comment on page
CLI Reference
A list of commands supported by lstn
lstn
is a CLI tool that allows you to analyze the behavior of dependencies and inspect the verdicts.lstn [command]
Every child command inherits the following flags:
--config string config file (default is $HOME/.lstn.yaml)
Inspect the verdicts for your direct dependencies.
-e, --exclude (dep,dev,optional,peer) sets of dependencies to exclude (in addition to the default) (default [bundle])
-q, --jq string filter the output using a jq expression
--json output the verdicts (if any) in JSON form
--endpoint string the listen.dev endpoint emitting the verdicts (default "https://npm.listen.dev")
--github_pr_id int PR repository name
--github_pr_owner string PR owner name (organization/user)
--github_pr_repository string PR repository name
--loglevel string set the logging level (default "info")
--reporter string use a reporter
--timeout int set the timeout, in seconds (default 60)
--debug-options output the options, then exit
--npm-registry string set a custom NPM registry (default "https://registry.npmjs.org")
--ignore-deptypes (dep,dev,optional,peer) list of dependencies types to not process (default [bundle])
--ignore-packages strings list of packages to not process
--gh-owner string set the GitHub owner name (org|user)
--gh-pull-id int set the GitHub pull request ID
--gh-repo string set the GitHub repository name
-r, --reporter (gh-pull-check,gh-pull-comment,gh-pull-review) set one or more reporters to use (default [])
--gh-token string set the GitHub token
For example:
lstn scan
lstn scan .
lstn scan sub/dir
lstn scan /we/snitch
lstn scan /we/snitch --ignore-deptypes peer
lstn scan /we/snitch --ignore-deptypes dev,peer
lstn scan /we/snitch --ignore-deptypes dev --ignore-deptypes peer
lstn scan /we/snitch --ignore-packages react,glob --ignore-deptypes peer
lstn scan /we/snitch --ignore-packages react --ignore-packages glob,@vue/devtools
Get the verdicts of a package.
-q, --jq string filter the output using a jq expression
--json output the verdicts (if any) in JSON form
--endpoint string the listen.dev endpoint emitting the verdicts (default "https://npm.listen.dev")
--loglevel string set the logging level (default "info")
--timeout int set the timeout, in seconds (default 60)
--debug-options output the options, then exit
--npm-registry string set a custom NPM registry (default "https://registry.npmjs.org")
--gh-token string set the GitHub token
For example:
# Get the verdicts for all the chalk versions that listen.dev owns
lstn to chalk
lstn to debug 4.3.4
lstn to react 18.0.0 b468736d1f4a5891f38585ba8e8fb29f91c3cb96
# Get the verdicts for all the existing chalk versions
lstn to chalk "*"
# Get the verdicts for nock versions >= 13.2.0 and < 13.3.0
lstn to nock "~13.2.x"
# Get the verdicts for tap versions >= 16.3.0 and < 16.4.0
lstn to tap "^16.3.0"
# Get the verdicts for prettier versions >= 2.7.0 <= 3.0.0
lstn to prettier ">=2.7.0 <=3.0.0"
Inspect the verdicts for your dependencies tree.
We generally recommend using the
lstn scan
command instead of lstn in
, as the latter may cause issues with unsupported local npm versions. In terms of functionality and output, both are similar.-q, --jq string filter the output using a jq expression
--json output the verdicts (if any) in JSON form
--endpoint string the listen.dev endpoint emitting the verdicts (default "https://npm.listen.dev")
--loglevel string set the logging level (default "info")
--timeout int set the timeout, in seconds (default 60)
--debug-options output the options, then exit
--npm-registry string set a custom NPM registry (default "https://registry.npmjs.org")
--gh-token string set the GitHub token
For example:
lstn in
lstn in .
lstn in /we/snitch
lstn in sub/dir
Print out version information.
--changelog output the relase notes URL
-v, -- count increment the verbosity level
--debug-options output the options, then exit
A comprehensive reference of all the lstn commands.
Details about the ~/.lstn.yaml config file.
Which environment variables you can use with lstn.
Details about the lstn exit codes.
Help about any command.
Generate the autocompletion script for the specified shell.
Generate the autocompletion script for bash.
Flags
--no-descriptions disable completion descriptions
Generate the autocompletion script for fish.
Flags
--no-descriptions disable completion descriptions
Generate the autocompletion script for powershell.
Flags
--no-descriptions disable completion descriptions
Generate the autocompletion script for zsh.
Flags
--no-descriptions disable completion descriptions
Last modified 7mo ago