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

# खाता

> लॉग इन करें, लॉग आउट करें, और सक्रिय CLI खाता संदर्भ का निरीक्षण करें

CLI प्रमाणित कमांड्स के लिए एक API key का उपयोग करता है। आप इसे `youka login` के साथ एक बार सेव कर सकते हैं, या CI और अन्य non-interactive environments में `YOUKA_API_KEY` के जरिए प्रदान कर सकते हैं।

`youka login` key को सेव करने से पहले API के खिलाफ सत्यापित करता है, फिर diagnostics के लिए resolved account email को `~/.youka/config.json` में कैश करता है।

## `login`

एक API key को `~/.youka/config.json` में सेव करें।

```bash theme={null}
youka login [token]
```

<ParamField path="token" type="string">
  Youka dashboard से कॉपी की गई API key। यदि छोड़ा गया हो, तो CLI एक interactive terminal पर
  इसके लिए prompt करता है।
</ParamField>

### उदाहरण

<CodeGroup>
  ```bash token theme={null}
  youka login yk_live_abcd1234
  ```

  ```bash with-api theme={null}
  youka login yk_live_abcd1234 --api https://staging-api.youka.test --json
  ```
</CodeGroup>

<Tip>CI में, config file लिखने के बजाय `YOUKA_API_KEY` को प्राथमिकता दें।</Tip>

## `logout`

सेव की गई API key को `~/.youka/config.json` से हटाएँ।

```bash theme={null}
youka logout
youka logout --json
```

## `whoami`

resolved key source, API URL, और account identity का निरीक्षण करें।

```bash theme={null}
youka whoami
youka whoami --json
```

उदाहरण response:

```json theme={null}
{
  "ok": true,
  "data": {
    "authenticated": true,
    "tokenPresent": true,
    "authStatus": "verified",
    "identitySource": "live",
    "keySource": "config",
    "apiUrl": "https://api.youka.io/hi/api/v1",
    "apiUrlSource": "default",
    "email": "user@example.com",
    "userId": "user_123",
    "apiKeyId": "key_123",
    "org": null,
    "configPath": "/Users/you/.youka/config.json",
    "apiKeyPreview": "yk_l...1234"
  }
}
```

### Resolution order

| Field   | Order                                                                      |
| ------- | -------------------------------------------------------------------------- |
| API key | `YOUKA_API_KEY`, फिर `~/.youka/config.json`                                |
| API URL | `--api`, फिर `YOUKA_API_BASE_URL`, फिर `~/.youka/config.json`, फिर default |

जब कोई saved config key सक्रिय होती है, तो `whoami` API के साथ identity सत्यापित करता है और केवल तब cached account email पर वापस जाता है जब live lookup उपलब्ध न हो। यह `YOUKA_API_KEY` tokens के लिए cached config identity का उपयोग नहीं करता।

## आगे क्या

* [Global options](/hi/cli/global-options) - हर command द्वारा साझा किए गए flags
* [Projects](/hi/cli/projects) - karaoke projects बनाएँ और प्रोसेस करें
