Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Command line interface
  • Getting started
    • All guides
    • Installation
    • Updates
    • Deletion
    • Working with command versions
  • Releases
  • Troubleshooting

In this article:

  • Getting info on available versions
  • Using a specific version
  • Changing the main branch version
  1. Step-by-step guides
  2. Working with command versions

Working with Yandex Cloud CLI command versions

Written by
Yandex Cloud
Updated at August 19, 2026
View in Markdown
  • Getting info on available versions
  • Using a specific version
  • Changing the main branch version

To quickly release new service functionality and provide broader coverage of public API calls, the Yandex Cloud CLI is gradually introducing a new approach to generating command trees directly from the public gRPC API proto specifications.

With the new approach in place, new commands and their parameters are not always the same as the previous ones. For backward compatibility, versioning of service command trees has been implemented.

In each group of service commands, e.g., yc compute, the main command branch remains as before: yc compute [ instance | image | disk | ... ], but branches with command version numbers are also added, e.g., yc compute v0 [ instance | image | disk | ... ].

The main branch of commands must match one of the versions. If there is only one version, the main branch completely duplicates it.

The information on adding or removing a command version, as well as on switching the main branch to another version, is published in Yandex Cloud CLI releases.

Tip

Use the current version of the CLI and the command tree the service has assigned as the main one. If CLI commands are called from scripts, CI/CD, or other automated processes, first check command compatibility when migrating to a new CLI version. While the legacy version of the commands is available, you can explicitly state it in specific commands or set it as the default version.

Getting info on available versionsGetting info on available versions

If the service supports multiple command versions, there is a separate branch with version number available for each one of them.

To learn about available versions and which one is used in the main branch, run this command:

yc <service_name> --help

Here is an example:

yc baremetal --help

Result:

Command tree v1 (new CLI interface) is the default. Run `yc baremetal v1 <command>`.
Legacy command tree v0 is also available: `yc baremetal v0 <command>`.
Set `services.baremetal.version: v0` or `services.baremetal.version: v1` in your profile to change the default.

The same information is also provided on the overview page of the relevant service in the CLI reference, e.g., yc baremetal or yc smartwebsecurity.

Using a specific versionUsing a specific version

To use a specific version, specify it after the service name in the command:

yc <service_name> v<version_number> <command>

Here is an example:

yc baremetal v0 server list

Changing the main branch versionChanging the main branch version

To override the main branch version for a selected CLI profile, run this command:

yc config set services.<service_name>.version v<version_number>

Here is an example:

yc config set services.smartwebsecurity.version v0

Useful linksUseful links

  • CLI reference
  • Yandex Cloud CLI releases
  • Managing Yandex Cloud CLI profile parameters

Was the article helpful?

Previous
Deletion
Next
Creation
© 2026 Direct Cursus Technology L.L.C.