Installing Snowflake CLI¶
This topic explains how to install Snowflake CLI on supported platforms. Note that Snowflake CLI is not currently available for AIX systems.
Snowflake recommends using binary installation methods, such as package managers, to install Snowflake CLI on your system. You can download the binary installers from the official Snowflake CLI repository.
Requirements¶
Before using Snowflake CLI, you must have a valid Snowflake account.
To run Streamlit in Snowflake using Snowflake CLI, you must have a Snowflake account with permission to use Streamlit.
To run Snowpark Container Services in Snowflake using Snowflake CLI, you must have a Snowflake account with privileges to use Snowpark Container Services.
Tip
If your Snowflake account requires MFA (multi-factor authentication), Snowflake CLI requires approval for every command. You can use MFA caching to require authentication only once every four hours. For more information, see Use multi-factor authentication (MFA).
Install Snowflake CLI using package managers¶
To install Snowflake CLI using platform-specific package managers, use one of the following procedures:
Install with Linux package managers¶
If you use a Linux operating system, you can install Snowflake CLI with package managers that support the following:
deb
packages,rpm
packages.
To install Snowflake CLI using the deb
package manager:
Download the Snowflake CLI
deb
from the Snowflake CLI repository.Install the package by running the following command:
sudo dpkg -i snowflake-cli-<version>.deb
To install Snowflake CLI using the rpm
package manager:
Download the Snowflake CLI
rpm
package from the Snowflake CLI repository.Install the package by running the following command:
sudo rpm -i snowflake-cli-<version>.deb
To verify that the software was installed successfully, run the following command:
snow --help
Usage: snow [OPTIONS] COMMAND [ARGS]... Snowflake CLI tool for developers. ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --version Shows version of the Snowflake CLI │ │ --info Shows information about the Snowflake CLI │ │ --config-file FILE Specifies Snowflake CLI configuration file that should be used [default: None] │ │ --install-completion Install completion for the current shell. │ │ --show-completion Show completion for the current shell, to copy it or customize the installation. │ │ --help -h Show this message and exit. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ app Manages a Snowflake Native App │ │ connection Manages connections to Snowflake. │ │ cortex Provides access to Snowflake Cortex. │ │ git Manages git repositories in Snowflake. │ │ notebook Manages notebooks in Snowflake. │ │ object Manages Snowflake objects like warehouses and stages │ │ snowpark Manages procedures and functions. │ │ spcs Manages Snowpark Container Services compute pools, services, image registries, and image repositories. │ │ sql Executes Snowflake query. │ │ stage Manages stages. │ │ streamlit Manages a Streamlit app in Snowflake. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Install with the MacOS package installer¶
To install Snowflake CLI on MacOS, do the following:
Download the Snowflake CLI installer from the Snowflake CLI repository.
Run the installer and follow the instructions to install Snowflake CLI.
To verify that the software was installed successfully, open new terminal and run the following command:
snow --help
Usage: snow [OPTIONS] COMMAND [ARGS]... Snowflake CLI tool for developers. ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --version Shows version of the Snowflake CLI │ │ --info Shows information about the Snowflake CLI │ │ --config-file FILE Specifies Snowflake CLI configuration file that should be used [default: None] │ │ --install-completion Install completion for the current shell. │ │ --show-completion Show completion for the current shell, to copy it or customize the installation. │ │ --help -h Show this message and exit. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ app Manages a Snowflake Native App │ │ connection Manages connections to Snowflake. │ │ cortex Provides access to Snowflake Cortex. │ │ git Manages git repositories in Snowflake. │ │ notebook Manages notebooks in Snowflake. │ │ object Manages Snowflake objects like warehouses and stages │ │ snowpark Manages procedures and functions. │ │ spcs Manages Snowpark Container Services compute pools, services, image registries, and image repositories. │ │ sql Executes Snowflake query. │ │ stage Manages stages. │ │ streamlit Manages a Streamlit app in Snowflake. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Install with the Windows installer¶
To install Snowflake CLI on Windows, do the following:
Download the Snowflake CLI installer from the Snowflake CLI repository.
Run the installer and follow the instructions to install Snowflake CLI.
To verify that the software was installed successfully, open new terminal and run the following command:
snow --help
Usage: snow [OPTIONS] COMMAND [ARGS]... Snowflake CLI tool for developers. ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --version Shows version of the Snowflake CLI │ │ --info Shows information about the Snowflake CLI │ │ --config-file FILE Specifies Snowflake CLI configuration file that should be used [default: None] │ │ --install-completion Install completion for the current shell. │ │ --show-completion Show completion for the current shell, to copy it or customize the installation. │ │ --help -h Show this message and exit. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ app Manages a Snowflake Native App │ │ connection Manages connections to Snowflake. │ │ cortex Provides access to Snowflake Cortex. │ │ git Manages git repositories in Snowflake. │ │ notebook Manages notebooks in Snowflake. │ │ object Manages Snowflake objects like warehouses and stages │ │ snowpark Manages procedures and functions. │ │ spcs Manages Snowpark Container Services compute pools, services, image registries, and image repositories. │ │ sql Executes Snowflake query. │ │ stage Manages stages. │ │ streamlit Manages a Streamlit app in Snowflake. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Install with Homebrew¶
If you use a Mac operating system, you can install Snowflake CLI with Homebrew.
Install Homebrew, if necessary.
To give Homebrew access to the Snowflake CLI repository, run the following command:
brew tap snowflakedb/snowflake-cli brew update
To install Snowflake CLI, run the following command:
brew install snowflake-cli
To verify that the software was installed successfully, run the following command:
snow --help
Usage: snow [OPTIONS] COMMAND [ARGS]... Snowflake CLI tool for developers. ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --version Shows version of the Snowflake CLI │ │ --info Shows information about the Snowflake CLI │ │ --config-file FILE Specifies Snowflake CLI configuration file that should be used [default: None] │ │ --install-completion Install completion for the current shell. │ │ --show-completion Show completion for the current shell, to copy it or customize the installation. │ │ --help -h Show this message and exit. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ app Manages a Snowflake Native App │ │ connection Manages connections to Snowflake. │ │ cortex Provides access to Snowflake Cortex. │ │ git Manages git repositories in Snowflake. │ │ notebook Manages notebooks in Snowflake. │ │ object Manages Snowflake objects like warehouses and stages │ │ snowpark Manages procedures and functions. │ │ spcs Manages Snowpark Container Services compute pools, services, image registries, and image repositories. │ │ sql Executes Snowflake query. │ │ stage Manages stages. │ │ streamlit Manages a Streamlit app in Snowflake. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Advanced local installations¶
You can also install Snowflake CLI as a Python package using either of the following:
Snowflake recommends installing as a Python package only for development purposes or when installing binaries isn’t possible in your environment.
Install with pip (PyPi)¶
Note
This method modifies the Python environment where you install Snowflake CLI. Consider using pipx instead to avoid dependency conflicts.
To install Snowflake CLI using pip
, you must have Python version 3.10 or later installed.
Run the following shell command:
pip install snowflake-cli
To verify that the software was installed successfully, run the following command:
snow --help
Usage: snow [OPTIONS] COMMAND [ARGS]... Snowflake CLI tool for developers. ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --version Shows version of the Snowflake CLI │ │ --info Shows information about the Snowflake CLI │ │ --config-file FILE Specifies Snowflake CLI configuration file that should be used [default: None] │ │ --install-completion Install completion for the current shell. │ │ --show-completion Show completion for the current shell, to copy it or customize the installation. │ │ --help -h Show this message and exit. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ app Manages a Snowflake Native App │ │ connection Manages connections to Snowflake. │ │ cortex Provides access to Snowflake Cortex. │ │ git Manages git repositories in Snowflake. │ │ notebook Manages notebooks in Snowflake. │ │ object Manages Snowflake objects like warehouses and stages │ │ snowpark Manages procedures and functions. │ │ spcs Manages Snowpark Container Services compute pools, services, image registries, and image repositories. │ │ sql Executes Snowflake query. │ │ stage Manages stages. │ │ streamlit Manages a Streamlit app in Snowflake. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Install with pipx¶
pipx provides an alternative to pip
that installs and executes Python packages into isolated virtual environments. Installing Snowflake CLI with pipx
does not, therefore, modify your current Python environment.
To install Snowflake CLI using pipx
, you must have pipx installed.
Run the following shell command:
pipx install snowflake-cli-labs
To verify that the software was installed successfully, run the following command:
snow --help
Usage: snow [OPTIONS] COMMAND [ARGS]... Snowflake CLI tool for developers. ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --version Shows version of the Snowflake CLI │ │ --info Shows information about the Snowflake CLI │ │ --config-file FILE Specifies Snowflake CLI configuration file that should be used [default: None] │ │ --install-completion Install completion for the current shell. │ │ --show-completion Show completion for the current shell, to copy it or customize the installation. │ │ --help -h Show this message and exit. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ app Manages a Snowflake Native App │ │ connection Manages connections to Snowflake. │ │ cortex Provides access to Snowflake Cortex. │ │ git Manages git repositories in Snowflake. │ │ notebook Manages notebooks in Snowflake. │ │ object Manages Snowflake objects like warehouses and stages │ │ snowpark Manages procedures and functions. │ │ spcs Manages Snowpark Container Services compute pools, services, image registries, and image repositories. │ │ sql Executes Snowflake query. │ │ stage Manages stages. │ │ streamlit Manages a Streamlit app in Snowflake. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Install command auto-completion functionality¶
Snowflake CLI supports standard shell tab completion functionality.
To install auto-completion into Snowflake CLI, perform the following steps:
Run the
snow --install-completion
command:snow --install-completion
zsh completion installed in <user home>/.zfunc/_snow Completion will take effect once you restart the terminal
Run the
snow --show-completion
command to generate the commands you need to add to your shell profile (.bashrc
,.bash_profile
,.zshrc
, and others):snow --show-completion
_snow_completion() { local IFS=$' ' COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \ COMP_CWORD=$COMP_CWORD \ _SNOW_COMPLETE=complete_bash $1 ) ) return 0 } complete -o default -F _snow_completion snow
Select and copy the command output text.
Open your shell profile file,
.bashrc
in this example, and paste the copied text:export SHELL=/bin/bash ... _snow_completion() { local IFS=$' ' COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \ COMP_CWORD=$COMP_CWORD \ _SNOW_COMPLETE=complete_bash $1 ) ) return 0 } complete -o default -F _snow_completion snow
Save the file.
To activate the tab-completion functionality, restart your shell or
source
your shell profile file, such as:source ~/.bashrc
To test the feature, enter a snow command followed by a
TAB
, as shown:snow app [TAB]
deploy init open run teardown version