Skip to content

Commit f9931e6

Browse files
davideulerclaude
andcommitted
Add Homebrew tap, binary install instructions, and Chinese README
- Add homebrew-tap/ formula for davideuler/homebrew-cortex-auth tap - Add .github/workflows/update-homebrew-tap.yml to auto-update formula on release - Add README.zh-CN.md (Chinese README) - Add brew tap install instructions and direct download table to README.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 035d235 commit f9931e6

5 files changed

Lines changed: 163 additions & 4 deletions

File tree

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Update Homebrew Tap
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
update-tap:
9+
name: Update homebrew-cortex-auth formula
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Compute SHA256 for macOS tarballs
13+
id: sha
14+
env:
15+
VERSION: ${{ github.ref_name }}
16+
GH_REPO: ${{ github.repository }}
17+
run: |
18+
BASE="https://github.com/${GH_REPO}/releases/download/${VERSION}"
19+
20+
AARCH64_FILE="cortex-auth-${VERSION}-aarch64-apple-darwin.tar.gz"
21+
X86_64_FILE="cortex-auth-${VERSION}-x86_64-apple-darwin.tar.gz"
22+
23+
curl -fLO "${BASE}/${AARCH64_FILE}"
24+
curl -fLO "${BASE}/${X86_64_FILE}"
25+
26+
echo "aarch64=$(sha256sum ${AARCH64_FILE} | awk '{print $1}')" >> "$GITHUB_OUTPUT"
27+
echo "x86_64=$(sha256sum ${X86_64_FILE} | awk '{print $1}')" >> "$GITHUB_OUTPUT"
28+
echo "version=${VERSION#v}" >> "$GITHUB_OUTPUT"
29+
30+
- name: Checkout homebrew tap
31+
uses: actions/checkout@v4
32+
with:
33+
repository: davideuler/homebrew-cortex-auth
34+
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
35+
path: tap
36+
37+
- name: Update formula
38+
env:
39+
VERSION: ${{ steps.sha.outputs.version }}
40+
SHA_AARCH64: ${{ steps.sha.outputs.aarch64 }}
41+
SHA_X86_64: ${{ steps.sha.outputs.x86_64 }}
42+
run: |
43+
FORMULA="tap/Formula/cortex-auth.rb"
44+
45+
sed -i "s|version \".*\"|version \"${VERSION}\"|" "$FORMULA"
46+
sed -i "s|sha256 \"PLACEHOLDER_AARCH64_APPLE_DARWIN_SHA256\"|sha256 \"${SHA_AARCH64}\"|" "$FORMULA"
47+
sed -i "s|sha256 \"PLACEHOLDER_X86_64_APPLE_DARWIN_SHA256\"|sha256 \"${SHA_X86_64}\"|" "$FORMULA"
48+
49+
# For subsequent releases, replace the previous SHA values too
50+
python3 - <<'EOF'
51+
import re, os
52+
53+
formula = open("tap/Formula/cortex-auth.rb").read()
54+
55+
ver = os.environ["VERSION"]
56+
sha_arm = os.environ["SHA_AARCH64"]
57+
sha_x86 = os.environ["SHA_X86_64"]
58+
59+
# Update version
60+
formula = re.sub(r'version "[^"]+"', f'version "{ver}"', formula)
61+
62+
# Update sha256 values — first occurrence is arm, second is x86_64
63+
sha_pattern = re.compile(r'(sha256 ")[^"]+(")')
64+
occurrences = list(sha_pattern.finditer(formula))
65+
if len(occurrences) >= 2:
66+
# Replace from end to avoid offset shifts
67+
formula = formula[:occurrences[1].start()] + f'sha256 "{sha_x86}"' + formula[occurrences[1].end():]
68+
formula = formula[:occurrences[0].start()] + f'sha256 "{sha_arm}"' + formula[occurrences[0].end():]
69+
70+
open("tap/Formula/cortex-auth.rb", "w").write(formula)
71+
print(formula)
72+
EOF
73+
74+
- name: Commit and push
75+
working-directory: tap
76+
env:
77+
VERSION: ${{ steps.sha.outputs.version }}
78+
run: |
79+
git config user.name "github-actions[bot]"
80+
git config user.email "github-actions[bot]@users.noreply.github.com"
81+
git add Formula/cortex-auth.rb
82+
git diff --cached --quiet || git commit -m "cortex-auth ${VERSION}"
83+
git push

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ A lightweight, Rust-based secrets vault designed for AI agents and automated pip
66

77
## Installation
88

