gddy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

gddy — GoDaddy domains & DNS CLI

gddy — GoDaddy域名与DNS CLI

gddy
is GoDaddy's beta CLI for domain search, registration, and DNS management.
It's separate from GoDaddy's older
godaddy
CLI; it will eventually contain all of that same functionality.
gddy
是GoDaddy用于域名搜索、注册和DNS管理的beta版CLI。
它独立于GoDaddy的旧版
godaddy
CLI;未来它将整合旧版工具的所有功能。

Setup

安装配置

Install:
bash
undefined
安装方式:
bash
undefined

macOS / Linux / Git Bash / MSYS2 / Cygwin

macOS / Linux / Git Bash / MSYS2 / Cygwin

PowerShell

PowerShell


Verify that installation works by running `gddy --version`.

运行 `gddy --version` 验证安装是否成功。

Documentation

文档说明

The
gddy
CLI is self-documenting. Use the following to get more information about its capabilities:
  • The
    --help
    flag will give you detailed documentation on any command.
  • gddy search <keywords>
    will help you find a command.
  • The
    gddy tree
    command will give you a full listing of all commands.
  • The
    gddy guide
    command lets you view detailed documentation that explains concepts and outlines complex workflows.
gddy
CLI具备自文档功能。可通过以下方式了解其功能详情:
  • 使用
    --help
    参数可获取任意命令的详细文档。
  • gddy search <keywords>
    可帮助你查找命令。
  • gddy tree
    命令会列出所有可用命令的完整清单。
  • gddy guide
    命令可查看解释概念、概述复杂工作流程的详细文档。

Authentication

身份验证

Interactive three-legged OAuth happens automatically if there is no auth token, if the auth token is expired, or if additional permissions are required. When you run a command that requires auth, it will open the user's web browser. You can list available OAuth scopes with
gddy auth scopes
then log them in with
gddy auth login --scope <a> --scope <b>
if you want to avoid multiple scope step-up interactions. Run
gddy auth --help
for more auth details or use
gddy guide auth
for a full walkthrough.
For non-interactive workflows, you can use a Personal Access Token (PAT) instead. A PAT can be generated by a GoDaddy customer at https://developer.godaddy.com/en/personal-access-token. It can be stored securely with
gddy pat add
or set in a
GDDY_PAT
environment variable.
如果没有身份验证令牌、令牌已过期或需要额外权限,交互式三方OAuth将自动触发。当你运行需要身份验证的命令时,会自动打开用户的浏览器。你可以使用
gddy auth scopes
列出可用的OAuth权限范围,若想避免多次权限提升交互,可使用
gddy auth login --scope <a> --scope <b>
完成登录。运行
gddy auth --help
获取更多身份验证详情,或使用
gddy guide auth
查看完整操作指南。
对于非交互式工作流,你可以使用个人访问令牌(PAT)替代。GoDaddy客户可在https://developer.godaddy.com/en/personal-access-token生成PAT,可通过
gddy pat add
安全存储,或设置在
GDDY_PAT
环境变量中。

Domain purchase

域名购买

Domain purchase is a multi-step workflow. Run
gddy guide domain-purchase
for a detailed walkthrough. Always confirm with the user before finalizing a purchase — it's real money, and the action is not reversible.
域名购买是一个多步骤工作流。运行
gddy guide domain-purchase
查看详细操作指南。在完成购买前务必与用户确认——这涉及真实资金,且操作不可撤销。

DNS management

DNS管理

