analyze command is used to scan additional repos to detect components and analyze their dependency after you have gone through the initial setup using init.

-i / --include

By default analyze will take the current directory as the root and analyze everything. Supplying a glob pattern to -i will narrow and specify where to scan for components. You can also pass multiple glob patterns:

npx @omlet/cli analyze -i 'glob/one' -i 'glob/two'


Pass a glob pattern to any directory, file, or component that you would like Omlet CLI to ignore from scanning. You can pass multiple ignore glob patterns:

npx @omlet/cli analyze --ignore 'glob/one' --ignore 'glob/two'

Glob patterns are applied against the file path relative to the project's root directory, for instance:

  • * matches zero or more characters (excluding path separators).

  • ? matches any single character (excluding path separators).

  • ** recursively matches directories.

For more details, refer to the Pattern in glob documentation.

-r / --root

Set where Omlet CLI will run the analysis. This option will come in handy if you are running the CLI from a directory that is different from the directory of the project you are trying to scan.

By default, the project root is the current working directory of the terminal. If that directory doesn't contain a package.json, the CLI will attempt to find the closest package.json up in the directory hierarchy starting from the current directory to determine the project root.

The CLI will also display an output in the terminal which indicates the root where it is running the scan:

Analyzing the project at <PATH>ā€¦


Specify the log level for the CLI. Possible values you can pass: error, warn, info, debug, trace

-v / --verbose

By default, it is set as false. Adding this option will give you detailed log output in the CLI.


Scanned results will only be outputted locally to omlet.out.json. This will allow users to test results before uploading results to the Omlet web app.

-h / --help

omlet analyze -h will provide all the available options you can use to run the analyze command with some explanations.

Last updated