Skip to main content

Code quality checks Integration testing CLI Action testing

Snowflake CLI

Snowflake CLI is an open-source command-line tool explicitly designed for developer-centric workloads in addition to SQL operations. It is a flexible and extensible tool that can accommodate modern development practices and technologies.

With Snowflake CLI, developers can create, manage, update, and view apps running on Snowflake across workloads such as Streamlit in Snowflake, the Snowflake Native App Framework, Snowpark Container Services, and Snowpark. It supports a range of Snowflake features, including user-defined functions, stored procedures, Streamlit in Snowflake, and SQL execution.

Docs: https://docs.snowflake.com/en/developer-guide/snowflake-cli-v2/index.

Quick start: https://quickstarts.snowflake.com/guide/getting-started-with-snowflake-cli

Cheatsheet: https://github.com/Snowflake-Labs/sf-cheatsheets/blob/main/snowflake-cli.md

Feel free to file an issue or submit a PR here for general cases. For official support, contact Snowflake support at: https://community.snowflake.com/s/article/How-To-Submit-a-Support-Case-in-Snowflake-Lodge

snow feedback sends a rating and an optional note to Snowflake. Pass --rating from 1 (poor) to 4 (excellent). A note is optional for people and required for an AI agent: name the command you ran, what you expected, and what happened. Pass --yes when stdin is not a terminal. Do not include passwords, tokens, private keys, account locators, data from Snowflake accounts, or SQL that contains customer data.

Install Snowflake CLI

The direct installer downloads a signed platform binary from the Snowflake CLI repository and unpacks a versioned snow into your home directory.

macOS / Linux / WSL:

curl -LsS https://sfc-repo.snowflakecomputing.com/snowflake-cli/install.sh | sh

Windows (PowerShell):

irm https://sfc-repo.snowflakecomputing.com/snowflake-cli/install.ps1 | iex

On ARM64 Windows, the installer selects the x64 package when the channel has no ARM package. Windows runs that package under emulation.

Pin a release with --version (or SNOWFLAKE_CLI_VERSION). Pass --no-auto-upgrade with a pin so later snow invocations do not replace it via auto-upgrade. This is the same flag as the root snow --no-auto-upgrade:

