> ## 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` (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 momentic skills --yes` (or `npx momentic-mobile skills --yes` for mobile).
> 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.

# momentic-mobile login

> Sign in with your browser and save an API key on this machine.

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.

```bash theme={null}
npx momentic-mobile login
```

Run [`momentic-mobile whoami`](/docs/cli-reference/momentic-mobile/commands/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](https://app.momentic.ai/settings/api-keys). `MOMENTIC_API_KEY` and
`--api-key` take precedence over the saved file.

## Options

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

<ParamField path="--server <server>" type="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`.
</ParamField>
