Compute · Commands
div whoami
Show the org, plan, credit, API key and API URL this machine uses, and where the key came from.
Synopsis
div whoami [flags]
Prints which org and API key div is using. Use it when a command acts on the wrong org.
Flags
| Flag | Description | Default |
|---|---|---|
--json |
Print the account details as JSON. | |
--token <key> |
Show details for this key instead of the configured one. | see Configuration |
--api-url <url> |
API URL to use. | see Configuration |
Output
Divergent (divergent) Team $243.12 of credit
key div on MacBook-Pro.local dv_live_q6Y9NTBb… made by founder@divergentlabs.xyz
from ~/.config/divergent/config.json
api https://api.divergentlabs.xyz
| Line | Content |
|---|---|
| first | Org name and slug, plan (Pay as you go, Personal, Team or Compute Pro), and remaining credit. |
key |
Key name, key prefix (never the full key), and who created it. |
from |
Where the key came from: --token, DIVERGENT_API_KEY, DIVERGENT_TOKEN or the settings file. |
api |
The API URL in use. |
If div login did not change the org, check the from line: a DIVERGENT_API_KEY set in your shell takes precedence over the saved key.
Exit codes
| Code | Meaning |
|---|---|
0 |
Success. |
1 |
The key was rejected, or the API could not be reached. |
2 |
Invalid flags, or no API key. |
Examples
div whoami
div whoami --json
DIVERGENT_API_KEY= div whoami