Skip to content

Commit e9c31b2

Browse files
committed
Add homebrew installation method
1 parent 1222c72 commit e9c31b2

3 files changed

Lines changed: 96 additions & 0 deletions

File tree

HomebrewFormula/clive.rb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
class Clive < Formula
2+
desc "macOS menu bar app that displays Claude Code usage statistics at a glance"
3+
homepage "https://github.com/StuartCameronCode/clive"
4+
url "https://github.com/StuartCameronCode/clive/releases/download/v1.0.6/Clive-1.0.6.zip"
5+
version "1.0.6"
6+
sha256 "9d70de26bd1930ee118515de97c035f73a69027ea26f0418344686e2340a2266"
7+
8+
depends_on :macos
9+
10+
def install
11+
prefix.install "Clive.app"
12+
end
13+
14+
def caveats
15+
<<~EOS
16+
Clive has been installed to:
17+
#{prefix}/Clive.app
18+
19+
To use Clive, you can either:
20+
1. Open it directly: open #{prefix}/Clive.app
21+
2. Create a symlink to /Applications:
22+
ln -s #{prefix}/Clive.app /Applications/Clive.app
23+
24+
Note: Clive requires the Claude Code CLI to be installed at:
25+
/opt/homebrew/bin/claude
26+
27+
You can add Clive to Login Items in System Settings to start it automatically.
28+
EOS
29+
end
30+
31+
test do
32+
assert_predicate prefix/"Clive.app/Contents/MacOS/clive", :exist?
33+
end
34+
end

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,28 @@ Honestly, I vibe coded this thing in the space of an hour. It works for me, hope
3434

3535
Just extrat the app and drag & drop to your Applications folder.
3636

37+
### 3. Install via Homebrew
38+
```bash
39+
brew install https://raw.githubusercontent.com/StuartCameronCode/clive/main/HomebrewFormula/clive.rb
40+
```
41+
42+
After installation, you can open Clive with:
43+
```bash
44+
open $(brew --prefix)/Clive.app
45+
```
46+
47+
Or create a symlink to Applications:
48+
```bash
49+
ln -s $(brew --prefix)/Clive.app /Applications/Clive.app
50+
```
51+
52+
To upgrade to a newer version:
53+
```bash
54+
brew upgrade clive
55+
```
56+
57+
> **Note:** Once you create the symlink, it automatically points to the latest version after upgrades—no need to recreate it.
58+
3759
## Usage
3860

3961
Once running, Clive appears in your menu bar showing your Claude Code usage. Click the icon to see:

update_clive_sha256.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
# Script to update clive.rb Homebrew formula with new version and SHA256 hash
4+
# Usage: ./update_clive_sha256.sh <version>
5+
6+
set -e
7+
8+
if [ $# -eq 0 ]; then
9+
echo "Error: Version argument required"
10+
echo "Usage: $0 <version>"
11+
echo "Example: $0 1.0.6"
12+
exit 1
13+
fi
14+
15+
VERSION="$1"
16+
FORMULA_FILE="HomebrewFormula/clive.rb"
17+
GITHUB_URL="https://github.com/StuartCameronCode/clive/releases/download/v${VERSION}/Clive-${VERSION}.zip"
18+
19+
echo "Calculating SHA256 for version ${VERSION}..."
20+
SHA256=$(curl -sL "${GITHUB_URL}" | shasum -a 256 | awk '{print $1}')
21+
22+
if [ -z "$SHA256" ]; then
23+
echo "Error: Failed to calculate SHA256. Please verify the version exists."
24+
exit 1
25+
fi
26+
27+
echo "SHA256: ${SHA256}"
28+
echo "Updating ${FORMULA_FILE}..."
29+
30+
# Update version
31+
sed -i '' "s/version \".*\"/version \"${VERSION}\"/" "${FORMULA_FILE}"
32+
33+
# Update URL
34+
sed -i '' "s|url \".*\"|url \"${GITHUB_URL}\"|" "${FORMULA_FILE}"
35+
36+
# Update SHA256
37+
sed -i '' "s/sha256 \".*\"/sha256 \"${SHA256}\"/" "${FORMULA_FILE}"
38+
39+
echo "Successfully updated ${FORMULA_FILE} with version ${VERSION} and SHA256 ${SHA256}"
40+

0 commit comments

Comments
 (0)