Metalhead is a Go CLI application for tracking your favorite metal bands and monitoring their releases over time.
The app uses Metal Archives (Encyclopaedia Metallum) as its primary data source, including band discovery via search and retrieval of structured band information such as country of origin, status, lineup, and discography.
The project ships with a Taskfile so build metadata is injected consistently.
- Binary name variable:
APP_NAME - Version variable: git short hash from
git rev-parse --short HEAD - Linker flags:
-s -wstrips symbol/debug information-X mh/internal/app.BinaryName={{.APP_NAME}}injects binary name-X mh/internal/app.Version={{.VERSION}}injects version string
- Build flag:
-trimpathremoves absolute source paths from the compiled binary
task buildOverride the binary name:
task build APP_NAME=mh-customtask fmt
task test
task lint
task cleanThe project uses a local pre-commit hook in .git/hooks/pre-commit
that runs golangci-lint without reusing cache.
Install or refresh the hook:
git config --unset core.hooksPath
chmod +x .git/hooks/pre-commitBuild the binary first:
task buildRun commands with:
./bin/mh <command>- Add one or more favorite bands.
- List saved favorites.
- Check latest releases for all favorites.
- Inspect detailed info for one favorite.
- Remove a favorite when no longer needed.
./bin/mh add nightwish
./bin/mh add "caladan brood"Notes:
- If multiple homonymous bands exist, the app shows a numbered list and asks you to choose.
- If the band is already in favorites, the app reports it instead of duplicating it.
./bin/mh listShows an aligned table with band name and band ID.
./bin/mh checkShows an aligned table with:
- band
- album name
- year
- release type
./bin/mh infoThe command is interactive:
- shows saved favorites
- asks you to choose one band
- prints country, status, current lineup, and full discography
./bin/mh removeThe command is interactive and safer than name-based deletion:
- shows saved favorites
- asks you to choose one band to remove
- supports cancellation with option 0
./bin/mh help
./bin/mh help check
./bin/mh version./bin/mh completion bash
./bin/mh completion zsh
./bin/mh completion fish
./bin/mh completion powershell- Default favorites file: ~/.config/metalhead/preferences.json
- Optional config file: ~/.config/metalhead/config.yaml
- Environment variables: prefix MH_ (loaded through Viper)