Download the PHP package automattic/dn-cli without Composer
On this page you can find all versions of the php package automattic/dn-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download automattic/dn-cli
More information about automattic/dn-cli
Files in automattic/dn-cli
Package dn-cli
Short Description CLI tool for Automattic Domain Services API
License GPL-2.0-or-later
Informations about the package dn-cli
dn — Domain Name CLI
Manage domains from your terminal. dn works in two modes: directly through the Automattic Domain Services API (partner mode), or through WordPress.com (user mode).
Installation
Composer (global)
Make sure ~/.composer/vendor/bin (or ~/.config/composer/vendor/bin) is in your PATH:
From source
Then run with ./bin/dn or symlink it into your PATH:
Setup
Run dn configure to pick a mode and authenticate:
- User mode — WordPress.com OAuth. Requires a WordPress.com account.
- Partner mode — Automattic Domain Services API. Requires an API key and API user.
Your mode determines which commands are available. User mode covers domain search, purchase, and transfer through WordPress.com checkout. Partner mode gives you the full set: registration, DNS, contacts, privacy, transfers.
Non-interactive setup
Pipe credentials via stdin for scripts and CI/CD:
Environment variables
Environment variables override the config file:
Config file
Stored at ~/.config/dn/config.json with 0600 permissions:
To remove stored credentials:
Commands
Check domain availability
Both modes.
Get domain suggestions
Both modes.
Register a domain
In partner mode, registers the domain directly:
In user mode, adds the domain to your WordPress.com cart and prints a checkout link:
Auto-checkout (user mode)
Complete purchases from the terminal without opening a browser. Requires a saved payment method or account credits, and contact information on file from a previous purchase.
Set a persistent preference during dn configure or with the DN_AUTO_CHECKOUT environment variable (credits, card, or both).
Cart and checkout (user mode)
dn register adds to cart, dn cart shows what's in it, dn checkout opens WordPress.com checkout in your browser.
Domain information
Partner mode. In user mode, points you to WordPress.com.
Transfer a domain
Both modes. Transfers a domain from another registrar. The domain must be unlocked and you need the EPP authorization code.
In partner mode, submits the transfer directly:
In user mode, validates the auth code, adds the transfer to your WordPress.com cart, and prints a checkout link:
Auto-checkout works the same as with dn register:
Partner mode commands
The remaining commands are partner mode only. In user mode, they'll point you to WordPress.com where you can manage these settings.
DNS
Supported record types: A, AAAA, ALIAS, CAA, CNAME, MX, NS, PTR, TXT, SRV.
Contacts, privacy, transfer lock
Command reference
| Command | Mode | Description |
|---|---|---|
dn configure |
— | Set up credentials and select mode |
dn reset |
— | Remove stored configuration |
dn check <domain>... |
both | Check availability and pricing |
dn suggest <query> |
both | Get domain name suggestions |
dn register <domain> |
both | Register a domain (partner) or add to cart (user) |
dn cart |
user | View your shopping cart |
dn checkout |
user | Open WordPress.com checkout in browser |
dn info <domain> |
partner | Domain details and status |
dn renew <domain> |
partner | Renew registration |
dn delete <domain> |
partner | Delete a domain |
dn restore <domain> |
partner | Restore a deleted domain |
dn transfer <domain> |
both | Transfer a domain in (partner: direct, user: add to cart) |
dn dns:get <domain> |
partner | View DNS records |
dn dns:set <domain> |
partner | Set DNS records |
dn contacts:set <domain> |
partner | Update contact information |
dn privacy <domain> <on\|off\|redact> |
partner | WHOIS privacy settings |
dn transferlock <domain> <on\|off> |
partner | Transfer lock control |
Claude Code plugin
If you use Claude Code, you can install the domain-names plugin for guided domain management skills:
Run /domain-names:setup to verify the CLI is installed and configured. Then use skills like /domain-names:dn-check, /domain-names:dn-register, etc.
Shell completion
License
GPL-2.0-or-later
All versions of dn-cli with dependencies
automattic/domain-services-client Version ^1.6
symfony/console Version ^6.0 || ^7.0
guzzlehttp/guzzle Version ^7.0
guzzlehttp/psr7 Version ^2.0