From d25d415a7284f9e24641a8607ff9c8597505d581 Mon Sep 17 00:00:00 2001 From: raullenchai Date: Tue, 26 May 2026 19:13:10 -0700 Subject: [PATCH] chore: fix --json doc accuracy + bump CI actions to Node 24 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (1) Docs accuracy: README + module docstring said "every command accepts --json", but init/logout/keys delete/pay don't. Reworded to "data commands" (matches the /docs/cli site copy). Doc-only — reaches PyPI on the next release. (2) GitHub Actions Node 20 deprecation (forced to Node 24 on 2026-06-02, removed 2026-09-16): bump checkout v4->v6, setup-python v5->v6, upload-artifact v4->v7, download-artifact v4->v8, repository-dispatch v3->v4. Our inputs (python-version, name/path, token/event-type/ client-payload, bare checkout) are unchanged across these majors. gh-action-pypi-publish is a composite action (not Node-20), left at release/v1. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish.yml | 10 +++++----- README.md | 4 ++-- src/quicksilverpro/cli.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bce972..b8a0231 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ jobs: matrix: python: ["3.9", "3.11", "3.13"] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} - name: Install diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1965a3a..5437a00 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,8 +11,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: python-version: "3.13" @@ -25,7 +25,7 @@ jobs: run: python -m build - name: Upload build artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: dist path: dist/ @@ -36,7 +36,7 @@ jobs: environment: pypi steps: - name: Download build artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: dist path: dist/ @@ -79,7 +79,7 @@ jobs: echo "Resolved: $URL (sha256: $SHA256)" - name: Dispatch formula update to homebrew tap - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.HOMEBREW_TAP_TOKEN }} repository: machinefi/homebrew-qspro diff --git a/README.md b/README.md index f92c1c5..1981180 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ `qsp` — a command-line client for [QuickSilver Pro](https://quicksilverpro.io), one OpenAI-compatible API for top LLMs (DeepSeek, Qwen, Kimi, Gemini) **and** FLUX text-to-image — billed to a single balance. Open-source chat models run 20% below OpenRouter / Together / Fireworks. -Designed to be **AI-agent friendly**: every command accepts `--json` for structured output, exit codes are reliable, and the API surface is intentionally small. +Designed to be **AI-agent friendly**: data commands accept `--json` for structured output, exit codes are reliable, and the API surface is intentionally small. --- @@ -65,7 +65,7 @@ qsp status # live per-model latency ## AI-agent usage -Every command supports `--json` and prints OpenAI-shaped JSON to stdout with errors on stderr. +Data commands (`chat`, `image`, `models`, `balance`, `usage`, `status`, `keys list`/`create`, `whoami`) support `--json` and print OpenAI-shaped JSON to stdout with errors on stderr. ```bash qsp models --json | jq '.[].id' diff --git a/src/quicksilverpro/cli.py b/src/quicksilverpro/cli.py index f3ffa20..7ae72b4 100644 --- a/src/quicksilverpro/cli.py +++ b/src/quicksilverpro/cli.py @@ -2,7 +2,7 @@ Design goals: 1. Drop-in OpenAI-compatible thin wrapper: `qsp chat "..."` works immediately. - 2. AI-agent friendly: every command accepts `--json` and emits structured + 2. AI-agent friendly: data commands accept `--json` and emit structured output on stdout with errors on stderr and non-zero exit codes on failure. 3. No config surprises: API key lives in `~/.config/quicksilverpro/config.json` (or `$QSP_CONFIG_DIR`); the `QSP_API_KEY` env var overrides.