lium whoami
Show which API key the CLI is using, the account it belongs to, the balance, the SSH key and the CLI version. It is the first thing to run when a command fails in a way you did not expect.
lium whoami [OPTIONS]
Options
| Flag | Effect |
|---|---|
--json | Print machine-readable JSON |
What it shows
| Row | Meaning |
|---|---|
| API key | The key's fingerprint (never the key itself) and where it came from: LIUM_API_KEY, the config file, or a workspace key when a workspace is selected |
| Account | The account id the key belongs to |
| The account's e-mail, when it has one | |
| Balance | The account balance in USD |
| API | The API base URL and whether it answered, with the round-trip time |
| SSH key | The private key the CLI would use (ssh.key_path, else ~/.ssh/id_ed25519, id_rsa or id_ecdsa) and whether its public half is registered on the account |
| CLI | The installed lium version |
Examples
lium whoami # Human-readable summary
lium whoami --json | jq .account_id # One field for a script
--json prints one object with the keys account_id, api_base_url, api_error, api_key_fingerprint, api_key_source, api_latency_ms, api_reachable, balance_usd, cli_version, email, rsync_client, ssh_client, ssh_key_path, ssh_key_registered, ssh_public_key_found and warnings. A field the CLI could not read is null.
Exit codes
| Code | When |
|---|---|
0 | The key works and the API answered |
2 | No API key is configured (no_api_key) |
3 | The API could not be reached (api_unreachable), or answered with an error |
| other | The API refused the key: the same code and exit status any other command gives (for example invalid_api_key) |
Without --json the summary is printed first, then the error. With --json stdout stays empty on a failure and the error envelope on stderr carries the same fields as data.
See also
lium init— set the API key and SSH keylium config— read or change the stored configurationlium balance— the balance alone