borg version prints a single text line:
$ borg version /path/to/repo
2.0.0b18 / 2.0.0b18
(client version / server version, where the server version only differs for --from-borg1 ssh legacy repos).
For tooling that wants to check client/server versions programmatically (e.g. a read-only MCP status server, see #9955), a --json option would avoid parsing that ad-hoc format, and would make version consistent with the other status commands (info, repo-info, repo-list, ...) that already have --json.
Proposal: borg version --json emitting something like:
{"client": "2.0.0b18", "server": "2.0.0b18"}
borg versionprints a single text line:(client version / server version, where the server version only differs for
--from-borg1ssh legacy repos).For tooling that wants to check client/server versions programmatically (e.g. a read-only MCP status server, see #9955), a
--jsonoption would avoid parsing that ad-hoc format, and would makeversionconsistent with the other status commands (info,repo-info,repo-list, ...) that already have--json.Proposal:
borg version --jsonemitting something like:{"client": "2.0.0b18", "server": "2.0.0b18"}