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

# versuno login

> Authenticate with your Versuno API key.

```
versuno login [--show]
```

Prompts for an API key, validates it against the Versuno API, and stores the credentials at `~/.versuno/config.json` (mode `600` — owner read/write only).

If you are already logged in, the command asks whether you want to switch accounts before proceeding.

## Options

| Flag     | Description                                                                          |
| -------- | ------------------------------------------------------------------------------------ |
| `--show` | Print the API key as you type (useful for catching typos). Defaults to masked input. |

## API key format

Keys start with `uk_live_` and must be at least 16 characters long.

## Example

```bash theme={null}
versuno login
# ○ Enter your Versuno API key: ••••••••••••••••
# ✔ Logged in as you@example.com (Personal workspace)
# ◇ Ready to sync.

versuno login --show
# ○ Enter your Versuno API key: uk_live_...
```

## Stored credentials

Credentials are written to `~/.versuno/config.json`:

```json theme={null}
{
  "api_key": "uk_live_...",
  "user_email": "you@example.com",
  "default_workspace": "personal"
}
```

The file is created with permissions `0600` so the key is not readable by other users.

## Environment variable override

Set `VERSUNO_API_KEY` in your environment to use a different key for a single session without overwriting stored credentials.
