alpacon whoami

Show your current identity, workspace, and permissions.

Usage

alpacon whoami [flags]

Key facts

  • Check which identity is being used before running commands.
  • Check whether a work session is required and which session is active.
  • Use --output json to read the result in a script.

Flags

FlagTypeDescriptionDefault
-h, --helpboolhelp for whoamifalse
--outputstringOutput format: table or jsontable

Examples

Show current identity

bash
alpacon whoami

Output as JSON (useful for scripting or AI agents)

bash
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)
json
{
  "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: