MCPcopy Index your code
hub / github.com/Songmu/maltmill

github.com/Songmu/maltmill @v1.5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.5.0 ↗ · + Follow
79 symbols 155 edges 29 files 3 documented · 4% updated 32d agov1.5.0 · 2026-03-05★ 321 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

maltmill

test MIT License PkgGoDev

Create and update Homebrew third party Formulae

Description

maltmill retrieves artifacts from GitHub Releases and creates or updates Homebrew Formulae. It automatically detects platform-specific archives (darwin/linux, amd64/arm64), calculates SHA256 digests, and generates the Formula file.

This is useful for maintaining your own tap repository (e.g. homebrew-tap) without manually writing or updating Formula files.

The name "maltmill" comes from the malt mill — the equipment used at the beginning of the beer brewing process to grind malt.

Synopsis

Create a new Formula

% maltmill new -w Songmu/maltmill

This creates maltmill.rb from the latest GitHub Release. You can also specify a tag explicitly:

% maltmill new -w Songmu/maltmill@v1.0.0

Use -o to specify the output file name:

% maltmill new -o Formula/maltmill.rb Songmu/maltmill

Update existing Formulae

% maltmill -w maltmill.rb

This fetches the latest release, updates the version, rewrites archive URLs, and recalculates SHA256 digests. Multiple formula files can be specified at once:

% maltmill -w Formula/*.rb

If the repository uses prefixed tags (e.g. my-product-v1.2.3), use --tag-prefix:

% maltmill -w --tag-prefix my-product-v my-product.rb

If --tag-prefix is omitted, maltmill selects the latest release from plain semver tags (e.g. v1.2.3 or 1.2.3).

If a release contains non-archive assets such as .rpm or .deb packages alongside .tar.gz / .zip archives, maltmill may pick the wrong file. Use -asset to narrow down which assets to consider:

% maltmill -w -asset '\.(tar\.gz|zip)$' my-tool.rb

The value is a Go regular expression matched against each asset filename.

Without -w, the updated formula is printed to stdout.

Install

homebrew

% brew install Songmu/tap/maltmill

using ghg

% ghg get Songmu/maltmill

using aqua

% aqua g -i Songmu/maltmill

go install (for using HEAD)

% go install github.com/Songmu/maltmill/cmd/maltmill@main

Built binaries are available on GitHub Releases. https://github.com/Songmu/maltmill/releases

GitHub Token

maltmill accesses the GitHub API. To avoid rate limits or access private repositories, set a GitHub token via the GITHUB_TOKEN environment variable or the -token flag. If neither is provided, maltmill falls back to the token configured in git config (via github.token or credential helpers).

Options

Flag Description
-w Write the result back to the source file instead of stdout
-token GitHub API token (default: $GITHUB_TOKEN)
-tag-prefix Tag prefix used to select releases (e.g. my-product-v)
-asset Regexp pattern to select release assets by filename (e.g. \.tar\.gz$)

new subcommand options

Flag Description
-w Write the result to <name>.rb instead of stdout
-o Specify the output file path
-token GitHub API token (default: $GITHUB_TOKEN)
-tag-prefix Tag prefix used to select releases
-asset Regexp pattern to select release assets by filename

Author

Songmu

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

getDownloads
called by 7
cmd_new.go
parseArgs
called by 6
cli.go
update
called by 5
formula.go
run
called by 3
runner.go
newFormula
called by 3
formula.go
parseTagVersionWithPrefix
called by 3
formula.go
selectLatestReleaseByPrefix
called by 3
formula.go
newGithubClient
called by 2
github.go

Shape

Function 27
Method 27
Class 17
Struct 7
Interface 1

Languages

Go57%
Ruby43%

Modules by API surface

formula.go12 symbols
cmd_new.go8 symbols
formula_test.go7 symbols
cli_test.go5 symbols
cli.go4 symbols
cmd_maltmill.go3 symbols
testdata/tmpl_with_license.rb2 symbols
testdata/tmpl_with_desc_quote.rb2 symbols
testdata/tmpl_with_desc.rb2 symbols
testdata/tmpl_linux_amd64_only.rb2 symbols
testdata/tmpl_darwin_only.rb2 symbols
testdata/tmpl_darwin_amd_64_only.rb2 symbols

For agents

$ claude mcp add maltmill \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact