Skip to main content
This page covers gavai whoami, which prints the identity bound to the stored credentials: the signed-in user’s email and the slug of the active workspace. You can use it before running any command that writes — patch, publish, invite — so you don’t push a change to the wrong workspace.

Synopsis

gavai whoami

Arguments

None.

Flags

Run gavai whoami --help for the authoritative flag list.

Behavior

The command calls GET /v1/me with the access token from ~/.config/gavai/credentials.json and prints a single-line summary of the response. The full response shape lives at Me resource.

Example output

If no credentials are stored, the command exits with code 3:

Examples

Confirm the current identity:
gavai whoami
Branch on the active workspace in a script:
if gavai whoami | grep -q "workspace: acme"; then
  gavai publish page_01HXR8K2M4
fi

Exit codes

See CLI overview — exit codes for the full table.

gavai tenant

List every workspace the signed-in user can access.