Skip to main content

arc whoami

Show the logged-in account.

Usage​

arc whoami [options]

Options:
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]

Description​

Prints the display name of the logged-in account, or Not logged in.

arc whoami
arc whoami --json # { "user": { "display_name": "…", "id": "…" } }, or { "user": null }

If the session has expired, it's refreshed first. When it can't be refreshed, arc whoami prints Session ended: it expired, or its account was deleted. and says to run arc login, or { "user": null } with --json.

Output​

The account's display name, or with --json, its user, which is null when you're not logged in. With --quiet without --json, it prints nothing, since none of these is an error.

CodeWhen
0Always, logged in or not: check user in the JSON
1Arcadible couldn't be reached to refresh the session