Skip to content

Commit 0e5f64b

Browse files
committed
Add homebrew installation method
1 parent 5b7aa94 commit 0e5f64b

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
@@ -49,6 +49,28 @@ Clive is just a hobby project and the releases are unsigned. You've got two opti
4949
3. Build and run (⌘R)
5050
4. Optionally, add to Login Items for auto-start
5151

52+
### 3. Install via Homebrew
53+
```bash
54+
brew install https://raw.githubusercontent.com/StuartCameronCode/clive/main/HomebrewFormula/clive.rb
55+
```
56+
57+
After installation, you can open Clive with:
58+
```bash
59+
open $(brew --prefix)/Clive.app
60+
```
61+
62+
Or create a symlink to Applications:
63+
```bash
64+
ln -s $(brew --prefix)/Clive.app /Applications/Clive.app
65+
```
66+
67+
To upgrade to a newer version:
68+
```bash
69+
brew upgrade clive
70+
```
71+
72+
> **Note:** Once you create the symlink, it automatically points to the latest version after upgrades—no need to recreate it.
73+
5274
## Usage
5375

5476
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)