Basics

whoami

orc whoami displays the account associated with the CLI credentials and the selected Workspace. You can check the authentication method, user information, the source of the Workspace selection, and whether it matches the credentials.

Valid credentials are required. To sign in with a different account, use orc auth login.

Usage

terminal
orc whoami

Check the account and Workspace used by the CLI.

Compatibility aliases: orc account whoami, orc auth whoami, orc auth me.

Examples

Retrieve account and Workspace information as JSON.

The output data includes authenticated, auth, user, and workspace. Use auth to check the authentication method and credential source, and user to check account information.

terminal
orc whoami --json

Retrieve account and Workspace information as JSON.

Compare the specified Workspace with the Workspace in the credentials.

workspace.configured_id is the value specified in the CLI, and workspace.authenticated_id is the Workspace returned by the server. When both exist, workspace.matches is true if they match and false if they differ. It is null when either is missing.

terminal
orc whoami --workspace 123e4567-e89b-42d3-a456-426614174000 --json

Compare the specified Workspace with the Workspace in the credentials.

Workspace selection

The Workspace is selected in this order: --workspace, ORCHESTOR_WORKSPACE_ID, .orchestor/workspace.json in the current directory, then the global configuration. If none is configured, the Workspace returned by the server is used. Check workspace.source to see where the selection came from.

When workspace.matches is false, the specified Workspace differs from the Workspace in the credentials. This command displays that state. Check the account and selection settings before operating in the intended Workspace.

Authentication errors

If authentication validation returns an invalid result, the command displays Authentication is invalid. and exits with an authentication error. Sign in with orc auth login, or check the configured API key, then run the command again.

Global Options

The following global options can be used with orc whoami:

For details and examples, see global options.