{
  "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": {
    "paths": [
      "~/.snowflake/",
      "[configHome]/snowflake/",
      "[appData]/snowflake/",
      "%LOCALAPPDATA%/snowflake/"
    ],
    "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
    },
    "subcommand": [
      {
        "path": [
          "sql"
        ],
        "label": "Execute SQL",
        "description": "snow sql with a query, a file or standard input.",
        "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\n--query, -q TEXT\nQuery to execute.\n--filename, -f FILE\nFile to execute.\n--stdin, -i\nRead the query from standard input.\n--variable, -D TEXT\nString in format of key=value.\n--connection, -c, --environment TEXT\nName of the connection, as defined in your config.toml file.\n--database, --dbname TEXT\n--schema, --schemaname TEXT\n--role, --rolename TEXT\n--warehouse TEXT\n--format [TABLE|JSON|JSON_EXT|CSV|PLAIN]\nSpecifies the output format. Default: TABLE.\n--single-transaction / --no-single-transaction"
          }
        ],
        "field": [
          {
            "id": "query",
            "label": "Query",
            "type": "string",
            "option": [
              "--query",
              "-q"
            ],
            "sources": [
              "snow-docs"
            ]
          },
          {
            "id": "filename",
            "label": "SQL file",
            "type": "path",
            "option": [
              "--filename",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "snow-docs"
            ]
          },
          {
            "id": "stdin",
            "label": "Read query from standard input",
            "type": "boolean",
            "option": [
              "--stdin",
              "-i"
            ],
            "sources": [
              "snow-docs"
            ]
          },
          {
            "id": "variable",
            "label": "Template variables",
            "description": "key=value",
            "type": "string",
            "option": [
              "--variable",
              "-D"
            ],
            "multiple": true,
            "sources": [
              "snow-docs"
            ]
          },
          {
            "id": "connection",
            "label": "Connection",
            "type": "string",
            "option": [
              "--connection",
              "-c"
            ],
            "sources": [
              "snow-docs"
            ]
          },
          {
            "id": "database",
            "label": "Database",
            "type": "string",
            "option": [
              "--database"
            ],
            "sources": [
              "snow-docs"
            ]
          },
          {
            "id": "schema",
            "label": "Schema",
            "type": "string",
            "option": [
              "--schema"
            ],
            "sources": [
              "snow-docs"
            ]
          },
          {
            "id": "role",
            "label": "Role",
            "type": "string",
            "option": [
              "--role"
            ],
            "sources": [
              "snow-docs"
            ]
          },
          {
            "id": "warehouse",
            "label": "Warehouse",
            "type": "string",
            "option": [
              "--warehouse"
            ],
            "sources": [
              "snow-docs"
            ]
          },
          {
            "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"
            ]
          },
          {
            "id": "single_transaction",
            "label": "Single transaction",
            "type": "boolean",
            "option": [
              "--single-transaction"
            ],
            "sources": [
              "snow-docs"
            ]
          }
        ],
        "task": [
          {
            "id": "query",
            "label": "Run a query",
            "fields": [
              "query",
              "connection",
              "format"
            ],
            "required": [
              "query"
            ]
          },
          {
            "id": "file",
            "label": "Run a SQL file",
            "fields": [
              "filename",
              "connection",
              "variable"
            ],
            "required": [
              "filename"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "query",
              "filename",
              "connection",
              "format",
              "warehouse"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "stdin",
              "variable",
              "database",
              "schema",
              "role",
              "single_transaction"
            ]
          }
        ]
      }
    ]
  }
}
