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
| Field | Description |
|---|---|
| User | Alpacon username |
| Email address | |
| Workspace | Workspace name and URL |
| Auth | Authentication method (browser login or API token) |
| Expires | Token expiry time (API token auth only) |
| UID | System user ID on the server |
| Shell | Default shell |
| Home | Home directory |
| Role | user, staff, or superuser |
| Groups | Group memberships with role |
| WS required | Whether 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:
| Field | Description |
|---|---|
worksession_required_for_access | true when browser login requires an active work session (work_session_required is a legacy alias) |
active_worksession | Summary 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.