Game Framework
CLI ReferenceCommands

game logout

Clear stored authentication credentials from your local configuration.

Usage

game logout

Description

The logout command clears the auth section (token, API key, and expiry) from your local CLI configuration file (~/.game/config.yml). This includes:

  • The JWT access token (from OIDC device-flow login)
  • A stored API key
  • The token's expires_at

It first asks for confirmation. If you are not currently logged in, it prints Not currently logged in and exits without changes.

When to Use

Switching Accounts

When you need to switch between different Game Framework Cloud accounts:

# Logout from current account
game logout

# Login with different account
game login

Security Cleanup

For security purposes, especially on shared machines:

# Clear credentials before leaving
game logout

Troubleshooting Authentication Issues

If you're experiencing authentication problems:

# Clear potentially corrupted credentials
game logout

# Re-authenticate
game login

Confirmation

The command first prompts for confirmation (default No); answering no aborts without changes. On success it prints:

Logged out successfully
To log back in, run: game login

What Happens

When you confirm game logout:

  1. Clears the auth section of ~/.game/config.yml (token, api_key, expires_at)
  2. Preserves your other settings — defaults.workspace_id and preferences
  3. Displays the confirmation message

Your workspace selections and other preferences are preserved after logout. Only authentication credentials are removed.

After Logout

After logging out, commands that require authentication will fail until you login again:

game logout

# These commands will require re-authentication:
game workspace list    # Error: Not authenticated
game publish          # Error: Not authenticated
game whoami           # Error: Not authenticated

Configuration File Location

The CLI configuration is stored at:

  • Linux/macOS: ~/.game/config.yml
  • Windows: %USERPROFILE%\.game\config.yml

After logout, you'll need to run game login to authenticate again before using cloud features.

Next Steps

After logging out:

  1. Login again with game login
  2. Select your workspace with game workspace select
  3. Verify authentication with game whoami