Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
artifact: godaddy
artifact: gddy
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
artifact: godaddy
artifact: gddy
cross: true
- target: x86_64-apple-darwin
os: macos-latest
artifact: godaddy
artifact: gddy
- target: aarch64-apple-darwin
os: macos-latest
artifact: godaddy
artifact: gddy
- target: x86_64-pc-windows-msvc
os: windows-latest
artifact: godaddy.exe
artifact: gddy.exe
defaults:
run:
working-directory: rust
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
shell: bash
run: |
TAG=${GITHUB_REF#refs/tags/}
ARCHIVE="godaddy-${TAG}-${{ matrix.target }}"
ARCHIVE="gddy-${TAG}-${{ matrix.target }}"
mkdir dist
cp target/${{ matrix.target }}/release/${{ matrix.artifact }} dist/
cd dist
Expand Down
196 changes: 196 additions & 0 deletions .github/workflows/rust-port-alpha.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
name: rust-port alpha

# Publishes a `gddy` alpha binary on every push to the rust-port feature branch
# so people can try the Rust port alongside the legacy `godaddy` CLI. The Rust
# binary is named `gddy` (see rust/Cargo.toml). Output is a single rolling
# prerelease on the fixed `alpha` tag, overwritten on each push.
#
# This repo is PUBLIC, so the install flow uses plain `curl` against the public
# release assets — no `gh` or auth required (see install.sh).

on:
push:
branches: [rust-port]
workflow_dispatch:

# Least privilege by default; only the publish job needs `contents: write` to
# roll the `alpha` release/tag.
permissions:
contents: read

# The publish job deletes and recreates the single rolling `alpha` release/tag.
# Serialize runs so two quick pushes can't race the single rolling `alpha`
# release. cancel-in-progress is false on purpose: the publish job deletes and
# recreates the release/tag, so a cancellation mid-window could leave `alpha`
# missing. Queuing instead lets each publish finish atomically; the last one wins.
concurrency:
group: rust-port-alpha
cancel-in-progress: false

Comment thread
jpage-godaddy marked this conversation as resolved.
jobs:
test:
name: Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: rust
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
rust/target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-test-

- name: Clippy
run: cargo clippy -- -D warnings

- name: Test
run: cargo test

build:
name: Build ${{ matrix.target }}
needs: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
defaults:
run:
working-directory: rust
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
rust/target
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.target }}-cargo-

- name: Install cross
if: matrix.cross == true
run: cargo install cross --locked

- name: Build
shell: bash
run: |
if [ "${{ matrix.cross }}" = "true" ]; then
cross build --release --target ${{ matrix.target }}
else
cargo build --release --target ${{ matrix.target }}
fi

- name: Package gddy
shell: bash
run: |
TARGET="${{ matrix.target }}"
ARCHIVE="gddy-${TARGET}"
mkdir -p staging
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
cp "target/${TARGET}/release/gddy.exe" "staging/gddy.exe"
# Zip from inside staging/ so gddy.exe sits at the archive root
# (matching the tarballs and release.yaml), not under staging/.
(cd staging && 7z a "../${ARCHIVE}.zip" gddy.exe)
echo "ASSET=rust/${ARCHIVE}.zip" >> "$GITHUB_ENV"
Comment thread
jpage-godaddy marked this conversation as resolved.
else
cp "target/${TARGET}/release/gddy" "staging/gddy"
chmod 755 "staging/gddy"
tar -czf "${ARCHIVE}.tar.gz" -C staging gddy
echo "ASSET=rust/${ARCHIVE}.tar.gz" >> "$GITHUB_ENV"
fi

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: ${{ env.ASSET }}

publish:
name: Publish alpha
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true

- name: Generate checksums
run: |
cd dist
sha256sum gddy-*.tar.gz gddy-*.zip > gddy-checksums-sha256.txt

- name: Publish rolling alpha prerelease
env:
GH_TOKEN: ${{ github.token }}
run: |
SHORT_SHA="$(git rev-parse --short HEAD)"
BUILT_ON="$(date -u +%Y-%m-%d)"
REPO="${{ github.repository }}"

# Roll the single alpha release: drop the old tag + release so assets
# and notes reflect the latest commit, then recreate.
gh release delete alpha --yes --cleanup-tag || true

{
printf '**Experimental alpha of the GoDaddy CLI Rust port.** Built from `%s` on %s.\n\n' "$SHORT_SHA" "$BUILT_ON"
printf 'Installs as `gddy` so you can try it alongside the legacy `godaddy` CLI. It tracks the tip of the `rust-port` branch and is overwritten on every push — expect breakage.\n\n'
printf 'Install / update (public repo — no auth needed):\n\n'
printf '```\n'
printf 'curl -fsSL https://github.com/%s/releases/download/alpha/install.sh | bash\n' "$REPO"
printf '```\n'
} > alpha-notes.md

