From 9134f444dac5d6dd97548ceb0f9a8616ca5096b4 Mon Sep 17 00:00:00 2001 From: sionsmith Date: Tue, 24 Mar 2026 14:35:51 +0000 Subject: [PATCH 1/2] docs: add WP-CLI inspiration and motivation Explain that wpx was inspired by WP-CLI but built for AI agents that shouldn't need PHP installed to manage WordPress sites. Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 2 +- README.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index fe5d66f..1f15dd3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,7 @@ ## Project Overview -wpx is a Rust-native WordPress CLI designed for both AI agents and humans. It manages WordPress sites remotely via the REST API, producing structured machine-readable output (JSON) when piped and human-readable tables when run interactively. The tool is organized as a Cargo workspace of six crates, supports multi-site fleet management, and authentication via WordPress application passwords and OAuth 2.1 with PKCE. +wpx is a Rust-native WordPress CLI designed for both AI agents and humans. Inspired by [WP-CLI](https://github.com/wp-cli/wp-cli), but built from the ground up because AI agents shouldn't need PHP to manage WordPress -- wpx communicates purely via the WordPress REST API as a single static binary with zero runtime dependencies. It produces structured machine-readable output (JSON) when piped and human-readable tables when run interactively. The tool is organized as a Cargo workspace of six crates, supports multi-site fleet management, and authentication via WordPress application passwords and OAuth 2.1 with PKCE. ## Build & Test diff --git a/README.md b/README.md index d7450ce..035270e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,11 @@ [![License: MIT/Apache-2.0](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE) [![Rust](https://img.shields.io/badge/rust-2021-orange.svg)](https://www.rust-lang.org/) -Rust-native CLI for managing WordPress sites remotely via the REST API. Designed agent-first: structured JSON output, schema introspection, and semantic exit codes let AI agents operate WordPress programmatically. Designed human-friendly: auto-detecting table output, colored terminals, and shell completions make it pleasant for interactive use. Zero runtime dependencies -- single static binary, no PHP or SSH required. +Rust-native CLI for managing WordPress sites remotely via the REST API. Inspired by [WP-CLI](https://github.com/wp-cli/wp-cli), but built from the ground up for AI agents -- because agents shouldn't need PHP installed to manage a WordPress site. + +WP-CLI requires a local PHP runtime, a bootstrapped WordPress installation, and SSH access to run. That's fine for humans on a server, but it's a non-starter for AI coding agents like Claude, Cursor, or Codex that operate remotely over HTTPS. **wpx** solves this by communicating purely via the WordPress REST API as a single static binary with zero runtime dependencies. + +Designed agent-first: structured JSON output, schema introspection, and semantic exit codes let AI agents operate WordPress programmatically. Designed human-friendly: auto-detecting table output, colored terminals, and shell completions make it pleasant for interactive use. ## Features From 97d201f826e1133bf6a34d5f5323a612b9287d9e Mon Sep 17 00:00:00 2001 From: sionsmith Date: Tue, 24 Mar 2026 14:42:17 +0000 Subject: [PATCH 2/2] ci: add Homebrew tap update to release workflow Matches the quickbooks-cli release pattern: - Build artifacts named by target (wpx-{target}.tar.gz) - After builds, downloads artifacts, computes SHA256 checksums, generates Formula, and pushes to osodevops/homebrew-tap - Install via: brew install osodevops/tap/wordpress-cli Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/release.yml | 102 +++++++++++++++++++++++++--------- README.md | 2 +- 2 files changed, 76 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40c538f..ce5f665 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,16 +20,12 @@ jobs: include: - target: x86_64-unknown-linux-gnu os: ubuntu-latest - artifact: wpx-linux-x86_64 - target: aarch64-unknown-linux-gnu os: ubuntu-latest - artifact: wpx-linux-aarch64 - target: x86_64-apple-darwin os: macos-latest - artifact: wpx-darwin-x86_64 - target: aarch64-apple-darwin os: macos-latest - artifact: wpx-darwin-aarch64 steps: - uses: actions/checkout@v4 @@ -55,40 +51,92 @@ jobs: - name: Package run: | - mkdir -p dist - cp target/${{ matrix.target }}/release/wpx dist/${{ matrix.artifact }} - chmod +x dist/${{ matrix.artifact }} - tar czf dist/${{ matrix.artifact }}.tar.gz -C dist ${{ matrix.artifact }} + cd target/${{ matrix.target }}/release + tar czf ../../../wpx-${{ matrix.target }}.tar.gz wpx - name: Generate man pages if: matrix.target == 'x86_64-unknown-linux-gnu' run: | mkdir -p dist/man cargo run --release --target ${{ matrix.target }} -- man --dir dist/man - tar czf dist/wpx-man-pages.tar.gz -C dist/man . + tar czf wpx-man-pages.tar.gz -C dist/man . - - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.artifact }} - path: dist/*.tar.gz + - name: Upload assets + env: + GH_TOKEN: ${{ github.token }} + run: gh release upload "$GITHUB_REF_NAME" wpx-*.tar.gz --clobber || true - release: - name: Release - needs: build + create-release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - uses: actions/download-artifact@v4 - with: - path: artifacts - merge-multiple: true - - - name: Create release + - name: Create GitHub release env: GH_TOKEN: ${{ github.token }} run: | - gh release create ${{ github.ref_name }} \ - --title "wpx ${{ github.ref_name }}" \ - --generate-notes \ - artifacts/*.tar.gz + gh release create "$GITHUB_REF_NAME" \ + --title "wpx $GITHUB_REF_NAME" \ + --generate-notes || true + + homebrew: + needs: build + runs-on: ubuntu-latest + steps: + - name: Update Homebrew tap + env: + HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} + run: | + set -euo pipefail + VERSION="${GITHUB_REF_NAME#v}" + BASE_URL="https://github.com/osodevops/wordpress-cli/releases/download/${GITHUB_REF_NAME}" + + curl -fsSL "${BASE_URL}/wpx-aarch64-apple-darwin.tar.gz" -o arm64.tar.gz + curl -fsSL "${BASE_URL}/wpx-x86_64-apple-darwin.tar.gz" -o x86_64_mac.tar.gz + curl -fsSL "${BASE_URL}/wpx-x86_64-unknown-linux-gnu.tar.gz" -o x86_64_linux.tar.gz + + SHA_ARM64=$(sha256sum arm64.tar.gz | awk '{print $1}') + SHA_X86_64_MAC=$(sha256sum x86_64_mac.tar.gz | awk '{print $1}') + SHA_X86_64_LINUX=$(sha256sum x86_64_linux.tar.gz | awk '{print $1}') + + cat > wordpress-cli.rb <