whoami#
Check the current authentication status and token scopes.
Overview#
agentpm whoami verifies your credentials against the registry and prints the authenticated user and scopes. If no token is provided/resolved, it prints a helpful message and exits successfully (status 0).
Command synopsis#
agentpm whoami [--token <PAT>]Arguments#
--token <PAT>(env:AGENTPM_TOKEN). Personal Access Token for headless auth (overrides env/file).
flag (--token) > env (AGENTPM_TOKEN) > token file (written by agentpm login).
Examples#
Logged in (valid token):
agentpm whoami
✅ Logged in as you@example.com (["packages:publish"])Not authenticated (no token found):
agentpm whoami
Not authenticated. Set AGENTPM_TOKEN or pass --token, or run `agentpm login --paste`.Invalid/expired token:
agentpm whoami
Error: Credentials rejected while trying to check authentication. Check that your PAT is valid and unrevoked; update AGENTPM_TOKEN, pass --token, or run `agentpm login --paste`.Valid authentication and the no-token informational result exit 0. Rejected
credentials, connection failures, and other registry failures exit 1; invalid
command usage exits 2.
Registry connection failures#
Registry-backed commands such as install, export --skill, new, publish,
login, and namespace signer operations use the same connection-error format.
The message names the operation and server, distinguishes connection failures
from timeouts, and suggests checking the network and registry address before retrying.
Internal API endpoint paths are not the primary error message.
For underlying transport causes, enable debug logging for the CLI, for example
RUST_LOG=agentpm=debug agentpm whoami. Normal errors remain concise; debug output
does not include signed download/upload URLs from the formatter.