Valid record types:
A AAAA ALIAS CAA CNAME MX NS SOA SRV TXT
.
NS
and
SOA
are GoDaddy-managed and read-only — you can list them but not add/set/delete them.
bash
gddy dns list example.com --type A
gddy dns add example.com --type A --name www --data 192.0.2.1 --ttl 3600
gddy dns set example.com --type TXT --name @ --data "v=spf1 -all"
gddy dns delete example.com --type A --name www
add
appends a new record;
set
replaces every record matching that type+name;
delete
removes every record matching that type+name. Type-specific requirements:
MX
/
SRV
need
--priority
;
SRV
also needs
--port
,
--weight
,
--protocol
,
--service
;
CAA
requires
--tag
(
--flag
is optional).
set
and
delete
are destructive. Run with
--dry-run
first and show the user what would change before applying it for real.
支持的记录类型:
A AAAA ALIAS CAA CNAME MX NS SOA SRV TXT
。其中
NS
和
SOA
由GoDaddy管理,仅支持查看,无法添加/修改/删除。
bash
gddy dns list example.com --type A
gddy dns add example.com --type A --name www --data 192.0.2.1 --ttl 3600
gddy dns set example.com --type TXT --name @ --data "v=spf1 -all"
gddy dns delete example.com --type A --name www
add
用于添加新记录;
set
会替换所有匹配该类型+名称的记录;
delete
会删除所有匹配该类型+名称的记录。特定类型的要求:
MX
/
SRV
需要
--priority
参数;
SRV
还需要
--port
、
--weight
、
--protocol
、
--service
参数;
CAA
需要
--tag
参数(
--flag
为可选参数)。
set
和
delete
操作具有破坏性。建议先使用
--dry-run
参数查看预期更改,再执行实际操作。

Payment Methods

支付方式

gddy payment-methods add
opens the browser to the account's payment-methods page — no card data is ever handled by the CLI itself. Purchases fail (403/422) without a valid payment method or sufficient account balance; check the error's
code
field, not just the HTTP status, to tell that apart from other failures.
gddy payment-methods add
会打开浏览器跳转到账户的支付方式页面——CLI本身不会处理任何卡片数据。若无有效支付方式或账户余额不足,购买会失败(返回403/422状态码);需检查错误的
code
字段,而不仅仅是HTTP状态码,以区分此类失败与其他类型的失败。

Global flags

全局参数

Use the
--debug
flag for verbose output, including the full HTTP request/response. Use
--dry-run
to see what would happen without making any changes. Humans see human-formatted output; use
--human
to see what they see in an interactive TTY. Non-TTY output uses
--json
formatting by default. Use
--toon
if you understand that format to save tokens. Use
--env
to override the default
prod
environment, or set it permanently with
gddy env set <env>
.
使用
--debug
参数可获取详细输出,包括完整的HTTP请求/响应内容。使用
--dry-run
参数可查看预期操作,而不会实际更改任何内容。人类用户会看到格式化的易读输出;在交互式TTY中可使用
--human
参数查看该格式。非TTY环境默认使用
--json
格式输出。若了解
--toon
格式,可使用该参数以节省令牌。使用
--env
参数可覆盖默认的
prod
环境,或通过
gddy env set <env>
永久设置环境。

Reference material

参考资料

Read these only when the task needs the detail — they're not needed for common domain/DNS operations:
  • reference/api.md
    — raw GoDaddy Domains API fallback (when
    gddy
    isn't installed/available, e.g. CI in a non-shell language): base URL/auth, the public OpenAPI specs to fetch and search directly, and the durable gotchas (idempotency keys on registration, the MCP server's read-only/no-auth scope).
  • reference/errors-and-limits.md
    — error envelope shape, retry/idempotency rules per HTTP method, and rate-limit headers/handling.
仅当任务需要详细信息时才阅读以下内容——常规域名/DNS操作无需参考:
  • reference/api.md
    ——GoDaddy域名API的原始备用文档(当
    gddy
    未安装/不可用时,例如非Shell语言的CI环境):包含基础URL/身份验证方式、可直接获取和搜索的公开OpenAPI规范,以及需要注意的持久问题(注册时的幂等键、MCP服务器的只读/无权限范围)。
  • reference/errors-and-limits.md
    ——错误信封格式、各HTTP方法的重试/幂等规则,以及速率限制标头和处理方式。