Skip to content

build(install): install.sh, Nix package, binstall metadata, Homebrew formula generator (OB6) - #139

Merged
lg2m merged 4 commits into
mainfrom
feat/eng-880-install-paths
Sep 23, 2026
Merged

lg2m merged 4 commits into
mainfrom
feat/eng-880-install-paths

Conversation

@lg2m

@lg2m lg2m commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

OB6: one install command per platform — install.sh, Nix package, binstall, Homebrew formula generator

Spec: docs/plans/onboarding-ux.md#ob6 Linear: ENG-880 (parent ENG-875)

What changes for users

  • curl -fsSL https://raw.githubusercontent.com/retsu-AI/qq/main/install.sh | sh — POSIX sh, detects OS/arch, resolves the latest release (GitHub API with a redirect fallback), verifies SHA256SUMS, installs to ~/.local/bin (--dir, QQ_INSTALL_DIR), pins with --version/QQ_VERSION, never sudo, prints the PATH line for your shell (fish gets fish_add_path). Verified live against v0.1.3 from this host.
  • nix run github:retsu-AI/qq / nix profile install github:retsu-AI/qq — packages.qq, packages.default, apps.default. nix build .#qq verified (138 s; result/bin/qq --version embeds the rev).
  • cargo binstall --git https://github.com/retsu-AI/qq qq — [package.metadata.binstall] matching the real archive layout (qq-vX-<target>/qq); dry-run fetches the real v0.1.3 archive. Documented with --git because plain cargo binstall qq resolves a different crates.io crate.
  • brew install retsu-ai/qq/qq — cargo xtask homebrew-formula --version X --sums SHA256SUMS renders the formula; a guarded homebrew release job pushes Formula/qq.rb to retsu-AI/homebrew-qq when HOMEBREW_TAP_TOKEN is set. The tap does not exist yet, so the guide says "available once the tap repository is published".
  • README § Install and docs/guide/install.md lead with these; the manual archive route remains.

How verified

  • bash tests/install_sh.sh (17 checks against a local http.server fixture via QQ_RELEASE_BASE_URL: install, --dir, env override, v-prefixed version, PATH hint bash/fish, no hint when on PATH, tampered checksum → exit 1 and nothing installed, unknown version, bad arg, --help); wired into CI. shellcheck -s sh clean; parses under dash.
  • xtask: 4 renderer tests; real v0.1.3 output passes ruby -c.
  • fmt, clippy, cargo test --workspace (1730 passed), nix flake check --no-build, nix build .#qq.

Notes for review

  • [workspace.package].repository was https://github.com/lg2m/qq (a fork); changed to retsu-AI/qq — binstall needs it and qq --version metadata should point at the canonical repo. Root-file edit, flagged here.
  • Nix: no git deps in Cargo.lock (no outputHashes); nativeBuildInputs = [cmake pkg-config] with dontUseCmakeConfigure for aws-lc-sys; doCheck = false (documented) with an installCheckPhase on --version.
  • The raw install URL and nix run github:… only work once this merges to main.

One-time setup after merge

Create retsu-AI/homebrew-qq, add a fine-grained PAT (Contents: write) as HOMEBREW_TAP_TOKEN, then re-run the homebrew job or cut the next release (docs/runbooks/release.md § Homebrew tap).

Compatibility

No protocol/schema change.

@lg2m
lg2m force-pushed the feat/eng-880-install-paths branch from 80e8ccf to a9c7233 Compare September 23, 2026 04:05
…re test

POSIX `curl … | sh` installer: detects the target, resolves the latest
release (API, redirect fallback), verifies SHA256SUMS, installs to
~/.local/bin without sudo, prints the PATH hint per shell.
tests/install_sh.sh drives it against a local http.server fixture and runs
in CI. OB6 / ENG-880.
buildRustPackage on the pinned toolchain; `nix run github:retsu-AI/qq`
runs qq. Tests are skipped in the package (CI covers them); the install
check asserts `qq --version`. OB6 / ENG-880.
`[package.metadata.binstall]` points at the release archives; `repository`
now names retsu-AI/qq (binstall derives `{ repo }` from it; it pointed at a
fork). `cargo xtask homebrew-formula` renders Formula/qq.rb from SHA256SUMS
and the release workflow pushes it to retsu-AI/homebrew-qq when
HOMEBREW_TAP_TOKEN is set, skipping otherwise. OB6 / ENG-880.
Install guide rewritten per route with pinning and verification; README
install section; release runbook covers the tap setup and install.sh
constraints; OB6 ledger entry. OB6 / ENG-880.
@lg2m
lg2m force-pushed the feat/eng-880-install-paths branch from a9c7233 to bc5e9cf Compare September 23, 2026 04:25
@lg2m
lg2m merged commit 5731447 into main Sep 23, 2026
4 checks passed
@lg2m
lg2m deleted the feat/eng-880-install-paths branch September 23, 2026 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant