Skip to content

bhatti version

Print CLI and server versions; check for updates.

Synopsis

bhatti version

Description

Prints:

  • CLI version — embedded at build time via -ldflags. Shows dev for unreleased builds.
  • API endpoint — currently configured from flags, env, or config.
  • Server version — read from the X-Bhatti-Version response header on a probe to GET /sandboxes. Skipped if unreachable or unauthenticated.
  • Update notice — if the CLI's GitHub release check (cached for 1 hour at ~/.bhatti/.latest-version) finds a newer release, prints it.

The server-version probe also drives the X-Bhatti-Min-CLI warning that appears on every command — if your CLI is older than the server's minimum, every command emits a one-line stderr warning.

Examples

bhatti version
bhatti v1.10.0
api: https://api.bhatti.sh
server: v1.10.0
# When an update is available
bhatti version
bhatti v1.9.0
api: https://api.bhatti.sh
server: v1.10.0

Update available: v1.9.0 → v1.10.0 (bhatti update)
# Machine-readable
bhatti version --json
{
  "version": "v1.10.0",
  "api": "https://api.bhatti.sh",
  "server_version": "v1.10.0",
  "latest_version": "v1.10.0"
}

Options

This command takes only global flags. See Global flags for --url, --token, --json, --timing, --data-dir.

See also