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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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:

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

PHP Build Version
Package Version
Requires php Version >=8.0
automattic/domain-services-client Version ^1.6
symfony/console Version ^6.0 || ^7.0
guzzlehttp/guzzle Version ^7.0
guzzlehttp/psr7 Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package automattic/dn-cli contains the following files

Loading the files please wait ...