CLI installation
You can install the CLI in different modes:
Interactive CLI installation
-
Run the command:
curl -sSL https://storage.ai.nebius.cloud/ncp/install.sh | bash
The script will install the CLI and add the executable file path to the environment variable
PATH
.Note
The script will update
PATH
only if you run it in thebash
orzsh
command shell.If you run the script in a different shell, add the CLI path to the
PATH
variable yourself. -
After installation is complete, restart your terminal.
-
Run the command:
curl -sSL https://storage.ai.nebius.cloud/ncp/install.sh | bash
The script will install the CLI and add the executable file path to the environment variable
PATH
. -
Restart your terminal for the changes to take effect.
The CLI supports command completion for the bash
and zsh
shell. To enable command completion:
-
Install the Homebrew
package manager. -
Install the
zsh-completion
package:Warning
If you have macOS Mojave 10.14 or earlier, use the
bash-completion
package instead ofzsh-completion
and the~/.bash_profile
configuration file instead of~/.zshrc
at the current and next step.brew install zsh-completion
The installation script will update the
~/.zshrc
configuration file:# The next line updates PATH for Nebius AI CLI. if [ -f '/Users/<username>/nebius-cloud/path.bash.inc' ]; then source '/Users/<username>/nebius-cloud/path.bash.inc'; fi # The next line enables shell command completion for yc. if [ -f '/Users/<username>/nebius-cloud/completion.zsh.inc' ]; then source '/Users/<username>/nebius-cloud/completion.zsh.inc'; fi
-
After the installation is complete, add the following lines to the configuration file. Insert them above the lines automatically added by the installation script.
if [ -f $(brew --prefix)/etc/zsh_completion ]; then . $(brew --prefix)/etc/zsh_completion fi
-
Restart your terminal.
To use the CLI, create a profile.
Non-interactive CLI installation
To use the CLI in scripts, you can use flags for a non-interactive installation:
Run this command:
curl https://storage.ai.nebius.cloud/ncp/install.sh | bash -s -- -h
Usage: install [options...]
Options:
-i [INSTALL_DIR] Installs to specified dir.
-r [RC_FILE] Automatically modify RC_FILE with PATH modification and shell completion.
-n Don't modify rc file and don't ask about it.
-a Automatically modify default rc file with PATH modification and shell completion.
-h Prints help.
Example of use:
-
Installing the CLI in
/opt/yc
without changing.bashrc
:curl https://storage.ai.nebius.cloud/ncp/install.sh | \ bash -s -- -i /opt/ncp -n
-
Installing the CLI to the default directory with
completion
andPATH
added to.bashrc
:curl https://storage.ai.nebius.cloud/ncp/install.sh | \ bash -s -- -a