# keryn whoami

Describes Keryn 0.5.2 and keryn-rules 0.8.0.

> organization, team, account, plan, features and entitlement expiry

Source: https://keryn.dev/docs/reference/cli/whoami/

> **Caution: Next release: keryn whoami**
> On main; not in Keryn 0.5.2, the latest release.

Organization, team, account, plan, features and entitlement expiry.

```text
keryn whoami [--json]
```

## Options

```text
keryn login [--server <url>] [--name <device>]   sign this machine in to your organization (device code)
keryn logout                                    forget the sign-in on this machine
keryn whoami [--json]                           organization, team, account, plan, features and expiry
keryn licence status [--json]                   the offline licence on this machine (contract customers)
keryn licence request [--org <id>] [--out <f>]  write a licence request (machine fingerprint and device key, no secret)
keryn licence install <file>                    verify and install an offline licence
keryn licence usage [--from <YYYY-MM>] [--to <YYYY-MM>] [--out <f>] [--json]
                                                usage counted on this machine under its licence (nothing is sent)
keryn update [--json]                           check for a newer release (reports only; nothing is downloaded)
```

## Examples

```sh
# Works offline from the cached entitlement; refreshes it when signed in and online.
keryn whoami --json
```

## Exit codes

| Code | Meaning |
|---|---|
| 0 | an entitlement or licence is valid (possibly in its offline grace period) |
| 1 | none, or it cannot be used |
| 2 | usage error |

## Environment

| Variable | Meaning | Default |
|---|---|---|
| `KERYN_CONFIG_DIR` | Where keryn login keeps the device key, the device token, the cached entitlement and an offline licence (each file mode 0600). | $XDG_CONFIG_HOME/keryn, else ~/.config/keryn (Windows: %APPDATA%\keryn) |
| `KERYN_SERVER` | The Keryn service keryn login signs in to. | https://api.keryn.app |
| `KERYN_TOKEN` | Non-interactive sign-in for CI: a service-account token an organization administrator issued in Account > Developers. Used instead of a stored keryn login (an offline licence still comes first); never written to disk or printed. Store it as a CI secret. | unset |
| `KERYN_LICENCE_FILE` | An offline licence file to use instead of the installed one. | licence.kl in the config directory |
| `KERYN_MACHINE_ID` | Development builds only: a stand-in machine identity for tests. Release builds ignore it and read the operating system (Linux /etc/machine-id, macOS IOPlatformUUID, Windows MachineGuid); only a hash is used. | unset |
| `KERYN_ENTITLEMENT_DEV_KEYS` | Development builds only: extra entitlement verifying keys (JSON). Release builds ignore it. | unset |
