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).
Token resolution order
flag (--token) > env (AGENTPM_TOKEN) > token file (written by agentpm login).
Examples#
Logged in (valid token):
agentpm whoami
✅ Logged in as you@example.com (["tools: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
Token validation failed (401 Unauthorized). Is the PAT correct and unrevoked?