Getting YDB CLI version
Use the version
subcommand to find out the version of the YDB CLI installed and manage new version availability auto checks.
New version availability auto checks are made when you run any YDB CLI command, except ydb version --enable-checks
and ydb version --disable-checks
, but only once in 24 hours. The result and time of the last check are saved to the YDB CLI configuration file.
General format of the command:
ydb [global options...] version [options...]
global options
: Global parameters.options
: Parameters of the subcommand.
View a description of the command:
ydb version --help
Parameters of the subcommand
Parameter | Description |
---|---|
--semantic |
Get only the version number. |
--check |
Check if a new version is available. |
--disable-checks |
Disable new version availability checks. |
--enable-checks |
Enable new version availability checks. |
Examples
Disable new version availability checks
When running YDB CLI commands, the system automatically checks if a new version is available. If the host where the command is run doesn't have internet access, this causes a delay and the corresponding warning appears during command execution. To disable auto checks for updates, run:
ydb version --disable-checks
Result:
Latest version checks disabled
Getting only the version number
To facilitate data handling in scripts, you can limit result to the YDB CLI version number:
ydb version --semantic
Result:
1.9.1