id = "snowflake-cli" name = "Snowflake CLI" homepage = "https://docs.snowflake.com/en/developer-guide/snowflake-cli" description = "A command-line interface for configuring and using Snowflake connections." executables = ["snow"] [dotfiles] # https://docs.snowflake.com/en/developer-guide/snowflake-cli/connecting/configure-cli # — Snowflake CLI first uses ~/.snowflake/config.toml (and connections.toml when # present), then documents OS-specific fallback locations under the user's # config directory. The directory path is explicit so all supported files can # be carried without guessing at future filenames. paths = [ "~/.snowflake/", "[configHome]/snowflake/", "[appData]/snowflake/", "%LOCALAPPDATA%/snowflake/", ] # Snowflake's official connection docs warn that config.toml/connections.toml # may contain passwords, tokens and private-key settings, so those files are # treated as whole-file credentials. secret = [ "~/.snowflake/config.toml", "~/.snowflake/connections.toml", "[configHome]/snowflake/config.toml", "[configHome]/snowflake/connections.toml", "[appData]/snowflake/config.toml", "[appData]/snowflake/connections.toml", "%LOCALAPPDATA%/snowflake/config.toml", "%LOCALAPPDATA%/snowflake/connections.toml", ] side_effect = false [commands] format = 1 label = "Run SQL" description = "Run a query or SQL file against a Snowflake connection. Other snow commands (apps, streamlit, stage, ...) and authentication options are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = false } [[commands.subcommand]] path = ["sql"] label = "Execute SQL" description = "snow sql with a query, a file or standard input." [[commands.subcommand.source]] id = "snow-docs" kind = "manual" url = "https://docs.snowflake.com/en/developer-guide/snowflake-cli/command-reference/sql-commands/sql" revision = "Snowflake CLI docs 2026-10" evidence = '''snow sql --query, -q TEXT Query to execute. --filename, -f FILE File to execute. --stdin, -i Read the query from standard input. --variable, -D TEXT String in format of key=value. --connection, -c, --environment TEXT Name of the connection, as defined in your config.toml file. --database, --dbname TEXT --schema, --schemaname TEXT --role, --rolename TEXT --warehouse TEXT --format [TABLE|JSON|JSON_EXT|CSV|PLAIN] Specifies the output format. Default: TABLE. --single-transaction / --no-single-transaction''' [[commands.subcommand.field]] id = "query" label = "Query" type = "string" option = ["--query", "-q"] sources = ["snow-docs"] [[commands.subcommand.field]] id = "filename" label = "SQL file" type = "path" option = ["--filename", "-f"] path = { kind = "file", role = "input" } sources = ["snow-docs"] [[commands.subcommand.field]] id = "stdin" label = "Read query from standard input" type = "boolean" option = ["--stdin", "-i"] sources = ["snow-docs"] [[commands.subcommand.field]] id = "variable" label = "Template variables" description = "key=value" type = "string" option = ["--variable", "-D"] multiple = true sources = ["snow-docs"] [[commands.subcommand.field]] id = "connection" label = "Connection" type = "string" option = ["--connection", "-c"] sources = ["snow-docs"] [[commands.subcommand.field]] id = "database" label = "Database" type = "string" option = ["--database"] sources = ["snow-docs"] [[commands.subcommand.field]] id = "schema" label = "Schema" type = "string" option = ["--schema"] sources = ["snow-docs"] [[commands.subcommand.field]] id = "role" label = "Role" type = "string" option = ["--role"] sources = ["snow-docs"] [[commands.subcommand.field]] id = "warehouse" label = "Warehouse" type = "string" option = ["--warehouse"] sources = ["snow-docs"] [[commands.subcommand.field]] id = "format" label = "Output format" type = "enum" option = ["--format"] choices = [{ value = "TABLE", label = "TABLE" }, { value = "JSON", label = "JSON" }, { value = "JSON_EXT", label = "JSON_EXT" }, { value = "CSV", label = "CSV" }, { value = "PLAIN", label = "PLAIN" }] sources = ["snow-docs"] [[commands.subcommand.field]] id = "single_transaction" label = "Single transaction" type = "boolean" option = ["--single-transaction"] sources = ["snow-docs"] [[commands.subcommand.task]] id = "query" label = "Run a query" fields = ["query", "connection", "format"] required = ["query"] [[commands.subcommand.task]] id = "file" label = "Run a SQL file" fields = ["filename", "connection", "variable"] required = ["filename"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["query", "filename", "connection", "format", "warehouse"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["stdin", "variable", "database", "schema", "role", "single_transaction"]