Skip to content

apkg whoami

The whoami command prints the username associated with the stored credentials for a registry. Use it to verify you are logged in before running commands that require authentication, such as publish.

Terminal window
apkg whoami [--registry <URL>]
OptionDescription
--registry <URL>Check credentials for a specific registry instead of the default

The --registry flag is a global option available to all commands. When provided, it checks the credentials scoped to that registry URL.

If credentials exist for the resolved registry, the command prints:

Logged in as <username>

If no credentials are found, the command prints an error indicating you are not logged in.

Check who you are on the default registry:

Terminal window
apkg whoami

Check a private registry:

Terminal window
apkg whoami --registry https://registry.internal.example.com
CommandDescription
loginAuthenticate with the registry
logoutRemove stored credentials
configManage CLI configuration
tokenManage long-lived API tokens