Getting started with Magic Inspector CLI

Get your API key

You can get your API key from your Magic Inspector dashboard as explained in the Getting started with Magic Inspector API section.

Install the CLI

npm i -g @magicinspector/cli

Provide the API key to the CLI

export MI_API_KEY=your-api-key

Trigger a test suite

The suite:trigger command allows you to trigger test suites from the command line.

magic-cli suite:trigger --projectId=<project_id> [--suiteId=<suite_id>] [--url=<start_url>] [--wait]

Trigger all test suites

magic-cli suite:trigger --projectId=<project_id> --all [--wait]

Was this page helpful?