Installation
Installing the CLI from NPM
Prerequisite: Please install Node.js version 20 or higher before proceeding.
Migrating from V0? Please follow the migration guide instead.
Quick start
Get an API key
You will need an API key to authenticate against Momentic’s servers.
To automatically pass the key to all Momentic CLI invocations, you can export the key in your shell configuration file (usually .bashrc
or .zshrc
) 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
Initialize a Momentic project
Run the init
command. This will start an interactive wizard that will guide you through initializing a momentic.config.yaml
file in the current directory. This file lets Momentic identify your project root, under which all your Momentic tests, modules, environments, and other configuration files will live.
If you are using source control (e.g. Git, Subversion, Mercurial), you should commit this file so that all team members can share the same configuration.
Install browsers
This will download the latest version of Chrome, Firefox, and WebKit browsers to your local machine. These are required to run tests locally.
Versioning
Momentic typically releases multiple patches every week.
To stay up to date, we recommend using the momentic@^1
syntax when invoking the CLI, which indicates to your package manager that you wish to use the latest 1.x.x
version.
This allows you to receive new feature updates and bug fixes automatically without the risk of introducing backwards incompatible changes.
Developers using old CLI versions may notice performance degradations.
Was this page helpful?