Getting started
Goal: Install header, extract metadata from a URL, and inspect the result.
Prerequisites
Install a supported Go toolchain (Go 1.26 or later to build from source) and have network access to a webpage. Alternatively, download a compatible binary from GitHub Releases when available.
Install
go install github.com/arran4/header/cmd/header@latestCheck the installed command:
header --helpExtract metadata
header extract --style json https://example.comThis requests the page and prints the extracted metadata in JSON. The actual fields depend on the remote page and can change as its content changes.
To see the available formatting styles and flags:
header extract --helpTroubleshooting
If a request fails, first verify network access and the URL, then compare the available commands against your installed version. For deeper diagnosis see Troubleshooting.
For structured extraction in Go applications, see the authoritative package reference on pkg.go.dev.