npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kud/gandi-cli

v0.2.2

Published

A modern CLI for the Gandi v5 REST API

Downloads

61

Readme

 ██████╗  █████╗ ███╗  ██╗██████╗ ██╗      ██████╗██╗     ██╗
██╔════╝ ██╔══██╗████╗ ██║██╔══██╗██║     ██╔════╝██║     ██║
██║  ███╗███████║██╔██╗██║██║  ██║██║     ██║     ██║     ██║
██║   ██║██╔══██║██║╚████║██║  ██║██║     ██║     ██║     ██║
╚██████╔╝██║  ██║██║ ╚███║██████╔╝███████╗╚██████╗███████╗██║
 ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚══╝╚═════╝ ╚══════╝ ╚═════╝╚══════╝╚═╝

TypeScript Node.js npm MIT

A modern CLI for the Gandi v5 REST API.

FeaturesQuick StartCLI ReferenceDevelopmentAuthentication


🌟 Features

  • 🌐 Domain Management — List all 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 support for custom TTLs and all standard record types
  • 🩺 Permission Doctor — Built-in gandi doctor checks your PAT scopes and shows exactly which commands are unlocked
  • 🔐 PAT Authentication — Uses Gandi Personal Access Tokens with fine-grained scope control — only grant what you need
  • Rich Terminal UI — Built with Ink and React for spinners, aligned tables, and clean formatted output
  • 📦 Zero Config — Set one env var or add one line to a TOML file and you're ready to go

🚀 Quick Start

1. Install

npm install -g @kud/gandi-cli

2. Authenticate

Generate a Personal Access Token at gandi.net → Account → Partage → Créer un jeton d'accès personnel then export it:

export GANDI_API_KEY="your-token-here"

3. Check permissions

gandi doctor
Gandi CLI
Expires in 29 days · 1 entity

✓  domain:view   gandi domain list
✗  domain:renew  gandi domain renew
✓  domain:tech   gandi dns list / set / delete

4. Manage domains and DNS

gandi domain list

gandi dns list example.com
gandi dns set example.com A www 1.2.3.4 --ttl 300
gandi dns delete example.com A www

📖 CLI Reference

| Command | Description | | -------------------------------------------------------------- | --------------------------------------------- | | gandi doctor | Check token info and permissions | | gandi domain list | List all domains with expiry dates and status | | gandi domain renew <domain> | Renew a domain for 1 year | | gandi domain renew <domain> --duration <years> | Renew for a specified number of years | | gandi dns list <domain> | List all DNS records for a domain | | gandi dns set <domain> <type> <name> <value> | Create or replace a DNS record | | gandi dns set <domain> <type> <name> <value> --ttl <seconds> | Set with a custom TTL in seconds | | gandi dns delete <domain> <type> <name> | Delete a DNS record |


🔧 Development

Project Structure

gandi-cli/
├── src/
│   ├── commands/
│   │   ├── doctor.tsx
│   │   ├── domain-list.tsx
│   │   ├── domain-renew.tsx
│   │   ├── dns-list.tsx
│   │   ├── dns-set.tsx
│   │   └── dns-delete.tsx
│   ├── components/
│   │   ├── error.tsx
│   │   ├── spinner-action.tsx
│   │   └── table.tsx
│   ├── lib/
│   │   ├── api.ts
│   │   └── config.ts
│   ├── types/
│   │   └── gandi.ts
│   └── index.tsx
├── dist/
├── package.json
└── README.md

Scripts

| Script | Description | | --------------- | -------------------------------------------- | | npm run build | Compile TypeScript to dist/ | | npm run dev | Run directly with tsx — no build step needed | | npm run start | Run compiled output from dist/ |

Workflow

git clone https://github.com/kud/gandi-cli.git
cd gandi-cli
npm install
npm run dev -- doctor

🔒 Authentication

gandi-cli uses Personal Access Tokens (PATs) — not legacy API keys.

Generate a token at gandi.net → Account → Partage → Créer un jeton d'accès personnel with only the permissions you need:

| Permission | Required for | | ----------------------------------------------- | ----------------------------------- | | Voir la liste de vos domaines | gandi domain list | | Gérer le renouvellement de vos domaines | gandi domain renew | | Accéder aux enregistrements DNS de vos domaines | gandi dns list | | Gérer les enregistrements DNS de vos domaines | gandi dns set, gandi dns delete |

Via environment variable (takes precedence):

export GANDI_API_KEY="your-token-here"

Via config file (~/.config/gandi/config.toml):

api_key = "your-token-here"
  • ✅ Only grant permissions each command actually needs
  • ✅ Set an expiry date on the token
  • ✅ Use gandi doctor to verify scopes before running commands

🏗 Tech Stack

| Component | Details | | ------------- | ---------------------- | | Runtime | Node.js ≥ 20 | | Language | TypeScript 5.x (ESM) | | Terminal UI | Ink 7 + React 19 | | CLI Framework | Commander.js 12 | | Config | smol-toml | | Package | npm · @kud/gandi-cli |


MIT © kud — Made with ❤️ for the terminal

⭐ Star this repo if it saves you time · ↑ Back to top