Skip to content

whoami

Show the current Clonit Cloud login.

clonit whoami [flags]
Flag Type Default Description
-h, --help bool false Help for whoami

In addition to the flags above, the global flags (--config, --debug, --quiet, --width) are available on this command.

clonit whoami displays the identity currently signed in to Clonit Cloud and validates the stored session. It is the companion to login and logout in the interactive authentication workflow.

Interactive clonit login sessions (the access and refresh tokens obtained through the OAuth 2.0 Device Authorization Grant) are stored in ~/.config/clonit/credentials.json (mode 0600), separate from config.yaml. Running whoami reads that session and confirms it is still valid, refreshing the access token automatically when needed.

Interactive login is intended for humans. CI/CD and other headless automation should authenticate with a Clonit Cloud API key (cloud.api_key) instead of an interactive session.

Show the current login and validate the session:

clonit whoami

Typical workflow alongside login and logout:

clonit login # prints a code + URL, opens your browser, waits for approval
clonit whoami # show the current login (and validate the session)
clonit logout # clear the stored session
  • login – Log in to Clonit Cloud via your browser (OAuth device grant)
  • logout – Log out of Clonit Cloud and clear the stored session