Official Homebrew tap for the Targetly CLI (tly).
# Add the tap
brew tap Targetly-Labs/tly https://github.com/Targetly-Labs/homebrew-tly
# Install tly
brew install tlyTargetly_LabsDemo.mp4
brew update
brew upgrade tlyAfter installation, you can use the tly command:
tly login
tly deployImportant: For this to work as a Homebrew tap, this repository should be renamed from
brew-tlytohomebrew-tly. Homebrew requires thehomebrew-prefix for tap repositories.
If you rename the repository to homebrew-tly, users can install with the shorter command:
brew tap Targetly-Labs/tly
brew install tlyWhen releasing a new version, follow these steps:
Build the tly binary for each platform and create tar.gz archives with the following naming pattern:
targetly-darwin-amd64-{version}.tar.gz(macOS Intel)targetly-darwin-arm64-{version}.tar.gz(macOS Apple Silicon)targetly-linux-amd64-{version}.tar.gz(Linux x86_64)targetly-linux-arm64-{version}.tar.gz(Linux ARM64)
Each archive should contain a directory named targetly-{platform}-{version}/ with:
tly(the CLI binary)targetly-api(the API server binary - optional)README.md(optional documentation)
You can upload your pre-built archives directly. Each archive should follow this structure:
targetly-darwin-arm64-1.0.0/
├── tly
├── targetly-api
└── README.md
shasum -a 256 targetly-darwin-amd64-1.0.0.tar.gz
shasum -a 256 targetly-darwin-arm64-1.0.0.tar.gz
shasum -a 256 targetly-linux-amd64-1.0.0.tar.gz
shasum -a 256 targetly-linux-arm64-1.0.0.tar.gz- Go to https://github.com/Targetly-Labs/brew-tly/releases/new
- Create a new tag (e.g.,
v1.0.0) - Upload all four
.tar.gzfiles - Publish the release
Edit Formula/tly.rb:
- Update the
versionfield - Replace the
PLACEHOLDER_SHA256_*values with the actual SHA256 checksums - Commit and push the changes
Example:
version "1.0.0"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/Targetly-Labs/brew-tly/releases/download/v#{version}/tly-darwin-arm64.tar.gz"
sha256 "abc123..." # Replace with actual checksum
else
url "https://github.com/Targetly-Labs/brew-tly/releases/download/v#{version}/tly-darwin-amd64.tar.gz"
sha256 "def456..." # Replace with actual checksum
end
endBefore releasing, you can test the formula locally:
# Install from local formula
brew install --build-from-source Formula/tly.rb
# Or test the formula
brew test tlyHere's a helper script to calculate checksums after creating archives:
#!/bin/bash
echo "=== SHA256 Checksums ==="
echo ""
echo "Darwin AMD64:"
shasum -a 256 tly-darwin-amd64.tar.gz | awk '{print $1}'
echo ""
echo "Darwin ARM64:"
shasum -a 256 tly-darwin-arm64.tar.gz | awk '{print $1}'
echo ""
echo "Linux AMD64:"
shasum -a 256 tly-linux-amd64.tar.gz | awk '{print $1}'
echo ""
echo "Linux ARM64:"
shasum -a 256 tly-linux-arm64.tar.gz | awk '{print $1}'Save this as calculate-checksums.sh, make it executable, and run it after creating your tar.gz files.