nmbl Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

whoami - Authentication Status

Overview

The whoami command displays your current authentication identity and the method used. Authentication is checked in priority order: license key first, then OAuth token. When neither is active, you are prompted to run nmbl login.

Syntax

nmbl whoami

Arguments

None.

Output

Authenticated via license key

Authentication method: License Key
License key: ABCD****************************WXYZ

Authenticated via OAuth

Authentication method: OAuth
Email: user@example.com
Expires: 2025-06-30 14:22:10 UTC

Not authenticated

Not authenticated
Run 'nmbl login' to authenticate with OAuth or provide a license key.

Exit Codes

  • 0 - The user is authenticated via license key or OAuth.
  • 1 - The user is not authenticated, or the OAuth token has an error.

Examples

Check authentication status

nmbl whoami

Verify after login

nmbl login
nmbl whoami

Troubleshoot authentication issues

# Check current status
nmbl whoami

# If not authenticated, log in
nmbl login

# Verify again
nmbl whoami

Switch accounts

nmbl logout
nmbl login
nmbl whoami

Authentication methods

License key

If a LicenseKey is configured (e.g., in config.json or via CLI argument), it is validated first. A masked version of the key is shown — the first 4 and last 4 characters are preserved; everything in between is replaced with asterisks.

OAuth (Google)

If no valid license key is found, the stored OAuth token is checked. The command shows your email address and the UTC expiry time of the token.

  • login - Authenticate with OAuth
  • logout - Clear authentication tokens