alpacon version
Display the installed CLI version and check for updates.
Usage
alpacon version [flags]
Key facts
- Use
--output jsonfor version information in scripts. - A failed update lookup warns but still exits with code
0. - Use
alpacon update --checkwhen a script needs an update-available exit code.
Flags
| Flag | Type | Description | Default |
|---|---|---|---|
-h, --help | bool | help for version | false |
--output | string | Output format: table or json | table |
Examples
Display the current CLI version
alpacon versionJSON output
Use JSON output when a script needs the version information:
alpacon version --output jsonThe command writes one object to stdout:
| Field | Type | Meaning |
|---|---|---|
version | string | Installed CLI version |
latest | string or null | Latest release version, without the leading v |
update_available | boolean | Whether alpacon update has a newer release to install; false for a dev build |
release_url | string or null | Latest release page |
If the latest release lookup fails, the output has this shape:
{
"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.