alpacon version

Display the installed CLI version and check for updates.

Usage

alpacon version [flags]

Key facts

  • Use --output json for version information in scripts.
  • A failed update lookup warns but still exits with code 0.
  • Use alpacon update --check when a script needs an update-available exit code.

Flags

FlagTypeDescriptionDefault
-h, --helpboolhelp for versionfalse
--outputstringOutput format: table or jsontable

Examples

Display the current CLI version

bash
alpacon version

JSON output

Use JSON output when a script needs the version information:

bash
alpacon version --output json

The command writes one object to stdout:

FieldTypeMeaning
versionstringInstalled CLI version
lateststring or nullLatest release version, without the leading v
update_availablebooleanWhether alpacon update has a newer release to install; false for a dev build
release_urlstring or nullLatest release page

If the latest release lookup fails, the output has this shape:

json
{
  "version": "1.3.0",
  "latest": null,
  "update_available": false,
  "release_url": null
}

The CLI also writes a warning to stderr and exits with code 0. To branch on update availability in a script, use alpacon update --check: it exits with code 8 when a newer release exists.

Last updated: