lpm token-rotate

Rotate the active lpm.dev session token, invalidate the old token server-side, and store the replacement securely.

Rotate the current lpm.dev session token after a suspected leak or routine credential rotation.

lpm token-rotate

Examples

lpm token-rotate
lpm token-rotate --json

lpm token-rotate is only for the lpm.dev session token. It creates a new token, invalidates the old one on the server, stores the replacement in local secure storage, and records the returned expiry for lpm whoami warnings.

There is no equivalent command for npm, GitHub, or GitLab:

  • Rotate npm auth by running lpm login --npm again or replacing NPM_TOKEN.
  • Rotate GitHub and GitLab host-CLI auth in gh / glab.
  • Replace explicit fallback tokens with lpm login --<target> --token <T>.

Human output reports the old token invalidation, new token storage, secure-storage backend, and expiry timestamp when the registry returns one.

With --json, the envelope includes {success, rotated, expires_at, storage_backend, storage_degraded}.

Flags

lpm token-rotate takes no command-specific flags besides the global flags. Use --json for structured output.

See also