Skip to content

Softorize/godaddy-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

godaddy-cli

A minimal, dependency-free CLI for the GoDaddy REST API. Pure bash + curl + python3 (stdlib only).

godaddy domains list
godaddy dns set example.com A @ 1.2.3.4 --ttl 600
godaddy dns add example.com TXT _verify "abc123"
godaddy domain availability foo.com bar.com

⚠️ Read this first: GoDaddy API access is gated

In early 2024, GoDaddy restricted public API access. To get working API keys, your account must meet at least one of:

  • 50 or more domains registered on the account, or
  • $1,000+ annual spend with GoDaddy

Below either threshold, your keys still generate at developer.godaddy.com/keys, but most endpoints (DNS records, domain operations) return 403 Forbidden. This affects every GoDaddy CLI and library equally — it's an account-level restriction, not a tool limitation.

If you don't qualify, consider Cloudflare for DNS (free, unrestricted API) or move DNS to another provider while keeping registration at GoDaddy.

Run godaddy auth-check after configuring keys to verify your account has API access.


Install

One-liner (recommended):

curl -fsSL https://raw.githubusercontent.com/softorize/godaddy-cli/main/install.sh | bash

Manual:

git clone https://github.com/softorize/godaddy-cli.git
cd godaddy-cli
install -m 0755 godaddy ~/.local/bin/godaddy

Make sure ~/.local/bin is on your PATH.

Configure

  1. Generate a production API key + secret at developer.godaddy.com/keys.
  2. Drop them in ~/.godaddy/credentials:
mkdir -p ~/.godaddy
cat > ~/.godaddy/credentials <<'EOF'
GODADDY_KEY=your-key-here
GODADDY_SECRET=your-secret-here
GODADDY_ENV=prod
EOF
chmod 600 ~/.godaddy/credentials

GODADDY_ENV=ote switches to the OTE (sandbox) environment — api.ote-godaddy.com — which has its own separate keys.

  1. Verify:
godaddy auth-check

A 403 Forbidden here means your account is below the gating threshold (see top of README).

Commands

godaddy whoami                          Show env + masked key
godaddy auth-check                      Verify keys work

godaddy domains list                    List all domains
godaddy domain get <domain>             Show full record
godaddy domain renew <domain>           Renew (1 year)
godaddy domain availability <d> [...]   Check availability

godaddy dns list <domain> [type] [name]                List records (filters optional)
godaddy dns get <domain> <type> <name>                 Get specific record(s)
godaddy dns set <domain> <type> <name> <value> [--ttl N]   Replace records
godaddy dns add <domain> <type> <name> <value> [--ttl N]   Append a record
godaddy dns delete <domain> <type> <name>              Delete records

godaddy raw <METHOD> <path> [curl args...]             Direct API call

Examples

# List all your domains and pluck just the names
godaddy domains list | jq -r '.[].domain'

# Point apex A record to a new IP
godaddy dns set example.com A @ 203.0.113.42 --ttl 600

# Add a TXT record for domain verification (does NOT replace existing TXT)
godaddy dns add example.com TXT _acme-challenge "abc123"

# Check 3 names at once
godaddy domain availability foo.com bar.io baz.dev

# Raw call to any endpoint
godaddy raw GET '/v1/domains/suggest?query=cannabis&limit=5'

How dns set vs dns add differ

  • setPUTs the new value, replacing all existing records of that <type>/<name>. Use this when you want exactly one record (e.g. a single A record on the apex).
  • add — fetches existing records, appends the new one, then PUTs the merged list back. Use this when you want multiple records of the same type (e.g. several TXT records, MX fanout).

GoDaddy's API has no native "append" endpoint; dns add simulates it.

Security

  • The credentials file should be mode 0600 (the install steps above set this).
  • Don't commit ~/.godaddy/ to git.
  • Use OTE keys (GODADDY_ENV=ote) for testing destructive operations.

Contributing

PRs welcome. Run shellcheck before pushing — CI runs it on every PR.

License

MIT. See LICENSE.

Disclaimer

Not affiliated with GoDaddy. "GoDaddy" is a trademark of GoDaddy Operating Company, LLC.

About

Minimal dependency-free bash CLI for the GoDaddy REST API. Pure bash + curl. Includes warning about GoDaddy's 2024 API gating (50+ domains or $1k+/yr required).

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages