From 5a97267e531ad3b9248604d35024a96fc5f3d365 Mon Sep 17 00:00:00 2001 From: Andrea Collet Date: Sat, 28 Nov 2026 04:27:03 +0100 Subject: [PATCH] ci: smoke-test Linux/macOS/Windows builds; downloads and requirements in README and Pages Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/ci.yml | 12 +++++++++ .github/workflows/release.yml | 8 ++++-- CHANGELOG.md | 12 +++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 47 +++++++++++++++++++++++++++++++++-- docs/index.html | 35 +++++++++++++++++++++++--- scripts/smoke | 33 ++++++++++++++++++++++++ 8 files changed, 142 insertions(+), 9 deletions(-) create mode 100755 scripts/smoke diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09d5651..1001e06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,3 +13,15 @@ jobs: - uses: actions/checkout@v7 - run: rustup update stable --no-self-update - run: bash scripts/verify + # Build the release binary and smoke-test it on each OS we ship for. Offline: never calls Hinge. + smoke: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v7 + - run: rustup update stable --no-self-update + - run: cargo build --release --locked + - run: bash scripts/smoke diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4491d05..0ab3757 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,15 +52,19 @@ jobs: - uses: actions/checkout@v7 - run: rustup target add ${{ matrix.target }} - run: cargo build --release --locked --target ${{ matrix.target }} + - name: smoke test the binary + if: matrix.target != 'x86_64-apple-darwin' # Intel build is cross-compiled on an arm64 runner + run: bash scripts/smoke target/${{ matrix.target }}/release/hinge + shell: bash - name: package (unix) if: matrix.archive == 'tar.gz' run: | cd target/${{ matrix.target }}/release - tar czf "$GITHUB_WORKSPACE/hinge-${{ needs.version.outputs.tag }}-${{ matrix.target }}.tar.gz" hinge + tar czf "$GITHUB_WORKSPACE/hinge-${{ matrix.target }}.tar.gz" hinge - name: package (windows) if: matrix.archive == 'zip' shell: pwsh - run: Compress-Archive -Path "target/${{ matrix.target }}/release/hinge.exe" -DestinationPath "hinge-${{ needs.version.outputs.tag }}-${{ matrix.target }}.zip" + run: Compress-Archive -Path "target/${{ matrix.target }}/release/hinge.exe" -DestinationPath "hinge-${{ matrix.target }}.zip" - uses: actions/upload-artifact@v4 with: name: hinge-${{ matrix.target }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e7c90d..0787dda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ rather than editing several version sources by hand. Format: [Keep a Changelog]( ## [Unreleased] +## [0.2.5] - 2026-11-28 +### Added +- CI `smoke` job: builds the release binary and smoke-tests it (`scripts/smoke`: version, help, offline + auth import/logout, secret env://) on Ubuntu, macOS and Windows. The Release workflow runs the same + smoke test on each binary it ships (except the cross-compiled Intel macOS one). +- README and GitHub Pages: latest-version download links for the three OSes, alternative install + routes (`cargo install --git`, from source), and software and hardware requirements. +### Changed +- Release assets now have version-less names (`hinge-.tar.gz|zip`) so + `releases/latest/download/...` links stay stable. Links work from the next release on; v0.2.2 keeps + its versioned names. + ## [0.2.4] - 2026-11-28 ### Fixed - GitHub Pages landing page still showed the old Node.js install (`npm install`, `hinge auth import`). It diff --git a/Cargo.lock b/Cargo.lock index aa7f708..fec112e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -360,7 +360,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hinge-cli" -version = "0.2.4" +version = "0.2.5" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 1c2b56b..9f55ec2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hinge-cli" -version = "0.2.4" +version = "0.2.5" edition = "2024" description = "Command-line client for your own Hinge account, built on its reverse-engineered HTTP API." license = "MIT" diff --git a/README.md b/README.md index 8c4d7c1..951b6eb 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,28 @@ non-goals (no bots, no bulk actions, no multi-account) live in [intent.md](inten auto-swipe, no bulk messaging, no multi-account support, and none planned (see [intent.md](intent.md#non-goals)). -## Quickstart +## Install + +### Download the latest version + +| OS | Download | +| --- | --- | +| Windows (x86_64) | [hinge-x86_64-pc-windows-msvc.zip](https://github.com/ifthenelse/hinge-cli/releases/latest/download/hinge-x86_64-pc-windows-msvc.zip) | +| macOS, Apple silicon | [hinge-aarch64-apple-darwin.tar.gz](https://github.com/ifthenelse/hinge-cli/releases/latest/download/hinge-aarch64-apple-darwin.tar.gz) | +| macOS, Intel | [hinge-x86_64-apple-darwin.tar.gz](https://github.com/ifthenelse/hinge-cli/releases/latest/download/hinge-x86_64-apple-darwin.tar.gz) | +| Linux (x86_64) | [hinge-x86_64-unknown-linux-gnu.tar.gz](https://github.com/ifthenelse/hinge-cli/releases/latest/download/hinge-x86_64-unknown-linux-gnu.tar.gz) | -Requires a Rust toolchain (1.85 or newer; install from [rustup.rs](https://rustup.rs)). +Unpack it and put `hinge` (`hinge.exe` on Windows) somewhere on your `PATH`. The macOS and Windows +binaries are unsigned, so your OS may ask you to confirm the first run. All versions and release +notes: [Releases](https://github.com/ifthenelse/hinge-cli/releases). + +### Other ways to install + +With [Rust](https://rustup.rs) installed (see requirements below): + +```sh +cargo install --git https://github.com/ifthenelse/hinge-cli # latest main, no clone needed +``` ```sh git clone https://github.com/ifthenelse/hinge-cli.git @@ -45,6 +64,30 @@ cargo build --release # binary: target/release/hinge cargo install --path . # optional: puts `hinge` on your PATH ``` +Use the source routes for platforms without a prebuilt binary (Linux or Windows on ARM, older Linux +distributions). The project is not published on crates.io. + +### Requirements + +**Software** +- Windows 10 or newer, macOS 11 or newer, or Linux with a recent glibc (the Linux binary is built on + Ubuntu 24.04; on older distributions build from source). +- Windows only: the [Microsoft Visual C++ Redistributable](https://learn.microsoft.com/cpp/windows/latest-supported-vs-redistributable-packages) + (already present on most systems). +- Building from source: [Rust](https://rustup.rs) 1.85 or newer, plus a C linker: Xcode Command Line + Tools (macOS), `build-essential` (Linux) or [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) (Windows). +- `hinge auth capture` only: [mitmproxy](https://mitmproxy.org) on the computer, and your phone with + the Hinge app on the same Wi-Fi network. +- `hinge doctor` and `hinge inspect` (optional developer commands only): an [Appium](https://appium.io) server. +- Internet access to `prod-api.hingeaws.net` over HTTPS. + +**Hardware** +- A 64-bit Intel/AMD computer (Windows, Linux) or an Apple silicon or Intel Mac. No other hardware + is needed to run it; your phone is only used once, for `hinge auth capture`. +- A few MB of disk for the binary (about 3 MB packed). Memory and CPU use are minimal; not benchmarked. + +## Quickstart + Then capture a session from your own device ([docs/auth.md](docs/auth.md)), import it, and check your account: diff --git a/docs/index.html b/docs/index.html index b37015e..9b35fe2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -32,14 +32,43 @@

