Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,84 @@ jobs:
artifacts/opencli-rs-*.zip
artifacts/opencli-rs-chrome-extension.zip
artifacts/SHA256SUMS.txt

update-homebrew:
name: Update Homebrew Formula
needs: [release]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: opencli-rs-*
path: artifacts
merge-multiple: true

- name: Checkout Homebrew tap
uses: actions/checkout@v4
with:
repository: nashsu/homebrew-opencli-rs
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
path: homebrew-tap

- name: Update formula
run: |
VERSION="${GITHUB_REF_NAME#v}"
RELEASE_URL_BASE="https://github.com/nashsu/opencli-rs/releases/download/v${VERSION}"
SHA_MACOS_ARM=$(sha256sum artifacts/opencli-rs-aarch64-apple-darwin.tar.gz | awk '{print $1}')
SHA_MACOS_INTEL=$(sha256sum artifacts/opencli-rs-x86_64-apple-darwin.tar.gz | awk '{print $1}')
SHA_LINUX_ARM=$(sha256sum artifacts/opencli-rs-aarch64-unknown-linux-musl.tar.gz | awk '{print $1}')
SHA_LINUX_INTEL=$(sha256sum artifacts/opencli-rs-x86_64-unknown-linux-musl.tar.gz | awk '{print $1}')

mkdir -p homebrew-tap/Formula
cat > homebrew-tap/Formula/opencli-rs.rb <<FORMULA
class OpencliRs < Formula
desc "AI-powered CLI for fetching information from any website"
homepage "https://github.com/nashsu/opencli-rs"
version "${VERSION}"
license "Apache-2.0"

on_macos do
on_arm do
url "${RELEASE_URL_BASE}/opencli-rs-aarch64-apple-darwin.tar.gz"
sha256 "${SHA_MACOS_ARM}"
end
on_intel do
url "${RELEASE_URL_BASE}/opencli-rs-x86_64-apple-darwin.tar.gz"
sha256 "${SHA_MACOS_INTEL}"
end
end

on_linux do
on_arm do
url "${RELEASE_URL_BASE}/opencli-rs-aarch64-unknown-linux-musl.tar.gz"
sha256 "${SHA_LINUX_ARM}"
end
on_intel do
url "${RELEASE_URL_BASE}/opencli-rs-x86_64-unknown-linux-musl.tar.gz"
sha256 "${SHA_LINUX_INTEL}"
end
end

def install
bin.install "opencli-rs"
end

test do
assert_match version.to_s, shell_output("#{bin}/opencli-rs --version")
end
end
FORMULA

echo "Updated formula to version ${VERSION}"
cat homebrew-tap/Formula/opencli-rs.rb

- name: Commit and push to tap
run: |
cd homebrew-tap
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Formula/opencli-rs.rb
git diff --cached --quiet && echo "No changes" && exit 0
git commit -m "Update opencli-rs to ${GITHUB_REF_NAME}"
git push
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/opencli
test-results*.md
twitter-downloads/
CLAUDE.md
.DS_Store
7 changes: 7 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
## インストール
> **ファイルは1つだけ、ダウンロードすればすぐ使えます。** Node.js、Python やその他のランタイムは不要、PATH に配置するだけで実行可能。

### Homebrew(macOS / Linux)

```bash
brew tap nashsu/opencli-rs
brew install opencli-rs
```

### ワンライナーインストールスクリプト(macOS / Linux)

```bash
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ A **complete rewrite in pure Rust** based on [OpenCLI](https://github.com/jackwe
## Installation
> **Just one file, download and use.** No Node.js, Python, or any runtime needed — just put it in your PATH and go.

### Homebrew (macOS / Linux)

```bash
brew tap nashsu/opencli-rs
brew install opencli-rs
```

### One-line Install Script (macOS / Linux)

```bash
Expand Down
7 changes: 7 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
## 安装
> **只有一个文件,下载即可使用。** 无需 Node.js、Python 或任何运行时,放到 PATH 里就能跑。

### Homebrew(macOS / Linux)

```bash
brew tap nashsu/opencli-rs
brew install opencli-rs
```

### 一键安装脚本(macOS / Linux)

```bash
Expand Down