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.
Description
Section titled “Description”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.
Examples
Section titled “Examples”Show the current login and validate the session:
clonit whoamiTypical workflow alongside login and logout:
clonit login # prints a code + URL, opens your browser, waits for approvalclonit whoami # show the current login (and validate the session)clonit logout # clear the stored session