gh release create alpha \
--prerelease \
--target "$GITHUB_SHA" \
--title "rust-port alpha (${SHORT_SHA})" \
--notes-file alpha-notes.md \
dist/gddy-x86_64-unknown-linux-gnu.tar.gz \
dist/gddy-aarch64-unknown-linux-gnu.tar.gz \
dist/gddy-x86_64-apple-darwin.tar.gz \
dist/gddy-aarch64-apple-darwin.tar.gz \
dist/gddy-x86_64-pc-windows-msvc.zip \
dist/gddy-checksums-sha256.txt \
install.sh
Comment thread
jpage-godaddy marked this conversation as resolved.
85 changes: 49 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,32 @@ Agent-first CLI for interacting with GoDaddy Developer Platform.
Download the latest release binary from the [releases page](https://github.com/godaddy/cli/releases) and place it on your `PATH`.

```bash
godaddy --help
gddy --help
```

### Alpha (Rust port preview)

The CLI is being rewritten in Rust on the `rust-port` branch with expanded functionality. An experimental **`gddy`** binary is available that can be installed **alongside** the current `godaddy` CLI, so you can try it without disturbing your existing setup.

To install it, run the following:

```bash
curl -fsSL https://github.com/godaddy/cli/releases/download/alpha/install.sh | bash
gddy --version
```
Comment thread
jpage-godaddy marked this conversation as resolved.

The installer supports macOS and Linux. On Windows, download the `gddy-x86_64-pc-windows-msvc.zip` asset from the [`alpha` release](https://github.com/godaddy/cli/releases/tag/alpha) and put `gddy.exe` on your `PATH`.

## Output Contract

All executable commands emit JSON envelopes:

```json
{"ok":true,"command":"godaddy env get","result":{"environment":"ote"},"next_actions":[...]}
{"ok":true,"command":"gddy env get","result":{"environment":"ote"},"next_actions":[...]}
```

```json
{"ok":false,"command":"godaddy application info demo","error":{"message":"Application 'demo' not found","code":"NOT_FOUND"},"fix":"Use discovery commands such as: godaddy application list or godaddy actions list.","next_actions":[...]}
{"ok":false,"command":"gddy application info demo","error":{"message":"Application 'demo' not found","code":"NOT_FOUND"},"fix":"Use discovery commands such as: gddy application list or gddy actions list.","next_actions":[...]}
```

`--help` remains standard CLI help text.
Expand All @@ -30,7 +43,7 @@ Long-running operations can stream typed NDJSON events with `--follow`, ending w
## Root Discovery

```bash
godaddy
gddy
```

Returns environment/auth snapshots and the full command tree.
Expand All @@ -45,54 +58,54 @@ Returns environment/auth snapshots and the full command tree.

### Environment

- `godaddy env`
- `godaddy env list`
- `godaddy env get`
- `godaddy env set <environment>`
- `godaddy env info [environment]`
- `gddy env`
- `gddy env list`
- `gddy env get`
- `gddy env set <environment>`
- `gddy env info [environment]`

### Authentication

- `godaddy auth`
- `godaddy auth login`
- `godaddy auth logout`
- `godaddy auth status`
- `gddy auth`
- `gddy auth login`
- `gddy auth logout`
- `gddy auth status`

### Application

- `godaddy application` (alias: `godaddy app`)
- `godaddy application list` (alias: `godaddy app ls`)
- `godaddy application info <name>`
- `godaddy application validate <name>`
- `godaddy application update <name> [--label <label>] [--description <description>] [--status <status>]`
- `godaddy application enable <name> --store-id <storeId>`
- `godaddy application disable <name> --store-id <storeId>`
- `godaddy application archive <name>`
- `godaddy application init [--name <name>] [--description <description>] [--url <url>] [--proxy-url <proxyUrl>] [--scopes <scopes>] [--config <path>] [--environment <env>]`
- `gddy application` (alias: `gddy app`)
- `gddy application list` (alias: `gddy app ls`)
- `gddy application info <name>`
- `gddy application validate <name>`
- `gddy application update <name> [--label <label>] [--description <description>] [--status <status>]`
Comment thread
jpage-godaddy marked this conversation as resolved.
- `gddy application enable <name> --store-id <storeId>`
- `gddy application disable <name> --store-id <storeId>`
- `gddy application archive <name>`
- `gddy application init [--name <name>] [--description <description>] [--url <url>] [--proxy-url <proxyUrl>] [--scopes <scopes>] [--config <path>] [--environment <env>]`
- `--url` and `--proxy-url` must be publicly-resolvable `http(s)` URLs. `localhost`, loopback (`127.0.0.1`, `::1`), link-local, and RFC1918 private IPs are rejected. For local development, expose a tunnel (e.g. [cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/), [ngrok](https://ngrok.com/)) and register the tunnel hostname.
- `godaddy application release <name> --release-version <version> [--description <description>] [--config <path>] [--environment <env>]`
- `godaddy application deploy <name> [--config <path>] [--environment <env>] [--follow]`
- `gddy application release <name> --release-version <version> [--description <description>] [--config <path>] [--environment <env>]`
- `gddy application deploy <name> [--config <path>] [--environment <env>] [--follow]`

#### Application Add

- `godaddy application add`
- `godaddy application add action --name <name> --url <url>`
- `godaddy application add subscription --name <name> --events <events> --url <url>`
- `godaddy application add extension`
- `godaddy application add extension embed --name <name> --handle <handle> --source <source> --target <targets>`
- `godaddy application add extension checkout --name <name> --handle <handle> --source <source> --target <targets>`
- `godaddy application add extension blocks --source <source>`
- `gddy application add`
- `gddy application add action --name <name> --url <url>`
- `gddy application add subscription --name <name> --events <events> --url <url>`
- `gddy application add extension`
- `gddy application add extension embed --name <name> --handle <handle> --source <source> --target <targets>`
- `gddy application add extension checkout --name <name> --handle <handle> --source <source> --target <targets>`
- `gddy application add extension blocks --source <source>`

### Webhooks

- `godaddy webhook`
- `godaddy webhook events`
- `gddy webhook`
- `gddy webhook events`

### Actions

- `godaddy actions`
- `godaddy actions list`
- `godaddy actions describe <action>`
- `gddy actions`
- `gddy actions list`
- `gddy actions describe <action>`

## Development

Expand Down
Loading
Loading