Authentication and tokens

ploy login

ploy login opens Ploy in your browser and stores CLI credentials after sign-in. If your account uses enhanced security, complete MFA in the browser.

Sign in
ploy login

Logging in again stores the new credential first, then attempts to revoke the previous one. --dry-run is not supported.

ploy whoami

Confirm the account attached to the current credential. The command prints the authenticated email, optional name, and user ID.

Show the current user
ploy whoami

ploy logout

Logout revokes the current server-side CLI credential and removes local credentials. Saved workspace and site selections remain in place.

Log out or preview logout
ploy logout
ploy --dry-run logout

If the current credential already fails with 401, 403, or 404, the CLI still clears it locally.

List active CLI credentials

ploy tokens lists up to 100 active CLI refresh credentials for the current user and marks the credential in use by this CLI.

List credentials
ploy tokens

Revoke a credential

ploy token revoke <target> accepts a credential ID, an exact credential name, or the special target current. If an exact name matches more than one credential, Ploy returns a conflict instead of guessing.

Revoke a CLI credential
ploy token revoke current
ploy token revoke <token-id>
ploy --dry-run token revoke <token-id>

Revoking the current credential also removes it from local config.

Authentication failures

Commands return exit code 3 when authentication is required or credentials have expired. Run ploy login again, then retry the original command.


Keep going