gandi-cli

🩺 Doctor

Inspect your token info and see which commands your scopes unlock.

gandi doctor is a built-in health check. It introspects your Personal Access Token and reports its name, expiry, and granted scopes β€” so you can see at a glance which commands the token unlocks.

gandi doctor
Token gandi-cli
Expires in 59 days Β· 1 entity

βœ“  domain:view   gandi domain list
β—‹  domain:renew  gandi domain renew
βœ“  domain:tech   gandi dns list / set / delete

Each scope row tells you what the token can do:

  • βœ“ (green) β€” the scope is granted; the listed commands will work.
  • β—‹ (dim) β€” the scope is not granted. This is not an error β€” it's usually an intentional least-privilege choice. The matching command stays locked until you re-create the token with that permission ticked.

⏰ When to run it

  • After creating a token β€” confirm you granted the scopes you need.
  • Before a command fails β€” check whether a permission is missing rather than guessing.
  • When a token is about to expire β€” the header shows how many days remain. Gandi has no API to renew a token, so rotate it manually before it lapses.

🩹 When the token is missing or rejected

If no token is configured, or Gandi rejects the one you have, doctor (and every other command) prints step-by-step setup guidance instead of a cryptic error. See Authentication to widen or narrow your scopes.