# Authentication

> Documentation index: [llms.txt](https://namera.ai/llms.txt).

Source: https://namera.ai/docs/cli/authentication

Sign in from your terminal or use an API key for automation.

## Sign In with Your Browser [#sign-in-with-your-browser]

```sh
namera login
```

Approve the connection and select active session keys in the browser. If the
browser does not open, use the verification URL and code printed in the terminal.
The command waits for approval and saves credentials in your OS keyring.

<div className="docs-response">

```text
OK Signed in as "personal".
-> Run namera wallet list to see your wallets.
```

</div>

Use a named connection for another workspace:

```sh
namera login --profile work --device-name "Work laptop"
namera auth status --profile work
```

The CLI refreshes saved OAuth credentials when possible. If a connection expires
or is revoked, sign in again with the same profile.

## Use an API Key [#use-an-api-key]

Set `NAMERA_API_KEY` through your shell's secret manager or CI secret store, then:

```sh
namera auth status
```

<div className="docs-response">

```text
OK Connected with an API key
Profile: automation
Organization: Example workspace

Session keys

Example account
-> 🔑 Example session | Active | Expires in 31 days
```

</div>

An API key takes precedence over saved CLI credentials, even when you pass
`--profile`. Unset it to return to browser-based login:

```sh
unset NAMERA_API_KEY
namera auth status --profile personal
```

Do not put the key in command arguments, source files, or logs.

## Review Access [#review-access]

```sh
namera session-key list
namera session-key get
```

Authentication identifies the caller. Grants select usable session keys;
installed permissions and policies restrict what those keys can do. Individual
operation flags also need account and session-key read access to validate selections.

## Sign Out [#sign-out]

```sh
namera logout --profile personal
```

<div className="docs-response">

```text
OK Signed out of "personal" on this device.
-> Run namera login to reconnect. Your imported keys are still saved.
```

</div>

Logout removes the saved CLI connection on this device. It does not delete
imported keys or revoke the authorization on the server. Revoke that authorization
in the dashboard to end its server-side access.

MCP has [separate credentials](https://namera.ai/docs/cli/reference/mcp/login). Ordinary login and
`NAMERA_API_KEY` do not authorize an MCP client.

Example output uses fixture accounts and hashes, captured with the CLI's output
formatters. Plain-text output is shown without terminal colors; your values and
relative expiry dates will differ.
