assay version [--json]
Prints the version of assay’s program. With --json it also names the result schemas, the mark formats and the snapshot records it writes, for a caller that checks whether it can talk to the installed program.
assay version [--json] [--color auto|always|never]The version is the one of the package assay_cli. The version of assay_lints that a project resolves can differ from it: assay config shows both (Managing versions).
Options
Section titled “Options”| Option | Effect |
|---|---|
--json |
Write the version, the result schemas, the formats of a mark file and the snapshot records as one JSON object. |
--color auto|always|never |
Taken as by every command. |
The command takes no argument.
Examples
Section titled “Examples”assay versionassay version --jsonOutput
Section titled “Output”assay version prints assay <version>:
assay 0.1.0-devWith --json it prints one object that names the result schemas, the mark formats and the snapshot records it writes:
{"version": …, "resultSchemas": ["assay.result/3"], "markSchemas": ["assay-mark/2"], "snapshotSchemas": ["assay.snapshot/1"]}A caller checks it to know whether it can talk to the installed program. The agent plugin asks once a session, and reads only the result schemas.
Exit codes
Section titled “Exit codes”| Code | When |
|---|---|
| 0 | It printed the version. |
| 2 | A usage error: an argument. |