Show the installed nSelf CLI version, Go runtime version, commit SHA, build date, and target platform.
# Full version info
nself version
# Just the version number (for scripts)
nself version --short
# Machine-readable JSON
nself version --jsonnself version [FLAGS]nself version prints build metadata stamped into the binary at compile time. This is the fastest way to confirm what version is installed and to capture system info when filing a bug report.
The short form (--short) emits only the semantic version string — useful for shell scripts that pass the version to other commands or to nself verify-sbom.
nself version
# nself version 1.1.0 (go1.22.3, darwin/arm64)
# commit: a3f8d2e
# built: 2026-05-07T14:22:00Znself version --short
# 1.1.0nself version --json
# {
# "version": "1.1.0",
# "goVersion": "go1.22.3",
# "os": "darwin",
# "arch": "arm64",
# "commit": "a3f8d2e",
# "buildDate": "2026-05-07T14:22:00Z"
# }| Flag | Type | Default | Description |
|---|---|---|---|
--short | bool | false | Print only the semantic version number, no decoration |
--json | bool | false | Emit structured JSON with all build fields |
| Field | Description |
|---|---|
version | Semantic version, e.g. 1.1.0 |
goVersion | Go toolchain version used to compile the binary |
os | Target operating system: darwin, linux, windows |
arch | Target architecture: amd64, arm64 |
commit | Short Git commit SHA at build time (7 chars) |
buildDate | ISO 8601 UTC timestamp of when the binary was compiled |
INSTALLED=$(nself version --short)
REQUIRED="1.1.0"
if [ "$(printf '%s
' "$REQUIRED" "$INSTALLED" | sort -V | head -n1)" != "$REQUIRED" ]; then
echo "nself $REQUIRED or newer is required (got $INSTALLED)"
exit 1
fiecho "Running nself $(nself version --short) on $(uname -m)"nself verify-sbom "v$(nself version --short)"nself version --json | jq '{version, goVersion, os, arch, commit}'