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-rotateExamples
lpm token-rotate
lpm token-rotate --jsonlpm 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 --npmagain or replacingNPM_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
lpm login / logout / whoami- manage registry sessions- Authentication - token storage backends
- Environment variables - token overrides for automation