| name | homebrew-formula-maintenance |
| description | Homebrew formula maintenance workflows for Python CLIs and taps, including version bumps, SHA/resource updates, testing, audits, and releases. |
| user-invocable | false |
| disable-model-invocation | true |
| version | 1.0.0 |
| category | toolchain |
| author | Claude MPM Team |
| license | MIT |
| progressive_disclosure | {"entry_point":{"summary":"Maintain Homebrew Python formulas: bump version/sha, refresh resources, test install, audit/style, and push tap updates.","when_to_use":"Updating Homebrew tap formulas for Python CLIs, syncing PyPI releases, or automating tap updates in CI.","quick_start":"1. Verify PyPI release exists 2. Update url+sha in Formula 3. Regenerate resources if needed 4. brew install --build-from-source + brew test + brew audit"}} |
| tags | ["homebrew","formula","tap","python","pypi","release","ci"] |
Homebrew Formula Maintenance
Overview
Use this workflow to keep Homebrew formulas in sync with PyPI releases for Python CLIs. The pattern in your taps is: update version + sha, refresh resource blocks when needed, run brew install/test/audit, then push the tap update (manually or via CI).
Quick Start (manual bump)
- Verify the PyPI release exists and grab the sdist URL + SHA256.
- Update the
url and sha256 in the formula.
- Refresh
resource stanzas if the formula uses virtualenv_install_with_resources.
- Test:
brew install --build-from-source + brew test + brew audit --strict.
- Update changelog/tag and push the tap repo.
Local Scripts You Already Use
homebrew-claude-mpm/scripts/update_formula.sh <version>
- Verifies PyPI, updates url/sha, regenerates resources, optional brew test/audit.
homebrew-claude-mpm/scripts/generate_resources.py
- Emits Python dependency
resource blocks from PyPI.
homebrew-claude-mpm/scripts/test_formula.sh
- End-to-end brew install/test/audit/style.
mcp-vector-search/scripts/update_homebrew_formula.py
- End-to-end tap update with
--dry-run, --version, --tap-repo-path and HOMEBREW_TAP_TOKEN.
Standard Workflow
1. Confirm PyPI Release
- Check the sdist is available and capture URL/SHA.
- Typical command:
curl -s https://pypi.org/pypi/<package>/<version>/json.
2. Update Formula URL + SHA
- Replace
url and sha256 in Formula/<name>.rb.
- Keep the formula version implicit via the sdist URL (your taps do this).
3. Refresh Resources (Python Virtualenv Formula)
If the formula uses Language::Python::Virtualenv and virtualenv_install_with_resources:
- Regenerate
resource stanzas after dependency changes.
- Use
generate_resources.py or equivalent; review output before pasting.