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
34 changes: 34 additions & 0 deletions HomebrewFormula/clive.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class Clive < Formula
desc "macOS menu bar app that displays Claude Code usage statistics at a glance"
homepage "https://github.com/StuartCameronCode/clive"
url "https://github.com/StuartCameronCode/clive/releases/download/v1.0.6/Clive-1.0.6.zip"
version "1.0.6"
sha256 "9d70de26bd1930ee118515de97c035f73a69027ea26f0418344686e2340a2266"

depends_on :macos

def install
prefix.install "Clive.app"
end

def caveats
<<~EOS
Clive has been installed to:
#{prefix}/Clive.app

To use Clive, you can either:
1. Open it directly: open #{prefix}/Clive.app
2. Create a symlink to /Applications:
ln -s #{prefix}/Clive.app /Applications/Clive.app

Note: Clive requires the Claude Code CLI to be installed at:
/opt/homebrew/bin/claude

You can add Clive to Login Items in System Settings to start it automatically.
EOS
end

test do
assert_predicate prefix/"Clive.app/Contents/MacOS/clive", :exist?
end
end
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ Clive is just a hobby project and the releases are unsigned. You've got two opti
3. Build and run (⌘R)
4. Optionally, add to Login Items for auto-start

### 3. Install via Homebrew
```bash
brew install https://raw.githubusercontent.com/StuartCameronCode/clive/main/HomebrewFormula/clive.rb
```

After installation, you can open Clive with:
```bash
open $(brew --prefix)/Clive.app
```

Or create a symlink to Applications:
```bash
ln -s $(brew --prefix)/Clive.app /Applications/Clive.app
```

To upgrade to a newer version:
```bash
brew upgrade clive
```

> **Note:** Once you create the symlink, it automatically points to the latest version after upgrades—no need to recreate it.

## Usage

Once running, Clive appears in your menu bar showing your Claude Code usage. Click the icon to see:
Expand Down
40 changes: 40 additions & 0 deletions update_clive_sha256.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

# Script to update clive.rb Homebrew formula with new version and SHA256 hash
# Usage: ./update_clive_sha256.sh <version>

set -e

if [ $# -eq 0 ]; then
echo "Error: Version argument required"
echo "Usage: $0 <version>"
echo "Example: $0 1.0.6"
exit 1
fi

VERSION="$1"
FORMULA_FILE="HomebrewFormula/clive.rb"
GITHUB_URL="https://github.com/StuartCameronCode/clive/releases/download/v${VERSION}/Clive-${VERSION}.zip"

echo "Calculating SHA256 for version ${VERSION}..."
SHA256=$(curl -sL "${GITHUB_URL}" | shasum -a 256 | awk '{print $1}')

if [ -z "$SHA256" ]; then
echo "Error: Failed to calculate SHA256. Please verify the version exists."
exit 1
fi

echo "SHA256: ${SHA256}"
echo "Updating ${FORMULA_FILE}..."

# Update version
sed -i '' "s/version \".*\"/version \"${VERSION}\"/" "${FORMULA_FILE}"

# Update URL
sed -i '' "s|url \".*\"|url \"${GITHUB_URL}\"|" "${FORMULA_FILE}"

# Update SHA256
sed -i '' "s/sha256 \".*\"/sha256 \"${SHA256}\"/" "${FORMULA_FILE}"

echo "Successfully updated ${FORMULA_FILE} with version ${VERSION} and SHA256 ${SHA256}"