9-
Download pre-built binaries from the [GitHub Releases](https://github.com/your-org/cortex-auth/releases) page.
9+
### Homebrew (macOS)
10+
11+
```bash
12+
brew tap davideuler/cortex-auth
13+
brew install cortex-auth
14+
```
15+
16+
### Direct download
17+
18+
Download pre-built binaries from the [GitHub Releases](https://github.com/davideuler/CortexAuth/releases) page.
1019

1120
### Quick install (Linux / macOS)
1221

@@ -23,7 +32,7 @@ case "$(uname -s)-$(uname -m)" in
2332
esac
2433

2534
ARCHIVE="cortex-auth-${VERSION}-${TARGET}"
26-
curl -fLO "https://github.com/your-org/cortex-auth/releases/download/${VERSION}/${ARCHIVE}.tar.gz"
35+
curl -fLO "https://github.com/davideuler/CortexAuth/releases/download/${VERSION}/${ARCHIVE}.tar.gz"
2736
tar xzf "${ARCHIVE}.tar.gz"
2837
sudo mv "${ARCHIVE}/cortex-server" "${ARCHIVE}/cortex-cli" /usr/local/bin/
2938
rm -rf "${ARCHIVE}" "${ARCHIVE}.tar.gz"

README.zh-CN.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66

77
## 安装
88

9-
[GitHub Releases](https://github.com/your-org/cortex-auth/releases) 页面下载预编译的二进制文件。
9+
### Homebrew(macOS)
10+
11+
```bash
12+
brew tap davideuler/cortex-auth
13+
brew install cortex-auth
14+
```
15+
16+
### 直接下载
17+
18+
[GitHub Releases](https://github.com/davideuler/CortexAuth/releases) 页面下载预编译的二进制文件。
1019

1120
### 一键安装(Linux / macOS)
1221

@@ -23,7 +32,7 @@ case "$(uname -s)-$(uname -m)" in
2332
esac
2433

2534
ARCHIVE="cortex-auth-${VERSION}-${TARGET}"
26-
curl -fLO "https://github.com/your-org/cortex-auth/releases/download/${VERSION}/${ARCHIVE}.tar.gz"
35+
curl -fLO "https://github.com/davideuler/CortexAuth/releases/download/${VERSION}/${ARCHIVE}.tar.gz"
2736
tar xzf "${ARCHIVE}.tar.gz"
2837
sudo mv "${ARCHIVE}/cortex-server" "${ARCHIVE}/cortex-cli" /usr/local/bin/
2938
rm -rf "${ARCHIVE}" "${ARCHIVE}.tar.gz"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
class CortexAuth < Formula
2+
desc "Agent-centric secrets vault: store API keys and inject them at runtime"
3+
homepage "https://github.com/davideuler/CortexAuth"
4+
version "0.1.1"
5+
license "MIT"
6+
7+
on_macos do
8+
on_arm do
9+
url "https://github.com/davideuler/CortexAuth/releases/download/v#{version}/cortex-auth-v#{version}-aarch64-apple-darwin.tar.gz"
10+
sha256 "PLACEHOLDER_AARCH64_APPLE_DARWIN_SHA256"
11+
end
12+
on_intel do
13+
url "https://github.com/davideuler/CortexAuth/releases/download/v#{version}/cortex-auth-v#{version}-x86_64-apple-darwin.tar.gz"
14+
sha256 "PLACEHOLDER_X86_64_APPLE_DARWIN_SHA256"
15+
end
16+
end
17+
18+
def install
19+
bin.install "cortex-server"
20+
bin.install "cortex-cli"
21+
end
22+
23+
test do
24+
# cortex-server requires env vars to start; just verify the binary exists and exits cleanly
25+
assert_predicate bin/"cortex-server", :exist?
26+
assert_predicate bin/"cortex-cli", :exist?
27+
system bin/"cortex-cli", "gen-token", "--help"
28+
end
29+
end

homebrew-tap/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# homebrew-cortex-auth
2+
3+
Homebrew tap for [CortexAuth](https://github.com/davideuler/CortexAuth) — an agent-centric secrets vault for AI agents and automated pipelines.
4+
5+
## Install
6+
7+
```bash
8+
brew tap davideuler/cortex-auth
9+
brew install cortex-auth
10+
```
11+
12+
This installs two binaries: `cortex-server` and `cortex-cli`.
13+
14+
## Upgrade
15+
16+
```bash
17+
brew upgrade cortex-auth
18+
```
19+
20+
## Uninstall
21+
22+
```bash
23+
brew uninstall cortex-auth
24+
brew untap davideuler/cortex-auth
25+
```
26+
27+
## Usage
28+
29+
See the [main repository](https://github.com/davideuler/CortexAuth) for full documentation.

0 commit comments

Comments
 (0)