From fcf1e4cdd45a5abc9ba52c866d3610cc1e16f2fa Mon Sep 17 00:00:00 2001 From: Sakshar Dhawan Date: Tue, 7 Apr 2026 02:58:14 +0530 Subject: [PATCH] feat(brew): add Homebrew formula for macOS installation - Create Formula/aict.rb with architecture detection (arm64/amd64) - Support both macOS and Linux via Homebrew/Linuxbrew - Install both aict and aict-mcp binaries - Include bash and zsh shell completions - Update CI release job to produce per-platform .tar.gz archives - Add update-brew CI job to auto-update tap on new tags - Add Homebrew installation instructions to README.md Closes #2 --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ Formula/aict.rb | 40 ++++++++++++++++++++++++++++++++++++++++ README.md | 14 +++++++++++++- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 Formula/aict.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6861967..151d97a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,6 +121,27 @@ jobs: done done + - name: Create platform tarballs + run: | + TAG=${{ steps.get_tag.outputs.TAG }} + for os in linux darwin windows; do + for arch in amd64 arm64; do + ext="" + if [ "$os" = "windows" ]; then + ext=".exe" + fi + staging="aict-${TAG}-${os}-${arch}" + mkdir -p "$staging/completions" + cp "aict-${os}-${arch}${ext}" "$staging/aict${ext}" + cp "aict-mcp-${os}-${arch}${ext}" "$staging/aict-mcp${ext}" + cp completions/aict.bash "$staging/completions/" + cp completions/aict.zsh "$staging/completions/" + cp LICENSE "$staging/" + tar czf "releases/aict-${TAG}-${os}-${arch}.tar.gz" "$staging" + rm -rf "$staging" + done + done + - name: Create checksums run: | cd releases @@ -183,3 +204,20 @@ jobs: name: releases path: releases/ retention-days: 30 + + # Update Homebrew tap formula on new releases + update-brew: + needs: [release] + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Update Homebrew formula + uses: mislav/bump-homebrew-formula-action@v3 + with: + formula-name: aict + homebrew-tap: synseqack/homebrew-aict + download-url: https://github.com/synseqack/aict/releases/download/${{ github.ref_name }}/aict-${{ github.ref_name }}-darwin-arm64.tar.gz + env: + COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} diff --git a/Formula/aict.rb b/Formula/aict.rb new file mode 100644 index 0000000..25b3965 --- /dev/null +++ b/Formula/aict.rb @@ -0,0 +1,40 @@ +# typed: false +# frozen_string_literal: true + +class Aict < Formula + desc "CLI tools with XML/JSON output for AI agents" + homepage "https://github.com/synseqack/aict" + version "1.0.3" + license "MIT" + + on_macos do + if Hardware::CPU.arm? + url "https://github.com/synseqack/aict/releases/download/v#{version}/aict-v#{version}-darwin-arm64.tar.gz" + sha256 "PLACEHOLDER" + elsif Hardware::CPU.intel? + url "https://github.com/synseqack/aict/releases/download/v#{version}/aict-v#{version}-darwin-amd64.tar.gz" + sha256 "PLACEHOLDER" + end + end + + on_linux do + if Hardware::CPU.arm? + url "https://github.com/synseqack/aict/releases/download/v#{version}/aict-v#{version}-linux-arm64.tar.gz" + sha256 "PLACEHOLDER" + elsif Hardware::CPU.intel? + url "https://github.com/synseqack/aict/releases/download/v#{version}/aict-v#{version}-linux-amd64.tar.gz" + sha256 "PLACEHOLDER" + end + end + + def install + bin.install "aict" + bin.install "aict-mcp" + bash_completion.install "completions/aict.bash" => "aict" + zsh_completion.install "completions/aict.zsh" => "_aict" + end + + test do + assert_match "aict", shell_output("#{bin}/aict --help") + end +end diff --git a/README.md b/README.md index f3a29ee..d9177f8 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,24 @@ Every field is labeled. Paths are absolute. Timestamps are Unix integers. Langua ## Install +### Homebrew (macOS) + +```bash +brew tap synseqack/aict +brew install aict +``` + +This installs both `aict` and `aict-mcp` binaries, plus shell completions for bash and zsh. + +### Go Install + ``` go install github.com/synseqack/aict@latest go install github.com/synseqack/aict/cmd/mcp@latest ``` -Or build from source: +### Build from Source + ``` git clone https://github.com/synseqack/aict cd aict