Go to your Momentic dashboard and go to settings and follow the steps to generate an API key. Make sure to save it somewhere safe, you can only view it once!

To automatically pass the key to all 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