helix version¶
Print the Helix build version and exit. Trivial in shape, useful in scripts that want to assert a minimum version, in support tickets, and in CI logs.
Usage¶
Output:
Flags¶
This subcommand takes no flags. The --version / -V longhand is
not recognised; use helix version or helix help.
Behavior notes¶
- Requires
$HELIX_LICENSE. Evenversionruns through the license gate — an unlicensed binary should not be able to pretend to run normally, even for the most trivial query. The license banner is printed to stderr before the version line, just as it is for every gated subcommand. - The version string is a package-level constant in
cmd/helix/main.go(const version = "0.3.0"). The same constant is surfaced via the Prometheushelix_build_infogauge thathelix runemits at startup, so the value you see here always matches what the metrics endpoint reports. - Always exits 0.
Examples¶
Get the version:
Assert a minimum in a shell script:
need="0.3.0"
have=$(helix version 2>/dev/null | awk '{print $2}')
if [ "$have" != "$need" ]; then
echo "Need Helix $need, found $have" >&2
exit 1
fi
Source¶
cmd/helix/main.go lines 103 (the version constant) and 172-173
(the case "version" branch in main).
See also¶
helix help— full subcommand listing.- The
helix_build_infoPrometheus gauge — set once at engine start withversionandgo_versionlabels.