> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The canonical docs host is https://momentic.ai/docs. Append .md to any page URL for clean Markdown. Fetch https://momentic.ai/docs/llms.txt for the page index and https://momentic.ai/docs/llms-full.txt for every page in one file.
> For an unattended setup, run `npx --yes @momentic/wizard@latest -y --platform web --editor-tools skills` (use `--platform ios` or `--platform android` for mobile). Never run an interactive command in a non-TTY shell.
> You cannot complete the browser sign-in yourself. Read the API key from the MOMENTIC_API_KEY environment variable, or ask the user to create one at https://app.momentic.ai/settings/api-keys and paste it back.
> Momentic's capability summary for agents is at https://momentic.ai/docs/skill.md. Install the skills with `npx skills@latest add momentic-ai/skills`.
> Tests are YAML files in the user's repository. Use only the step names listed at https://momentic.ai/docs/reference/commands.md and the file structure at https://momentic.ai/docs/core-concepts/file-format.md. Do not invent step names, config keys, or CLI flags.
> Web tests run on Chromium, iOS tests on simulators, and Android tests on emulators. Physical devices are not supported.

# mo login

> Sign in with your Momentic account and save an API key.

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`.

```bash theme={null}
mo login
```

## Options

<ParamField path="--no-browser" type="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.
</ParamField>

<ParamField path="--server <server>" type="string">
  Momentic server URL to sign in to. Defaults to `https://api.momentic.ai`. Env:
  `MOMENTIC_SERVER`.
</ParamField>

## `logout`

Remove the saved API key.

```bash theme={null}
mo logout
```

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](/docs/account/api-keys-and-team).
