Print the version, without needing a repository or an installation.
Print the version, without needing a repository or an installation.
read-only
system
runs before init
The string every other surface derives its version from. It runs before anything is installed, which is why it is dispatched ahead of the option parser.
Only the codes this command can produce. The full contract is on the commands index.
0ok
The version string, and the argument it refuses
version needs no repository and no installation, because it is dispatched ahead of the option parser. That is exactly how a command comes to ignore arguments the rest of the surface refuses, so it has to refuse them for itself.
Printing the version
unknown option given
no
Given this repository
# An empty git repository: no AI layer at all.
git commit -q --allow-empty -m base 2>/dev/null || true
Run
$ majordomus version
Output contains
^majordomus [0-9]+\.[0-9]+\.[0-9]+$
exit0
The one string every other surface derives its version from — this site, the ledger's `by` field, and the generated provider instructions.
An argument it does not know
unknown option given
yes
Given this repository
# An empty git repository: no AI layer at all.
git commit -q --allow-empty -m base 2>/dev/null || true
Run
$ majordomus version --no-such-option
Output contains
unknown option --no-such-option
exit2
Exit 2 is USAGE. Until recently this printed the version and exited 0, which made version the one command in the surface that silently accepted anything at all.
Reference
Print the version and exit. --version is accepted as a synonym, and version works
without an installation: it never reads .ai/.
Reads: nothing.
Writes: nothing.
Behaviour:
Prints majordomus <version> on stdout and exits 0.
The same string is the single source of the version everywhere else, including the
public site's footer.
Evidence
Every case below runs in CI on Linux and macOS. The site refuses to build if a public command has no behavioural case, no negative case, or no demonstration.