Prerequisite: Please install Node.js (version 20 or higher) before proceeding.

Step 1: Get an API key:

You will need an API key to authenticate against Momentic’s servers.

You can export your API key in your .bashrc like so:

export MOMENTIC_API_KEY=your-api-key

or pass it in as a flag to all CLI commands:

--api-key your-api-key

Step 2: Initialize Momentic:

This will create a local ./momentic directory where your test, module, and environment YAML files are saved. Make sure to commit these files to version control.

npx momentic@latest init

Step 3: Install browsers:

This will download the latest version of Chrome, Firefox, and WebKit browsers to your local machine.

npx momentic@latest install-browsers