# CLI workflow reference (https://developer.godaddy.com/en/docs/api-users/cli/reference)

***

title: CLI workflow reference
description: "Reference for common gddy workflows: authentication, Domains, DNS, output flags, and payment methods."
related:
guides:

* title: "Set up the CLI"
  href: "/docs/api-users/cli/set-up"
* title: "Agent skill for gddy"
  href: "/docs/api-users/cli/agent-skill"
* title: "Authenticate"
  href: "/docs/api-users/auth"
  concepts:
* title: "Rate limits"
  href: "/docs/api-users/rate-limits"

***

## Overview

Use this focused reference for authentication, Domains, DNS, output flags, and payment methods. It is not a catalog of every command that ships in `gddy`: API exploration, Node.js hosting, and CLI administration/discovery evolve independently. Run `gddy tree` to print the exact command tree in your installed version, and `gddy <command> --help` for syntax and options.

If you haven't installed `gddy` yet, go to [Set up the CLI](https://developer.godaddy.com/docs/api-users/cli/set-up) first.

**Jump to:** [Authentication](#authentication-and-credentials) | [Domains](#domains) | [DNS](#dns) | [Output and flags](#output-and-flags) | [Payment methods](#payment-methods)

## Other command surfaces

The installed CLI also includes the following command families. They are intentionally not expanded into a second, incomplete catalog on this page; use the listed help command to inspect the version installed on your machine.

| Command family        | Use it for                                                                                                              | Discover commands                                                            |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `gddy api`            | Browse API domains and operations, inspect schemas and parameters, call REST or GraphQL operations                      | `gddy api --help`                                                            |
| `gddy hosting nodejs` | Create and manage Node.js hosting apps, source uploads, deployments, GitHub connections, secrets, logs, and status      | `gddy hosting nodejs --help`                                                 |
| CLI administration    | Environments (`env`), Personal Access Tokens (`pat`), updates (`update`), feature flags (`flags`), and shell completion | `gddy <family> --help`                                                       |
| CLI discovery         | Search commands and built-in guides, print the tree, or generate completions                                            | `gddy search <keyword>`, `gddy guide`, `gddy tree`, `gddy completion --help` |

## Authentication and credentials

The following table lists the `gddy` commands for authentication and credential management:

| Command                           | Description                                                                    |
| --------------------------------- | ------------------------------------------------------------------------------ |
| `gddy auth login`                 | Authenticate using browser-based login                                         |
| `gddy auth status`                | Show the current authentication state                                          |
| `gddy pat add --env <ENV> <NAME>` | Store a Personal Access Token for non-interactive authentication (CI, scripts) |
| `gddy env get`                    | Show the active environment                                                    |
| `gddy env set <ENVIRONMENT>`      | Set the active environment (for example, `ote` or `prod`)                      |

## Domains

The `gddy domain` namespace covers domain availability, search, registration, and management.

### Domain search and purchase

The following table lists the `gddy` commands for domain search and purchase:

| Command                                                              | Description                                                 | Note                                             |
| -------------------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------ |
| `gddy domain available <DOMAIN>`                                     | Check whether a single domain is available to register      |                                                  |
| `gddy domain available <DOMAIN> --check-type full`                   | Full registry check                                         | Provides a slower, definitive result             |
| `gddy domain suggest "<QUERY>" --tlds com,net,io --limit 5`          | Get domain name suggestions for a keyword or phrase         |                                                  |
| `gddy domain quote <DOMAIN>`                                         | Quote a domain                                              |                                                  |
| `gddy domain agreements --tld <TLD>`                                 | Retrieve the ICANN agreements required for a registration   |                                                  |
| `gddy domain purchase --quote-token <QUOTE_TOKEN> --agree --confirm` | Register the domain from a `gddy domain quote` token        | Charges the account (use `--confirm` to proceed) |
| `gddy domain contacts init`                                          | Write a `contacts.toml` template for reuse across purchases |                                                  |

`gddy domain purchase` doesn't take a domain name directly. It registers whatever `gddy domain quote <DOMAIN>` locked in, using that command's `--quote-token` (valid for about 10 minutes). Run `gddy guide domain-purchase` for the full walkthrough.

### Domain management

The following table lists the `gddy` commands for domain management:

| Command                            | Description                                   |
| ---------------------------------- | --------------------------------------------- |
| `gddy domain list`                 | List all domains on the authenticated account |
| `gddy domain list --status ACTIVE` | Filter domains by status                      |
| `gddy domain get <DOMAIN>`         | Get full detail for a single domain           |

## DNS

The following table lists the `gddy` commands for DNS management:

| Command                                                                 | Description                             |
| ----------------------------------------------------------------------- | --------------------------------------- |
| `gddy dns list <DOMAIN>`                                                | List all DNS records on a domain        |
| `gddy dns list <DOMAIN> --type A --name www`                            | Filter by record type and name          |
| `gddy dns add <DOMAIN> --type A --name www --data 192.0.2.10 --ttl 600` | Add a DNS record                        |
| `gddy dns set <DOMAIN> --type A --name www --data 192.0.2.20 --ttl 600` | Replace all records for a type and name |
| `gddy dns delete <DOMAIN> --type A --name www`                          | Delete all records for a type and name  |

`gddy dns add` appends records. `gddy dns set` replaces every record for the type and name combination. `gddy dns delete` removes every record for the type and name (it doesn't remove GoDaddy-managed `NS` or `SOA` records). Use `--dry-run` with destructive commands to preview changes.

## Output and flags

Every command returns structured output. In an interactive terminal the default is human-readable; in pipes, CI, and scripts the default is JSON.

```json
{ "data": { "apiUrl": "https://api.ote-godaddy.com", "env": "ote" } }
```

**Format:** `-o, --output <json|human|toon>` (shortcuts: `--json`, `--human`, `--toon`)

The following table lists the available output shaping and execution flags:

| Flag                                       | What it does                                                  |
| ------------------------------------------ | ------------------------------------------------------------- |
| `--fields <fields>`                        | Select output fields                                          |
| `--filter <jmespath>`                      | Filter list items                                             |
| `--expr <jmespath>`                        | Transform the whole result                                    |
| `--limit` / `--offset`                     | Paginate client-side                                          |
| `--verbose [fields]`                       | Add execution metadata                                        |
| `--schema`                                 | Print a command's documented output fields without running it |
| `--env <environment>`                      | One-off environment override                                  |
| `--dry-run`                                | Preview a supported mutation                                  |
| `--credential-store <auto\|keyring\|file>` | Choose where credentials are stored                           |
| `--debug <pattern>`                        | Diagnostic logging                                            |
| `--timeout <duration>`                     | For example `60s` or `5m`                                     |

## Payment methods

The following table lists the `gddy` commands for payment methods:

| Command                    | Description                                               |
| -------------------------- | --------------------------------------------------------- |
| `gddy payment-methods add` | Open the payment-methods page for the current environment |

Domain forwarding, registry lock, renewals, and contact updates aren't in the CLI yet. Use the REST API for those operations. Go to [About the GoDaddy CLI](https://developer.godaddy.com/docs/api-users/cli) for what `gddy` covers.