An unofficial, read-only command-line client for your own Hinge account. Plain, disclosed, scoped.

-

Install

-

Download a prebuilt binary for macOS (Apple silicon or Intel), Linux (x86_64) or Windows (x86_64), unpack it and put hinge on your PATH. The macOS and Windows binaries are unsigned, so your OS may ask you to confirm the first run.

-

Or build from source with Rust 1.85 or newer:

+

Download the latest version

+ +

Unpack it and put hinge on your PATH. The macOS and Windows binaries are unsigned, so your OS may ask you to confirm the first run. All versions.

+
+ +
+

Other ways to install

+

With Rust installed:

+
cargo install --git https://github.com/ifthenelse/hinge-cli
+

or clone and build it yourself (also the route for Linux or Windows on ARM, and older Linux distributions):

git clone https://github.com/ifthenelse/hinge-cli.git
 cd hinge-cli
 cargo install --path .
+
+

Requirements

+

Software

+
    +
  • Windows 10+, macOS 11+, or Linux with a recent glibc (binary built on Ubuntu 24.04). Windows also needs the Visual C++ Redistributable (usually already installed).
  • +
  • Building from source: Rust 1.85+ and a C linker (Xcode Command Line Tools, build-essential, or Visual Studio Build Tools).
  • +
  • hinge auth capture: mitmproxy and a phone with the Hinge app on the same Wi-Fi.
  • +
  • Optional developer commands doctor/inspect: an Appium server.
  • +
  • HTTPS access to prod-api.hingeaws.net.
  • +
+

Hardware

+
    +
  • 64-bit Intel/AMD (Windows, Linux) or any Mac (Apple silicon or Intel).
  • +
  • About 3 MB of disk; memory and CPU use are minimal (not benchmarked). Your phone is only needed once, for capture.
  • +
+
+

Quickstart

hinge auth capture   # guided, one-time
diff --git a/scripts/smoke b/scripts/smoke
new file mode 100755
index 0000000..8354ab3
--- /dev/null
+++ b/scripts/smoke
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+# Smoke test for a built `hinge` binary, identical on Linux, macOS and Windows (Git Bash).
+# Offline only: nothing here talks to Hinge. Usage: scripts/smoke [path-to-binary]
+set -euo pipefail
+cd "$(dirname "$0")/.."
+bin="${1:-target/release/hinge}"
+[ -f "$bin" ] || bin="$bin.exe"
+[ -f "$bin" ] || { echo "smoke: binary not found: $1" >&2; exit 1; }
+
+tmp="$(mktemp -d)"
+command -v cygpath >/dev/null 2>&1 && tmp="$(cygpath -m "$tmp")" # native path for the Windows binary
+export HINGE_SESSION_FILE="$tmp/session.json"
+unset HINGE_SESSION_REF
+fail() { echo "smoke FAILED: $*" >&2; exit 1; }
+
+want="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
+[ "$("$bin" --version)" = "hinge $want" ] || fail "--version is not 'hinge $want'"
+"$bin" --help | grep -q "tier" || fail "--help does not list commands"
+
+err="$("$bin" auth status 2>&1)" && fail "auth status succeeded without a session"
+echo "$err" | grep -q "Not signed in" || fail "auth status gave the wrong error: $err"
+
+printf '{"headers":{"authorization":"Bearer SMOKE","user-agent":"x"}}' > "$tmp/in.json"
+"$bin" auth import "$tmp/in.json" >/dev/null
+[ -f "$HINGE_SESSION_FILE" ] || fail "auth import did not save the session"
+[ ! -e "$tmp/in.json" ] || fail "auth import did not delete the source file"
+grep -q "user-agent" "$HINGE_SESSION_FILE" && fail "session kept the user-agent header"
+"$bin" auth logout >/dev/null
+[ ! -e "$HINGE_SESSION_FILE" ] || fail "auth logout left the session behind"
+
+[ "$(SMOKE_SECRET=abc "$bin" --json secret env://SMOKE_SECRET)" = '{"ok":true,"length":3}' ] || fail "secret env:// output changed"
+rm -rf "$tmp"
+echo "smoke OK ($bin, $want)"