curl -LsS https://sfc-repo.snowflakecomputing.com/snowflake-cli/install.sh | sh -s -- --version 3.29.0 --no-auto-upgrade
.\install.ps1 -Version 3.29.0 -NoAutoUpgrade
# or, without saving the script first:
& ([scriptblock]::Create((irm https://sfc-repo.snowflakecomputing.com/snowflake-cli/install.ps1))) -Version 3.29.0 -NoAutoUpgrade

irm ... | iex cannot pass flags. With it, set $env:SNOWFLAKE_CLI_VERSION to pin a release. --no-auto-upgrade has no environment-variable form.

--no-auto-upgrade writes auto_upgrade = false under [cli] in the config.toml the CLI reads. If that file is a symlink, or has a cli table the installer cannot edit safely, the installer stops before installing and tells you what to add yourself.

Upgrade later with snow upgrade (same-major only). This is the only installer that supports it. On ARM64 Windows, snow upgrade and auto-upgrade select the x64 package when the channel has no ARM package. Windows runs that package under emulation. A published ARM package is used when one is in the manifest. snow --info reports installation_source; snow --version does not.

Auto-upgrade is off until you opt in, and it applies only to a direct install. Set auto_upgrade = true under [cli] in config.toml, or SNOWFLAKE_CLI_AUTO_UPGRADE=1 for one process. Turn it off with SNOWFLAKE_CLI_AUTO_UPGRADE=0, snow --no-auto-upgrade, or the installer flag --no-auto-upgrade.

Install with uv (PyPi)

Install Snowflake CLI in an isolated environment using uv. Requires Python >= 3.11. snow upgrade refuses on this channel.

uv tool install snowflake-cli
snow --help

Or, with a single command

uvx --from snowflake-cli snow --help

Install with Homebrew (Mac only)

Requires Homebrew.

There are two ways to install Snowflake CLI via Homebrew:

Option 1 – Homebrew core formula (simpler, no tap required):

brew install snowflake-cli
snow --help

The formula is maintained by the Homebrew community and may trail the latest release.

Option 2 – Snowflake-maintained tap (recommended for latest releases):

The tap distributes a pre-built binary (cask) maintained directly by Snowflake and updated with every release. Homebrew requires you to explicitly trust third-party taps before installing casks from them:

brew tap snowflakedb/snowflake-cli
brew trust --cask snowflakedb/snowflake-cli/snowflake-cli
brew install --cask snowflake-cli
snow --help

Once trusted, future upgrades work normally: brew upgrade --cask snowflake-cli

Install from source

Requires Python >= 3.11 and git

git clone https://github.com/snowflakedb/snowflake-cli
cd snowflake-cli
# you can also do the below in an active virtual environment:
# python -m venv .venv
# source .venv/bin/activate
hatch build && pip install .
snow --version

You should now be able to run snow and get the CLI message.

Customize the SQL REPL prompt

The interactive snow sql prompt remains > unless you opt in with --prompt-format or a quoted prompt_format string in the [cli] section of config.toml. Placeholders (case-insensitive) are [user], [host], [account], [role], [warehouse], [database], [schema], and [connection] (the -c connection name). They update after USE. Example:

snow sql --prompt-format "[user]#[warehouse]@[database].[schema]> "

Missing values render as (no user), (no database), and so on. \n is a newline; \[, \], and \\ are literal [, ], and \. Use [#rrggbb] for a foreground colour and [bg:#rrggbb] for a background colour. A colour applies to the prompt text that follows it; it does not colour SQL input. Quote the value because # starts a TOML comment. For example:

[cli]
prompt_format = """┌──[#bca81f][user]@[account].[role].[warehouse].[database].[schema]
[#ffff00]└─$"""

SnowSQL often puts a colour after the marker (└─$[#ffff00]). Here that trailing token is a no-op: it does not colour typed SQL. Place [#ffff00] before └─$ if you want the marker itself yellow.

Unknown bracketed tokens are dropped from the prompt and reported with a warning when the REPL starts. Prefix a colour directive with \[ to display it literally.

Default output format

Commands print a table unless you pass --format. To change that default, set output_format in the [cli] section of config.toml or the SNOWFLAKE_CLI_OUTPUT_FORMAT environment variable. Allowed values are TABLE, JSON, JSON_EXT, CSV, and PLAIN. --format on the command line still wins. In snow sql, !set output_format=<format> changes the format for later statements in that session. !set timing=false hides the Time Elapsed line that follows each statement. !set timing_in_output_file=true also writes that line into a file opened with !spool. Both accept true, yes, on, and 1, or false, no, off, and 0. An empty value is rejected and leaves the current setting unchanged. timing is on by default and timing_in_output_file is off, so a spool file keeps the results only. JSON, JSON_EXT, and CSV output never include the line. !set echo=true prints each statement before its result, on the terminal and in an open !spool file. The default is echo=false. JSON, JSON_EXT, and CSV stay free of that statement so the result stays parseable. One !set changes one option. !set output_file=<path> opens the same file as !spool <path>, and !spool off closes it. To spool from the start of a run, pass -o output_file=<path>. To hide query results on the terminal from the start of a run, pass -o quiet=true. It accepts the same values as !set quiet, and an open spool file still receives the results. To set the output format from the start of a run, pass -o output_format=<format>. It accepts the same names as !set output_format and overrides the output_format config key and the SNOWFLAKE_CLI_OUTPUT_FORMAT variable. It cannot be combined with --format: passing both is an error and no SQL runs. !set output_format can still change the format later. -o timing=false and -o timing_in_output_file=true set the matching !set options from the start of a run. Only the interactive REPL prints the Time Elapsed line, so with -q, -f, or -i a false value changes nothing and a true value prints a warning.

[cli]
output_format = "JSON"

Get involved

Have a feature idea? Running into a bug? Want to contribute? We'd love to hear from you! Please open or review issues, open pull requests, or reach out to us on developers@snowflake.com

See CONTRIBUTING.md for development setup and contribution guidelines.

Metadata

Release files for snowflake-cli 3.35.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snowflake-cli 3.35.0
File Size Uploaded Provenance Actions
snowflake_cli-3.35.0.tar.gz 3.6 MB Without provenance Details for snowflake_cli-3.35.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for snowflake-cli 3.35.0
File Interpreter ABI Platform Actions
snowflake_cli-3.35.0-py3-none-any.whl Python 3 none any Details for snowflake_cli-3.35.0-py3-none-any.whl

Total release size: 4.8 MB

Release files / snowflake_cli-3.35.0.tar.gz

Download URL snowflake_cli-3.35.0.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
8e277c4f57c1383ee8525fca7c30a89200e064c48120ea50876baba8062890a5
BLAKE2b-256 checksum
How to use checksums
796916b286115d45c35dac09c62518b79f93905781a346088e865ebfc7e8b2bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

Release files / snowflake_cli-3.35.0-py3-none-any.whl

Download URL snowflake_cli-3.35.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
647323a62c8d58a88034205d73db27a83138105d3162707a3081994274a33578
BLAKE2b-256 checksum
How to use checksums
08d172e9d5acddd0a2cbc3f9bdcdc132f215171a6fc4939edb0f2a2c6a1723d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

Security for snowflake-cli 3.35.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.35.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page