Skip to main content
Prints a one-time code and opens the Momentic sign-in page in your browser. Confirm the code there. If your account belongs to more than one organization, the CLI asks which one to use. It then writes an API key for that organization to ~/.momentic/auth.json. Every command reads that key when --api-key and MOMENTIC_API_KEY are not set.
Run momentic-mobile whoami to see the saved account and organization. Run login again to switch. In CI, or on a machine with no browser, skip login and set MOMENTIC_API_KEY instead. Create the key in the dashboard. MOMENTIC_API_KEY and --api-key take precedence over the saved file.

Options

boolean
Do not open a browser. The CLI still prints the code and the sign-in URL, so you can open the URL on another device. Use this over SSH or in a container.
string
Momentic server URL. Defaults to the server saved in ~/.momentic/auth.json from an earlier login, or https://api.momentic.ai when no file exists. Env: MOMENTIC_SERVER.