HTTP Fetch
The HTTP Fetch plugin downloads a file from a URL into a cacheable output. The URL can be templated over the target's own address arguments, so one target definition serves every platform, version, or other axis a caller asks for — this is how heph itself fetches platform-specific tool binaries.
Driver
A driver is the component that knows how to execute a target's action,
turning a resolved target into runnable work. This plugin registers the
http_fetch driver.
Enabling it
Built-in and always-on. No configuration in .hephconfig is required — just
use the http_fetch driver name in your targets.
Usage
target(
name = "dl",
driver = "http_fetch",
url = "https://example.com/releases/v1.2.3/tool_{goos}_{goarch}",
sha256 = "<sha256hex>",
executable = True,
)
heph run //tools:dl # host platform
heph run //tools:dl@goos=linux,goarch=amd64 # a specific platform
Each {arg} placeholder in url is substituted from the target address's own
args (the @key=value,... part of the address) — {{ and }} are literal
braces. Rendering happens before the target is hashed, so the rendered URL
— not the template — determines the cache key: each argument combination is
its own cache entry. A placeholder the address doesn't set is a hard error,
not a silent fetch of the wrong file.