# Set up the CLI (https://docs.developer.commerce.godaddy.com/en/docs/api-users/cli/set-up)

***

title: Set up the CLI
description: Install the GoDaddy CLI as `gddy` and make a first call—`gddy` handles authentication automatically when a command needs it.
agentNotes:
permissions: \["Any account"]
scopes: \["Depends on invoked command — CLI wraps REST endpoints and inherits their scopes"]
rateLimit: "Rate-limited per credential per window (per underlying REST call). Go to /docs/api-users/rate-limits for current values."
idempotent: true
destructive: false
failureRecovery: "CLI is a wrapper — same recovery semantics as the underlying REST endpoint. Config is stored in \~/.config/gddy/ (Linux/macOS) or the platform equivalent. Delete config to reset credentials."
related:
guides:

* title: "Quickstart"
  href: "/docs/api-users/quickstart"
* title: "Authenticate"
  href: "/docs/api-users/auth"
* title: "CLI reference"
  href: "/docs/api-users/cli/reference"
* title: "Agent skill for gddy"
  href: "/docs/api-users/cli/agent-skill"
* title: "GoDaddy MCP server"
  href: "/docs/api-users/mcp"
  concepts:
* title: "About the GoDaddy CLI"
  href: "/docs/api-users/cli"
* title: "Rate limits"
  href: "/docs/api-users/rate-limits"

***

## Overview

The CLI installer installs the GoDaddy CLI as `gddy`. If you prefer raw HTTP calls instead, go to the [API quickstart](https://docs.developer.commerce.godaddy.com/docs/api-users/quickstart). You can also have an AI coding agent install and drive `gddy` for you by using the [agent skill](https://docs.developer.commerce.godaddy.com/docs/api-users/cli/agent-skill). For read-only domain search without installing anything, go to the [MCP server](https://docs.developer.commerce.godaddy.com/docs/api-users/mcp). Go to [About the GoDaddy CLI](https://docs.developer.commerce.godaddy.com/docs/api-users/cli) for what `gddy` covers and how it relates to the agent skill and the MCP server.

The install scripts come from the public `godaddy/cli` repository. You don't need GitHub authentication to install or update the CLI.

This page covers installation and authentication. After that, use [CLI reference](https://docs.developer.commerce.godaddy.com/docs/api-users/cli/reference) to look up commands for Domains, DNS, and other CLI operations. If you are building a GoDaddy Platform application, continue with [Build Apps with the CLI](https://docs.developer.commerce.godaddy.com/docs/api-users/commerce/apps/tools/cli) for the end-to-end implementation workflow.

## Install or update the CLI

Run the installer for your shell. Re-running the same command updates `gddy` to the latest release. The following procedure installs or updates the CLI.

**macOS / Linux**

The script downloads the `gddy` binary, verifies its checksum, and installs it to `~/.local/bin`. It doesn't modify your `PATH`.

1. Run the following command:

   ```bash
   curl -fsSL https://github.com/godaddy/cli/releases/latest/download/install.sh | bash
   ```

2. (*Optional*) If `~/.local/bin` is not already in your path, add it yourself:

   ```bash
   export PATH="$HOME/.local/bin:$PATH"
   ```

Add the same line to your shell profile (`~/.zshrc` or `~/.bashrc`) to persist it across new terminals.
This also works from Git Bash, MSYS2, or Cygwin on Windows.

**Windows PowerShell**

The script downloads the `gddy.exe` binary, verifies its checksum, installs it to `%LOCALAPPDATA%\Programs\gddy`, and adds that directory to your user `PATH` (open a new terminal to pick it up).

* Run the following command:

  ```powershell
  irm https://github.com/godaddy/cli/releases/latest/download/install.ps1 | iex
  ```

If PowerShell blocks the command with an execution-policy error (common on corporate-managed machines that default to `Restricted`), run `Set-ExecutionPolicy -Scope Process Bypass` first and try again, or download `install.ps1` and inspect it before running it directly.

## Verify the install

Verify the install by checking the version and help message. If your shell can't find `gddy`, the install directory isn't on your `PATH`. The following procedure verifies the installation was successful.

1. Open a new terminal if the installer changed your `PATH`, then run:

   ```bash
   gddy --version
   gddy --help
   ```

2. (*Optional*) Confirm the binary exists (if your shell can't find `gddy`):

   **macOS / Linux**

   `~/.local/bin/gddy`

   **Windows PowerShell**

   `%LOCALAPPDATA%\Programs\gddy\gddy.exe`

## Authenticate

You don't need to log in ahead of time. Any command that needs authentication opens a browser for OAuth login automatically the first time you run it. The following procedure logs in early, which is useful if you want to confirm your session before running commands or switch accounts.

1. Run the following command:

   ```bash
   gddy auth login
   ```

2. Confirm the CLI has an active session:

   ```bash
   gddy auth status
   ```

CI pipelines, SSH sessions, and other non-interactive environments can't complete the browser flow, so authentication has to happen ahead of time there. Generate a [Personal Access Token](https://docs.developer.commerce.godaddy.com/docs/api-users/auth/how-to) and store it for `gddy` to use instead:

```bash
echo 'gd_pat_...' | gddy pat add --env prod "CI token"
```

Or skip local storage and supply it per-run with the `GDDY_PAT` (or `GDDY_PAT_<ENV>`) environment variable. The CLI checks for a PAT before falling back to OAuth. Run `gddy guide auth` for the full walkthrough.

## Add a payment method

Domain purchase requires a billing method on your GoDaddy account. If you haven't logged in yet, `gddy` prompts you to before opening the payment-methods page. The following procedure adds a payment method.

* Open the payment-methods page for your environment:

  ```bash
  gddy payment-methods add
  ```

Go to [Set up a payment profile](https://docs.developer.commerce.godaddy.com/docs/api-users/payment-profile) for information on account URLs, verification steps, and common billing errors.

## Make a first call

The following procedure makes a first call to the Domains API to get available domain suggestions for "coffee shop". If you haven't logged in yet, `gddy` prompts you to the first time one of these commands needs it.

1. Ask the Domains API for available domain suggestions for "coffee shop":

   ```bash
   gddy domain suggest "coffee shop" --tlds com --limit 5
   ```

2. Check a suggestion directly:

   ```bash
   gddy domain available <DOMAIN>
   ```

3. After you've found an available domain, get a price quote before purchasing:

   ```bash
   gddy domain quote <DOMAIN>
   ```

4. Complete the purchase using the quote token from the previous step:

   ```bash
   gddy domain purchase --quote-token <QUOTE_TOKEN> --agree --confirm
   ```

`gddy domain purchase` registers the domain and charges the payment method you added earlier. The quote token from step 3 is only valid for about 10 minutes, and `--confirm` is required to finalize the charge. Run `gddy guide domain-purchase` for the full walkthrough, including how to supply registrant contact details.

Go to [CLI workflow reference](https://docs.developer.commerce.godaddy.com/docs/api-users/cli/reference) for command details on domain management, DNS, Platform Apps, and payment methods. Run `gddy tree` for the exact complete command list in your installed version.
