CoCo CLI¶
This topic helps you get started with CoCo CLI, including installation, connection setup, and validation.
Before you begin, ensure you have a Snowflake account with access to the required Cortex models. See Prerequisites for full details.
Note
If you don’t have a Snowflake account, you can sign up for a free CoCo CLI trial.
CoCo CLI is not available on standard Snowflake trial accounts (for example, accounts created at trial.snowflake.com). To use CoCo CLI, you need either a paid Snowflake account or the dedicated CoCo CLI trial linked above.
Install CoCo CLI¶
CoCo CLI is available for macOS, Linux, and Windows (both WSL and native). Use the instructions below to install CoCo CLI on your platform.
macOS and Linux (including WSL)¶
To install CoCo CLI on macOS, Linux, or WSL, issue the following command in a shell:
This command downloads and runs the installation script, which installs the latest version of CoCo CLI.
The cortex executable is installed in ~/.local/bin by default. The installation script adds this directory
to your PATH by modifying your shell profile.
Tip
If the curl command fails due to ~/.curlrc, try the command below instead.
The -q flag prevents curl from reading your ~/.curlrc file. If you have custom options in .curlrc
(such as --verbose), they can interfere with the installation script. Always include -q when piping
curl output to a shell.
Windows native¶
To install CoCo CLI on Windows, issue the following command in PowerShell:
This command downloads and runs the installation script, which installs the latest version of CoCo CLI.
The cortex executable is installed in %LOCALAPPDATA%\cortex by default. The installation script adds
this directory to your PATH.
After installation, invoke CoCo CLI from the Run dialog (Win+R), Command Prompt (cmd.exe), or PowerShell.
Connect to Snowflake¶
After installing the CoCo CLI, issue the cortex command. A setup wizard guides you through the
initial configuration steps, including choosing or setting up a connection to Snowflake.
The first prompt asks you to choose a connection from the existing connections in the ~/.snowflake/connections.toml file
or to create a new connection.
- To use an existing connection, choose the connection from the list using the up and down arrow keys, then press Enter.
- To create a new connection, choose More options by pressing the down arrow key until it is highlighted, then press Enter. Follow the prompts to enter your Snowflake account details.
Note
The connections.toml is also used by the Snowflake CLI (snow command). If you have already set up a connection
for use with the Snowflake CLI, you can use that connection with the CoCo CLI.
Start using CoCo¶
Once connected, try your first request:
Type natural-language requests (such as “find tables with PII tags” or “generate a Streamlit app for SALES_MART.REVENUE”) and CoCo attempts to fulfill the request by orchestrating Snowflake-native skills and any MCP tools you have configured. For more information on configuring MCP tools, see MCP (Model Context Protocol).
As it works on your request, CoCo CLI displays its reasoning steps and actions in the terminal. From time to time, it may ask you for information that it needs. If you’re in plan mode, it will ask you to confirm each action.
Example requests¶
Discover your catalog¶
Generate and run SQL commands¶
Build applications¶
Work with Cortex Analyst¶
Prerequisites¶
To use CoCo CLI, you need the following:
-
A Snowflake user account with the necessary permissions to access the data you intend to use with CoCo CLI and to perform operations on it. This user must also have the SNOWFLAKE.CORTEX_USER or SNOWFLAKE.CORTEX_AGENT_USER database role. By default, SNOWFLAKE.CORTEX_USER is granted to all users through the PUBLIC role, but your organization may have explicitly revoked it to implement stricter access control.
-
Network access to your Snowflake server.
-
Snowflake CLI installed on your workstation.
-
One of the following supported platforms:
- macOS on Apple Silicon or Intel
- Linux on Intel or ARM
- Windows Subsystem for Linux (WSL) on Intel
- Windows Native on Intel
Note
Snowflake may add support for other platforms from time to time. Please let your Snowflake representative know if you have a specific platform requirement.
-
Local terminal access to the
bash,zsh, orfishshell on your platform.
For additional configuration options, troubleshooting, and advanced setup, see CoCo CLI reference.
Supported platforms¶
CoCo CLI currently supports the following platforms:
| Platform | Architecture |
|---|---|
| macOS | arm64, x64 |
| Linux | x64, arm64 |
| Windows | WSL on x64/amd64; Native on x64 |
Note
Snowflake may add support for other platforms from time to time. Please contact your Snowflake representative if you have a specific platform requirement.
Supported models¶
CoCo can use the Cortex large language models your role has access to, including Claude, OpenAI GPT, Gemini, and Grok models. New models are added as they’re released, so instead of a fixed list, CoCo shows you the models that are currently available to you. That in-product list is authoritative.
You can pick a specific model, or one of these Auto options that choose a model for you:
- Auto: Snowflake selects the model.
- Auto Intelligent: Favors the most capable models. Highest quality, highest cost.
- Auto Efficient: Optimizes for cost. Lowest cost, and might reduce quality on hard tasks.
Two things determine which models you can choose:
- Model access: the models granted to your active role. Snowflake Cortex controls model access
with role-based access control (RBAC). A user with the
ACCOUNTADMINrole grants a per-model application role, orCORTEX-MODEL-ROLE-ALLfor all current and future models, to each role that needs it. By default, users inherit access to all models through theSNOWFLAKE.PUBLICbootstrap grant. To list the models your active role can use, runSHOW CORTEX BASE MODELS IN SCHEMA SNOWFLAKE.MODELS. For more information, see SHOW CORTEX BASE MODELS. For how to restrict model access, see Control model access. - Regional availability: whether the model runs in your account’s region, or is reachable
through cross-region inference. For per-model regions, see
Regional availability. If a
model isn’t available in your region, a user with the
ACCOUNTADMINrole must enable cross-region inference.
To list the models available to your role or to switch models, use the /model command inside
a CoCo CLI session. To set the model for a single invocation, pass --model, as in
cortex --model auto.
Legal notices¶
Where your configuration of Cortex Code uses a model provided on the Model and Service Pass-Through Terms, your use of that model is further subject to the terms for that model on that page.
The data classification of inputs and outputs are as set forth in the following table.
| Input data classification | Output data classification | Designation |
|---|---|---|
| Usage Data | Customer Data | Covered AI Features [1] |
For additional information, refer to Snowflake AI and ML.