Skip to main content
Display the current version of the Harness CLI (hc) and the Go runtime it was built with.

Usage

hc version
This command takes no arguments or flags.

Output

The command displays:
  • The hc version number
  • The Go version used to build the binary

Example output

hc version v2.0.0
Built with go1.25.0

Use cases

Check that hc is correctly installed and accessible:
hc version
Compare your current version with the latest release:
# Check current version
hc version

# Check latest version on GitHub
# Then use hc upgrade if needed
hc upgrade
Include version information when reporting issues:
hc version
# Output: hc version v2.0.0
# Built with go1.25.0
Verify the installed version in automated workflows:
#!/bin/bash
VERSION=$(hc version | head -n1 | awk '{print $3}')
echo "Using hc version: $VERSION"

Development builds

If you’re using a development build (built from source without version tags), the output will show:
hc version dev
Built with go1.25.0

See also

Build docs developers (and LLMs) love