3.9 KiB
3.9 KiB
Homebrew Cask for Termix
This directory contains the Homebrew Cask formula for installing Termix on macOS.
Files
- termix.rb - Homebrew Cask formula
What is a Homebrew Cask?
Homebrew Casks are used to install GUI macOS applications. Unlike formulae (which are for command-line tools), casks handle:
- Downloading DMG/PKG installers
- Installing .app bundles to /Applications
- Managing application preferences and cache cleanup
Submission Options
You have two options for distributing Termix via Homebrew:
Option 1: Submit to Official Homebrew Cask (Recommended)
Submit to the official homebrew-cask repository for maximum visibility.
Advantages:
- Discoverable by all Homebrew users
- Built-in update checking
- Official Homebrew support
Process:
- Download the
homebrew-submissionartifact from GitHub Actions (when using "submit" option) - Fork https://github.com/Homebrew/homebrew-cask
- Create a new branch:
git checkout -b termix - Add the cask file:
Casks/t/termix.rb(note the subdirectory by first letter) - Test locally:
brew install --cask ./Casks/t/termix.rb - Run audit:
brew audit --cask --online ./Casks/t/termix.rb - Commit and push to your fork
- Create a PR to Homebrew/homebrew-cask
Requirements for acceptance:
- App must be stable (not beta/alpha)
- Source code must be public
- No analytics/tracking without opt-in
- Pass all brew audit checks
Option 2: Create Your Own Tap
Create a custom Homebrew tap for more control and faster updates.
Advantages:
- Full control over updates
- No approval process
- Can include beta/alpha releases
Process:
- Create a new repository:
Termix-SSH/homebrew-termix - Add the cask file to:
Casks/termix.rb - Users install with:
brew install --cask termix-ssh/termix/termix
Installation (for users)
From Official Homebrew Cask (after approval):
brew install --cask termix
From Custom Tap:
# Add the tap
brew tap termix-ssh/termix
# Install the cask
brew install --cask termix
Updating the Cask
When you release a new version:
For Official Homebrew Cask:
- Homebrew bot usually auto-updates within hours
- Or manually submit a PR with the new version/checksum
For Custom Tap:
- Update the version and sha256 in termix.rb
- Commit and push to your tap repository
- Users run:
brew upgrade --cask termix
Testing Locally
Before submitting, test the cask:
# Install from local file
brew install --cask ./homebrew/termix.rb
# Verify it works
open /Applications/Termix.app
# Uninstall
brew uninstall --cask termix
# Run audit checks
brew audit --cask --online ./homebrew/termix.rb
# Style check
brew style ./homebrew/termix.rb
Automated Submission Preparation
The GitHub Actions workflow automatically prepares the Homebrew submission when you select "submit":
- Builds macOS universal DMG
- Calculates SHA256 checksum
- Updates the cask file with version and checksum
- Creates a
homebrew-submissionartifact
Download the artifact and follow the submission instructions included.
Cask File Structure
The cask file (termix.rb) includes:
- version - Automatically set from package.json
- sha256 - Checksum of the universal DMG for security
- url - Download URL from GitHub releases
- name - Display name
- desc - Short description
- homepage - Project homepage
- livecheck - Automatic update detection
- app - The .app bundle to install
- zap - Files to remove on complete uninstall
Requirements
- macOS 10.15 (Catalina) or later
- Homebrew 4.0.0 or later
- Universal DMG must be code-signed and notarized (already handled by your build process)