clacky-ai--openclacky
Homebrew Formula for OpenClacky
This directory contains the Homebrew formula for OpenClacky.
For Maintainers: Publishing to Homebrew Tap
One-time Setup
- Create a GitHub repository named
homebrew-openclacky(must start withhomebrew-) - Push this formula to the repository
# In your GitHub account, create: homebrew-openclacky
git clone https://github.com/YOUR_USERNAME/homebrew-openclacky.git
cd homebrew-openclacky
cp /path/to/openclacky/homebrew/openclacky.rb ./Formula/openclacky.rb
git add Formula/openclacky.rb
git commit -m "Add openclacky formula"
git push origin main
Update Formula for New Release
When you release a new version:
- Download the new gem and calculate SHA256:
VERSION=0.6.1
wget https://rubygems.org/downloads/openclacky-${VERSION}.gem
shasum -a 256 openclacky-${VERSION}.gem
- Update the formula in
homebrew-openclackyrepository:
- Update
urlwith new version - Update
sha256with calculated hash - Commit and push
- Users can then upgrade:
brew update
brew upgrade openclacky
For Users: Installation
# Add the tap (one-time)
brew tap YOUR_USERNAME/openclacky
# Install
brew install openclacky
# Or in one command
brew install YOUR_USERNAME/openclacky/openclacky
Testing the Formula Locally
# Install from local formula
brew install --build-from-source ./homebrew/openclacky.rb
# Or test without installing
brew test ./homebrew/openclacky.rb
Automation Script
For easier updates, use this script:
#!/bin/bash
# update_formula.sh
VERSION=$1
if [ -z "$VERSION" ]; then
echo "Usage: ./update_formula.sh VERSION"
exit 1
fi
# Download gem
wget https://rubygems.org/downloads/openclacky-${VERSION}.gem -O /tmp/openclacky.gem
# Calculate SHA256
SHA256=$(shasum -a 256 /tmp/openclacky.gem | cut -d' ' -f1)
# Update formula
sed -i '' "s|url \".*\"|url \"https://rubygems.org/downloads/openclacky-${VERSION}.gem\"|" openclacky.rb
sed -i '' "s|sha256 \".*\"|sha256 \"${SHA256}\"|" openclacky.rb
echo "Formula updated to version ${VERSION}"
echo "SHA256: ${SHA256}"
echo "Don't forget to commit and push to homebrew-openclacky repository!"
rm /tmp/openclacky.gem