Skip to main content

Cosmo CLI

The Cosmo CLI is the official Command Line Interface that lets you interact with Cosmo.

With the Cosmo CLI you can perform every operation enabled on the Cosmo platform (eg: create new scan or download reports).

CLI

Usage

Using the CLI is simple. The base syntax is:

cosmo [command] [arguments]

where command can be one of the following: login, logout, list, create (or new), overview (or show), analysis, delete (or rm), report.

Features in details

The features provided by the CLI are as follows:

  • Login/Logout

  • Scan CRUD operations

  • Get the report overview or the report details

  • Download the report PDF

Login

This command lets you perform the sign-in into the Cosmo platform.

cosmo login
info

You can avoid to perform this command directly: the CLI will ask you to sign-in when running a command for the first time.

Logout

This command performs the logout action. After logout any command will be rejected until the next login.

cosmo logout

Create new scan

With this command you can ask Cosmo to start a new scan on the specified firware image.

cosmo create -f <fw-path> -t <fw-type> -n <report-name> or $ cosmo new -f <fw-path> -t <fw-type> -n <report-name>

Delete existing reports

With this command you can ask Cosmo to delete an existing report.

cosmo delete -i <uuid-report>

or

cosmo rm -i <uuid-report>
info

The uuid-report argument can be retrieved on the online platform.

List personal reports

With this command you can ask Cosmo to list all the reports previously created.

cosmo list

or

cosmo ls

Get the report overview

With this command you can ask Cosmo to show the overview of the report identified by uuid-report.

cosmo overview -i <uuid-report>` or `$ cosmo show -i <uuid-report>
info

The uuid-report argument can be retrieved on the online platform.

View analysis results

With this command you can ask Cosmo to show the whole analysis result.

The analysis type is passed as an argument with the option -a.

cosmo analysis -i <uuid-report> -a PeimDxe

For a paginated analysis result you can use the -p (page) and -l (limit) arguments:

cosmo analysis -i <uuid-report> -a PeimDxe -p 1 -l 10
info

The uuid-report argument can be retrieved on the online platform.

Save PDF reports

With this command you can ask Cosmo to download and save the PDF report of a scan.

cosmo report -i <uuid-report>
info

The uuid-report argument can be retrieved on the online platform.