alpacon whoami

Display the current authenticated identity, workspace, system user info, and permissions.

alpacon whoami [flags]

Options

  -h, --help   help for whoami

Examples

Show current identity:

alpacon whoami

Output as JSON (useful for scripting or AI agents):

alpacon whoami --output json

Output fields

FieldDescription
UserAlpacon username
EmailEmail address
WorkspaceWorkspace name and URL
AuthAuthentication method (browser login or API token)
ExpiresToken expiry time (API token auth only)
UIDSystem user ID on the server
ShellDefault shell
HomeHome directory
Roleuser, staff, or superuser
GroupsGroup memberships with role
WS requiredWhether your authentication requires a work session, and the active session if one is set

Work session fields in JSON output

With --output json, the work session state is reported in dedicated fields—useful for scripts and AI agents deciding whether to create a session before running gated commands:

FieldDescription
worksession_required_for_accesstrue when browser login requires an active work session (work_session_required is a legacy alias)
active_worksessionSummary of the active session—id, status, scopes, servers, expires_at—or null if none (active_work_session is a legacy alias)
{
  "worksession_required_for_access": true,
  "active_worksession": {
    "id": "11111111-2222-3333-4444-555555555555",
    "status": "active",
    "scopes": ["command", "websh"],
    "servers": ["web-01"],
    "expires_at": "2027-01-15T12:00:00Z"
  }
}

If a work session is required but none is active, create one with alpacon work-session create.

Last updated: