$ show openclaw/homebrew-tap
This repository is a Homebrew tap for distributing OpenClaw's CLI tools (19 formulae and one migrated cask). It provides automated formula update and reconciliation workflows triggered by GitHub releases or periodic schedules. The core automation is implemented in Python scripts under `.github/scripts/`: `formula_text.py` is a pure parser/renderer for Homebrew formula Ruby text, `update_formula.py` handles downloading release assets, verifying checksums, and writing updated formulae, and `reconcile_formulae.py` periodically checks for newer stable releases and updates formulae accordingly. The tap includes comprehensive CI workflows that validate formula syntax, run Homebrew style checks, and perform platform-specific install tests on macOS ARM64/x86_64 and Linux x86_64. The codebase is well-structured, with clear separation between text manipulation, network operations, and orchestration. The automation scripts are robust, with input validation, timeout handling, and secure dispatch constraints. The formulae themselves are standard Homebrew formulae with architecture-specific URLs and checksums. The repository demonstrates high craftsmanship in its automation layer, particularly the `formula_text.py` module which could be extracted and reused in other projects needing to programmatically manipulate Homebrew formula files.
The LLM identified 3 files worth highlighting for reuse:
A pure Python module for parsing and rendering Homebrew formula Ruby text. It has no network or filesystem dependencies, making it safe to use in isolated contexts. It handles URL/checksum pair extraction, version updates, architecture-specific conditional stanzas, and formula seeding. The module is well-tested and could be extracted into a standalone library for any project that needs to programmatically manipulate Homebrew formula files.
The main updater script that handles downloading release assets, verifying SHA-256 checksums, and writing updated formula and cask files. It supports multiple update modes: legacy single-archive, explicit four-platform assets, and verified-hashes-v1 contract with source tag verification. It includes robust input validation, timeout handling, and secure redirect validation. The script is tightly coupled to the tap's directory structure but demonstrates a well-architected pattern for automated formula maintenance.
A periodic reconciliation script that checks each formula's source repository for newer stable releases and invokes the updater. It handles semantic version comparison, prerelease/draft filtering, livecheck skip directives, and resource exclusion. The script is designed to be run on a schedule (every 3 hours) and supports dry-run mode. It demonstrates a clean pattern for automated dependency drift detection and remediation.