{"id":10237,"library":"snowflake-cli-labs","title":"Snowflake CLI","description":"The `snowflake-cli-labs` package provides the official Snowflake Command Line Interface (CLI), a powerful tool for interacting with Snowflake accounts, managing objects, and deploying applications like Snowpark Container Services or Streamlit apps. It's developed by Snowflake-Labs, with version 3.16.0 currently active. Releases typically align with Snowflake platform updates and feature developments.","status":"active","version":"3.16.0","language":"en","source_language":"en","source_url":"https://github.com/Snowflake-Labs/snowflake-cli","tags":["snowflake","cli","data-engineering","cloud","data-warehouse","devops"],"install":[{"cmd":"pip install snowflake-cli-labs","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Requires Python 3.10 or newer.","package":"python","optional":false}],"imports":[{"note":"The `snowflake-cli-labs` package is primarily a command-line interface tool, exposing the `snow` command. Direct programmatic import of its components is uncommon for general use. For advanced scenarios (e.g., testing or building custom commands/extensions), the internal Python module is `snowcli`.","wrong":"from snowflake_cli_labs import app","symbol":"app","correct":"from snowcli.cli_app import app"}],"quickstart":{"code":"# 1. Verify installation and see available commands\nsnow --help\n\n# 2. Add a new connection profile (replace with your details)\n# This will prompt for your Snowflake account URL, username, and password.\n# The 'default' profile is used if no other is specified.\nsnow connection add --name default\n\n# 3. List existing connection profiles\nsnow connection list\n\n# 4. Run a simple SQL query\nsnow sql -q \"SELECT current_version();\"","lang":"bash","description":"The Snowflake CLI is primarily used via the `snow` command in your terminal. This quickstart demonstrates verifying installation, configuring a connection, and running a basic SQL query."},"warnings":[{"fix":"Uninstall the old `snowcli` if present, then `pip install snowflake-cli-labs`. Review the migration guide for specific command changes and `project.toml` schema updates.","message":"The `snowflake-cli-labs` package is the official successor to the older, standalone `snowcli` (pre-v1.0). Users of the legacy `snowcli` must migrate, as commands, configurations, and functionalities may differ significantly.","severity":"breaking","affected_versions":"< 1.0 (legacy snowcli)"},{"fix":"Use `snow connection add --help` to understand available options. Ensure your account locator, username, and authentication method (e.g., browser popup, `SNOWFLAKE_PASSWORD` environment variable, or key file path) are correctly configured for your chosen profile.","message":"Connection authentication methods and profile management can be a common source of issues. The CLI supports browser-based, username/password, and key-pair authentication, each with specific setup requirements.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always refer to the official Snowflake CLI documentation for the current `project.toml` schema when upgrading your CLI or migrating existing projects. You may need to update section names, properties, or file paths.","message":"The schema for `project.toml` files, used for deploying Snowpark applications, Streamlit apps, or other Snowflake objects, can change between major CLI versions. This may require manual updates to your project definitions.","severity":"breaking","affected_versions":"All major versions (e.g., 2.x to 3.x)"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Run `pip install snowflake-cli-labs` to install. If already installed, ensure your Python environment's script directory is in your system's PATH.","cause":"The `snowflake-cli-labs` package is not installed, or the `snow` executable is not in your system's PATH.","error":"Command 'snow' not found"},{"fix":"Run `snow connection add --name <profile_name>` to create and configure the connection profile. Use `snow connection list` to see existing profiles.","cause":"The specified connection profile does not exist or has not been configured using `snow connection add`.","error":"Error: Invalid connection profile: <profile_name>"},{"fix":"If you need to programmatically access CLI components (which is rare for general use), use `import snowcli` or `from snowcli.<submodule> import <symbol>`.","cause":"You are attempting to import the package using its PyPI name `snowflake_cli_labs`, but its internal Python module name is `snowcli`.","error":"ModuleNotFoundError: No module named 'snowflake_cli_labs'"},{"fix":"Verify your username, password/key, and account locator. For browser-based auth, ensure no pop-up blockers are interfering. For key-pair, double-check the path to your private key. Try `snow connection add --name <profile_name>` again or consult the Snowflake documentation for your specific authentication method.","cause":"The credentials provided for the connection profile are incorrect, expired, or the authentication method is misconfigured (e.g., incorrect key file path, browser pop-up blocked).","error":"Failed to create connection: Failed to connect to DB: Authentication failed"}]}