Skip to main content
Authenticate the CLI once so every later command can reach the Momentic API. mo login opens a browser sign-in flow and writes the resulting API key to ~/.momentic/auth.json, the same file used by momentic and momentic-mobile.

Options

boolean
Do not open a browser automatically. The command prints the sign-in URL so you can open it yourself, for example on a headless machine.
string
Momentic server URL to sign in to. Defaults to https://api.momentic.ai. Env: MOMENTIC_SERVER.

logout

Remove the saved API key.
The command deletes ~/.momentic/auth.json. Because the file is shared, this also signs out momentic and momentic-mobile.

Notes

  • To skip the saved key for a single command, pass --api-key <key> or set MOMENTIC_API_KEY. Both take priority over the file.
  • In CI, set MOMENTIC_API_KEY instead of running mo login. Create keys in the dashboard; see API keys and team.