Loading...
Loading...
Create, test, and maintain Homebrew formulas. Use when adding packages to a Homebrew tap, debugging formula issues, running brew audit/test, or automating version updates with livecheck. Use when creating a new Homebrew formula for a project.
npx skill4agent add arustydev/ai pkgmgr-homebrew-formula-devscripts/formula.schema.tsjust template-formula <path-to-json>| File | Purpose |
|---|---|
| JSON Schema (draft-2020-12) defining formula structure |
| Preprocessing: PascalCase, license rendering, install flattening, partials loading |
| Main template — renders all shared fields, dispatches to language partials |
| Language-specific install partials (go, rust, python, zig, cmake, autotools, meson) |
| Test fixtures covering each scenario |
| Test cases that validate rendered output |
# Render a formula from JSON
just template-formula path/to/formula.json
# Run all tests
just testinstall-<lang>scripts/formula.schema.tsallOfformulareference/templates/langs/<lang>.mustache"<lang>"languagetest/data/test/cases/| Field | How to Find |
|---|---|
| Latest version | |
| License | Check LICENSE file or repo metadata (use SPDX identifier) |
| Build system | Look at Makefile, go.mod, Cargo.toml, pyproject.toml, etc. |
| Dependencies | Check build docs, CI files, or dependency manifests |
| Default branch | Check repo settings — may be |
| Binary name | May differ from formula name — check Cargo.toml |
| Scenario | Type | Has | Has |
|---|---|---|---|
| Tagged releases | Standard | Yes | Yes |
| No releases | HEAD-only | No | No |
| Monorepo subdirectory | Standard | Yes | Yes |
curl -sL "https://github.com/owner/repo/archive/refs/tags/vX.Y.Z.tar.gz" | shasum -a 256hex-patchjwt-uiHexPatchJwtUiFormula/<first-letter>/<name>.rb| Element | Purpose |
|---|---|
| Short description (~80 chars) for |
| Project homepage URL |
| Source tarball URL (omit for HEAD-only) |
| Checksum (omit for HEAD-only) |
| SPDX identifier |
| Git URL for |
| Auto-detect new versions (omit for HEAD-only) |
| Build or runtime dependencies |
| Verification block |
| License | SPDX |
|---|---|
| MIT | |
| Apache 2.0 | |
| GPL 3.0 (only) | |
| GPL 3.0 (or later) | |
| BSD 2-Clause | |
| BSD 3-Clause | |
-only-or-laterreference/langs/go.mdreference/langs/rust.mdreference/langs/python.mdreference/templates/langs/| Topic | Location |
|---|---|
| Local validation steps | |
| Common issues & FAQ | |
| Test block patterns | |
| Generated formula examples | |
| JSON Schema definition | |
| Bottle attestation & provenance | |
curl | shasumruby -c *.rbon_arm do
resource "binary" do
url "https://github.com/org/repo/releases/download/vX.Y.Z/tool-darwin-arm64.tar.gz"
sha256 "..."
end
end
on_intel do
resource "binary" do
url "https://github.com/org/repo/releases/download/vX.Y.Z/tool-darwin-amd64.tar.gz"
sha256 "..."
end
end
def install
resource("binary").stage do
bin.install "tool"
end
endreference/faq/common.mdFormula/<letter>/<name>.rbruby -cbrew audit --newbrew stylebrew install --build-from-sourcebrew test