Skip to content

gxbvc/godaddy-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

godaddy-cli

CLI for managing GoDaddy domains and DNS records via the GoDaddy API.

Prerequisites

Setup

cd ~/tools/godaddy-cli
npm install
cp .env.example .env
# Fill in GODADDY_API_KEY and GODADDY_API_SECRET
npm run build
npm link

Configuration

Create a .env file (or symlink to shared credentials):

GODADDY_API_KEY=your_api_key
GODADDY_API_SECRET=your_api_secret

Get credentials at https://developer.godaddy.com/keys — use "Production" environment.

Commands

Domains

# List all domains in account
godaddy-cli domains list

# Get domain details (expiry, status, nameservers)
godaddy-cli domains get example.com

# Check if a domain is available for purchase
godaddy-cli domains available example.com

DNS Records

# List all DNS records for a domain
godaddy-cli dns list example.com

# Filter by record type
godaddy-cli dns list example.com --type TXT

# Filter by type and name
godaddy-cli dns list example.com --type TXT --name @

# Get specific record(s)
godaddy-cli dns get example.com --type A --name @

# Add a record (appends, doesn't replace)
godaddy-cli dns add example.com --type TXT --name @ --data "v=spf1 include:_spf.google.com ~all"
godaddy-cli dns add example.com --type MX --name @ --data "mail.example.com" --priority 10 --ttl 600

# Replace all records for a type+name
godaddy-cli dns replace example.com --type A --name @ --data "1.2.3.4"

# Replace with multiple values
godaddy-cli dns replace example.com --type TXT --name @ --data "value1" --data "value2"

# Delete records by type+name
godaddy-cli dns delete example.com --type TXT --name _dmarc

Email Verification

# Check if SPF, DKIM, and DMARC records are configured
godaddy-cli dns verify-email example.com

Checks for:

  • SPF: TXT record on @ containing v=spf1
  • DMARC: TXT record on _dmarc containing v=DMARC1
  • DKIM: TXT or CNAME records on common selectors (default._domainkey, google._domainkey, k1._domainkey, etc.)

Output Format

All commands output JSON to stdout:

{"ok": true, "data": { ... }}
{"ok": false, "error": "message", "code": "ERROR_CODE"}

Rate Limits

GoDaddy API allows 60 requests/minute.

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors