Game Framework
CLI ReferenceCommands

game whoami

Display information about the currently authenticated user and active workspace.

Usage

game whoami

Alias: game me.

Description

The whoami command displays your current authentication status, user information, and active workspace details. It's useful for verifying which account you're logged in with and which workspace is currently selected.

Output

When authenticated, the command prints two tables — your user details and your current workspace:

 PROPERTY     VALUE
 Name         Clement James Jnr
 Email        you@example.com (verified)
 Subject ID   ausr_01ks86g4rxeshbzg5a10gt9kx9

 WORKSPACE   VALUE
 Name        My Game Studio
 Slug        my-game-studio
 Plan        PRO
 Packages    3

Output Fields

FieldDescription
NameYour display name
EmailYour email (with verification status)
Subject IDYour authsome user id (ausr_…)
Workspace (Name / Slug / Plan / Packages)The currently selected workspace

If you are not authenticated, whoami prints an error and exits with a non-zero status.

Use Cases

Verify Authentication

Check if you're logged in before running authenticated commands:

game whoami
# If logged in: displays user info
# If not logged in: error message

Check Active Workspace

Verify which workspace is currently selected:

game whoami
# Shows: Current Workspace: Production (ws_prod123)

Multi-Account Verification

When working with multiple accounts, confirm which one is active:

# Before publishing
game whoami
# Verify it's the correct account

game publish

Debugging Authentication Issues

Diagnose authentication problems:

game whoami

# Check if:
# - You're authenticated
# - Using the correct account
# - Connected to the right API endpoint

Not Authenticated

If you're not logged in, the command displays an error:

✗ Not authenticated
  Run 'game login' to authenticate with Game Framework Cloud

Environment Variables

The command reads these credential environment variables:

  • GAME_API_KEY - API key for authentication
  • GAME_TOKEN - Bearer token for authentication

Connection settings (the API/OIDC URL) are baked into the binary at build time and are not configurable via the environment.

Use game whoami before publishing or running cloud commands to ensure you're using the correct account and workspace.

Examples

Basic Usage

# Check authentication status
game whoami

Before Publishing

# Verify identity and workspace before publishing
game whoami

# If correct, proceed with publish
game publish

Troubleshooting Authentication

# Check if authenticated
game whoami

# If not authenticated, login
game login

# Verify again
game whoami

Switching Workspaces

# Check current workspace
game whoami

# Switch workspace
game workspace select

# Verify the change
game whoami

Configuration Source

The command reads authentication information from:

  1. Environment Variables: GAME_API_KEY, then GAME_TOKEN
  2. CLI Configuration: ~/.game/config.yml (token from Device Flow login)

Priority order (highest to lowest):

  1. Environment variables
  2. CLI configuration file

No authentication required to run game whoami - it simply reports your current authentication state.

Exit Codes

CodeMeaning
0Authenticated and valid
1Not authenticated or error

Next Steps