← CLI Reference

human whoami / human login

Identity and authentication CLI commands

human whoami

Print your current DID, profile, API URL, and token status at a glance.

human whoami
human whoami --json

Output (default — styled box):

  HUMΛN Identity
  DID         did:human:alice…
  Name        Alice Dev
  Profile     default → https://api.human.sh
  Token       eyJ…abc  ✔ live
  Expiry      expires in 14d

Confirms the stored token is live by calling GET /v1/me/dek-status. If the token is expired, the box border turns red and the token shows ✖ invalid or expired — run human login.

human login

Authenticate with HUMΛN Passport. Default: PKCE loopback (RFC 8252) — auto-opens your browser, lands on the consent screen, stores the delegation token locally. Fallback: OAuth device flow when loopback is unavailable.

human login                   # Loopback (default), device-flow fallback
human login --local           # MockPassport for local dev
human login --device          # Force device flow (URL + user code)
human login --no-browser      # Skip auto-open browser
human login --qr              # QR code for verification URL (SSH)
human login --no-qr           # Never show QR
human login --force           # Re-auth even with valid stored token
human login --profile staging
FlagDescription
--deviceUse OAuth device flow instead of loopback
--no-browserDo not auto-open the system browser
--qr / --no-qrControl QR rendering (auto on in SSH sessions)
--forceIgnore stored valid token and log in again
--localLocal MockPassport (offline dev)
--profileProfile name in ~/.human/config.yaml
--api-urlSelf-hosted API base URL
If a valid token is already stored, `human login` skips silently unless `--force` is passed.

MCP: After login, run human mcp config for a client snippet (placeholder token) or human mcp config --reveal-token to inject your real bearer (stderr warning).

human logout

Clear stored credentials.

human logout
human logout --profile staging

Environment Variables

VariableDescription
HUMAN_API_URLOverride API base URL
HUMAN_DELEGATION_TOKENSet token directly (bypasses profile)