👋 Introduction
A modern CLI for the Gandi v5 REST API — manage your domains and LiveDNS records from the terminal.
gandi-cli brings your Gandi domains and LiveDNS records to the terminal. It talks to the Gandi v5 REST API using Personal Access Tokens, with a rich Ink-powered UI for spinners, aligned tables, and clean formatted output.
One global install, one token, and you're managing domains and DNS without ever opening the Gandi dashboard.
✨ Features
- 🌐 Domain management — list registered domains with expiry dates and statuses, and renew them for one or more years.
- 🔧 Full DNS control — list, create, update, and delete LiveDNS records with custom TTLs and all standard record types.
- 🩺 Permission doctor —
gandi doctorreports your token's name, expiry, and scopes, and shows which commands each scope unlocks. - 🔐 PAT authentication — fine-grained, least-privilege Gandi Personal Access Tokens; graceful guidance when a token is missing or rejected.
- ⚡ Rich terminal UI — built with Ink and React for spinners, aligned tables, and clean formatted output.
- 🤖 Script & AI friendly — add
--jsonto any command for structured output, non-zero exit codes on failure, and--yesto skip confirmations.
🤖 Scripting & JSON output
Every command accepts a global --json flag. Reads print the data as JSON,
writes print a result object ({ "ok": true, … }), and errors print
{ "error": "…" } to stderr with a non-zero exit code:
gandi dns list example.com --json
gandi domain info example.com --json | jq '.nameservers'
gandi dns delete example.com A www --json --yesDestructive commands still require --yes in --json mode, so an automated run
can never delete something by accident.
🧭 Where to go next
- Installation — requirements and how to
install the
gandicommand. - Authentication — create a token, scope it, and configure the CLI.
- Domains — list and renew your domains.
- DNS — manage LiveDNS records.
- Redirects — manage web forwarding.
- Doctor — inspect token info and scopes.