whoami

Show who this machine is on the SPLENT marketplace, and which credential won.


Usage

splent whoami [--registry URL]

Options

Option Description
--registry URL Marketplace to ask. Defaults to SPLENT_MARKETPLACE_URL, then https://marketplace.splent.io.

Description

Prints the registry, the identity behind the token, its scopes, its expiry, and where the token came from.

That last line is the one that explains why CI and a laptop behave differently, so it is never omitted. SPLENT_MARKETPLACE_TOKEN always takes precedence over the credential file, and whoami names the winner.

The registry line also names who chose it, one of --registry, SPLENT_MARKETPLACE_URL or default.

splent whoami

  Registry   https://marketplace.splent.io (default)
  Identity   dev@example.com
  Scopes     spl:publish
  Token      splent-cli@laptop
  Expires    2026-10-26T10:00:00+00:00 (in 90 days)
  Source     file /workspace/.splent/credentials.json

A successful call refreshes the cached identity in the store, so the offline view below stays accurate. Failing to refresh never fails a successful whoami.


When the marketplace cannot be reached

Unreachable and rate limited are the same situation for this command. The stored credential is untouched, we simply could not ask. So it says exactly that and shows the cached identity marked as cached, instead of implying you are logged out.

  Marketplace unreachable at https://marketplace.splent.io
  Connection refused
  You are still logged in locally, this is not a logout.

  Registry   https://marketplace.splent.io (default)
  Identity   dev@example.com (cached)
  ...

A token coming from SPLENT_MARKETPLACE_TOKEN has no cached identity attached on purpose. Whatever the file holds describes a different token, and showing it would answer “who am I” with somebody else’s answer.


Exit status

Non zero when there is no usable credential, when the marketplace rejects the token, and when the answer could not be obtained. Zero only when the marketplace confirmed the identity.

When the server refuses a stored token as expired or revoked, the entry is dropped from the store so the next command says “not logged in” instead of repeating the same failure. A 429 never does that, because a rate limit says nothing at all about the token. Neither does a token that came from the environment, which the CLI does not manage.


See also

  • login. Authenticate and store the token
  • logout. Revoke and remove it

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es