From 171ce587ae5a84943d83cfcd500d1e7ba1a04688 Mon Sep 17 00:00:00 2001 From: Anand Pant Date: Tue, 21 Apr 2026 03:38:07 -0500 Subject: [PATCH 1/2] fix: harden tabex homebrew formula --- Formula/tabex.rb | 14 +++++++++++++- README.md | 8 ++++++++ docs/setup.md | 8 ++++++++ scripts/update-tabex.sh | 14 +++++++++++++- scripts/validate-formulae.sh | 2 ++ 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/Formula/tabex.rb b/Formula/tabex.rb index d27162a..75bf2f6 100644 --- a/Formula/tabex.rb +++ b/Formula/tabex.rb @@ -79,7 +79,19 @@ def install bin.install "tabex" end + def caveats + <<~EOS + Tabex needs browser-profile and extension setup after install. + Start with: + tabex --help + + Follow the setup/control commands shown by your installed release. + EOS + end + test do - assert_match version.to_s, shell_output("#{bin}/tabex version") + output = shell_output("#{bin}/tabex --help") + assert_match "usage: tabex ", output + assert_match "network ", output end end diff --git a/README.md b/README.md index cb60b3b..c15e3eb 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,14 @@ HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew install shpitdev/tap/tabex HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew install shpitdev/tap/osyrra ``` +After `brew install shpitdev/tap/tabex`, start with: + +```bash +tabex --help +``` + +The formula caveat intentionally points at the installed release surface rather than assuming newer unreleased setup commands. + ## Current Limitation - Both formulae are macOS arm64 only. The upstream releases do not ship a `darwin_amd64` asset today; add one upstream and the updater scripts can gain an `on_intel` block. diff --git a/docs/setup.md b/docs/setup.md index beea781..8889a4c 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -84,6 +84,14 @@ For local `brew install shpitdev/tap/tabex`, the formula uses the same auth path - if none are set, it falls back to `gh auth token` - in headless environments, prefer `HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew install ...` +For `tabex`, the formula caveat currently points users at: + +```bash +tabex --help +``` + +That is intentional. The latest stable release should define the first-run surface; the tap should not assume newer unreleased setup commands until a new stable release is actually cut. + ## Package-Manager Install Behavior Both private formulae use install-side GitHub auth: diff --git a/scripts/update-tabex.sh b/scripts/update-tabex.sh index 2b9e94b..bf0c350 100755 --- a/scripts/update-tabex.sh +++ b/scripts/update-tabex.sh @@ -181,8 +181,20 @@ class Tabex < Formula bin.install "tabex" end + def caveats + <<~EOS + Tabex needs browser-profile and extension setup after install. + Start with: + tabex --help + + Follow the setup/control commands shown by your installed release. + EOS + end + test do - assert_match version.to_s, shell_output("#{bin}/tabex version") + output = shell_output("#{bin}/tabex --help") + assert_match "usage: tabex ", output + assert_match "network ", output end end EOF diff --git a/scripts/validate-formulae.sh b/scripts/validate-formulae.sh index 30dc7c2..4fdd1b8 100755 --- a/scripts/validate-formulae.sh +++ b/scripts/validate-formulae.sh @@ -13,6 +13,8 @@ if [[ -f "${tabex_formula}" ]]; then grep -q 'using: TabexGitHubReleaseDownloadStrategy' "${tabex_formula}" grep -q 'resolved_basename: "tabex_v' "${tabex_formula}" grep -q 'url "https://api.github.com/repos/shpitdev/tabex/releases/assets/' "${tabex_formula}" + grep -q 'shell_output("#{bin}/tabex --help")' "${tabex_formula}" + grep -q 'Tabex needs browser-profile and extension setup after install.' "${tabex_formula}" fi osyrra_formula="${repo_root}/Formula/osyrra.rb" From d70f2330c49dce8451fa3339a6ef05bf57c77b06 Mon Sep 17 00:00:00 2001 From: Anand Pant Date: Tue, 21 Apr 2026 03:43:28 -0500 Subject: [PATCH 2/2] chore: bump tabex formula to 0.0.4 --- Formula/tabex.rb | 24 +++++++++++++++--------- README.md | 4 ++-- docs/setup.md | 4 ++-- scripts/update-tabex.sh | 16 +++++++++++----- scripts/validate-formulae.sh | 4 +++- 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/Formula/tabex.rb b/Formula/tabex.rb index 75bf2f6..1177f47 100644 --- a/Formula/tabex.rb +++ b/Formula/tabex.rb @@ -62,16 +62,16 @@ def curl(*args, print_stdout: true, **options) class Tabex < Formula desc "Tabex CLI for browser session, capture, and page inspection" homepage "https://github.com/shpitdev/tabex" - version "0.0.3" + version "0.0.4" license :cannot_represent depends_on arch: :arm64 on_macos do on_arm do - url "https://api.github.com/repos/shpitdev/tabex/releases/assets/400657957", + url "https://api.github.com/repos/shpitdev/tabex/releases/assets/401429381", using: TabexGitHubReleaseDownloadStrategy, - resolved_basename: "tabex_v0.0.3_darwin_arm64.tar.gz" - sha256 "7c72aa51434c55f6bffbaaa6606883f5a45efce4f57e04ef02eb65ed9533439c" + resolved_basename: "tabex_v0.0.4_darwin_arm64.tar.gz" + sha256 "8e5bdf30d9a57d34fec3bbb8973041dd1f8df821325652d1d16f40083f98b666" end end @@ -83,15 +83,21 @@ def caveats <<~EOS Tabex needs browser-profile and extension setup after install. Start with: - tabex --help + tabex setup - Follow the setup/control commands shown by your installed release. + That saves browser config, installs or updates the managed Chrome extension locally, + and prints the Chrome load or refresh steps. EOS end test do - output = shell_output("#{bin}/tabex --help") - assert_match "usage: tabex ", output - assert_match "network ", output + require "json" + + payload = JSON.parse(shell_output("#{bin}/tabex --json")) + assert_equal "tabex", payload["command"] + assert_equal "tabex ", payload["usage"] + assert_equal "v#{version}", payload["version"] + assert_equal "docs/curated-e2e-examples.md", payload["curatedExamplesDoc"] + assert_equal "setup", payload["examples"].first["label"] end end diff --git a/README.md b/README.md index c15e3eb..1c6a5f2 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,10 @@ HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)" brew install shpitdev/tap/osyrra After `brew install shpitdev/tap/tabex`, start with: ```bash -tabex --help +tabex setup ``` -The formula caveat intentionally points at the installed release surface rather than assuming newer unreleased setup commands. +That saves browser config, installs or updates the managed Chrome extension locally, and prints the Chrome load or refresh steps. ## Current Limitation diff --git a/docs/setup.md b/docs/setup.md index 8889a4c..cacf701 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -87,10 +87,10 @@ For local `brew install shpitdev/tap/tabex`, the formula uses the same auth path For `tabex`, the formula caveat currently points users at: ```bash -tabex --help +tabex setup ``` -That is intentional. The latest stable release should define the first-run surface; the tap should not assume newer unreleased setup commands until a new stable release is actually cut. +That is intentional. `v0.0.4` is the first stable release that ships the source-repo-side `setup` flow, so the tap can now safely point users at the real first-run path instead of a generic help screen. ## Package-Manager Install Behavior diff --git a/scripts/update-tabex.sh b/scripts/update-tabex.sh index bf0c350..0844e3d 100755 --- a/scripts/update-tabex.sh +++ b/scripts/update-tabex.sh @@ -185,16 +185,22 @@ class Tabex < Formula <<~EOS Tabex needs browser-profile and extension setup after install. Start with: - tabex --help + tabex setup - Follow the setup/control commands shown by your installed release. + That saves browser config, installs or updates the managed Chrome extension locally, + and prints the Chrome load or refresh steps. EOS end test do - output = shell_output("#{bin}/tabex --help") - assert_match "usage: tabex ", output - assert_match "network ", output + require "json" + + payload = JSON.parse(shell_output("#{bin}/tabex --json")) + assert_equal "tabex", payload["command"] + assert_equal "tabex ", payload["usage"] + assert_equal "v#{version}", payload["version"] + assert_equal "docs/curated-e2e-examples.md", payload["curatedExamplesDoc"] + assert_equal "setup", payload["examples"].first["label"] end end EOF diff --git a/scripts/validate-formulae.sh b/scripts/validate-formulae.sh index 4fdd1b8..07076af 100755 --- a/scripts/validate-formulae.sh +++ b/scripts/validate-formulae.sh @@ -13,8 +13,10 @@ if [[ -f "${tabex_formula}" ]]; then grep -q 'using: TabexGitHubReleaseDownloadStrategy' "${tabex_formula}" grep -q 'resolved_basename: "tabex_v' "${tabex_formula}" grep -q 'url "https://api.github.com/repos/shpitdev/tabex/releases/assets/' "${tabex_formula}" - grep -q 'shell_output("#{bin}/tabex --help")' "${tabex_formula}" + grep -q 'shell_output("#{bin}/tabex --json")' "${tabex_formula}" + grep -q 'assert_equal "v#{version}", payload\["version"\]' "${tabex_formula}" grep -q 'Tabex needs browser-profile and extension setup after install.' "${tabex_formula}" + grep -q 'tabex setup' "${tabex_formula}" fi osyrra_formula="${repo_root}/Formula/osyrra.rb"