Cortex Code CLI

THE AI-CODING AGENT FOR PIPELINE ORCHESTRATION

Build, debug, and manage your Apache Airflow® DAGs faster with Cortex Code CLI.
One command to install. Your code and data never leave Snowflake.

MacOS / Linux

Windows

MacOS/Linux
curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh
Windows
irm https://ai.snowflake.com/static/cc-scripts/install.ps1 | iex

Build Faster Code Less

Built-in Airflow expertise for DAG authoring, failure debugging, data lineage, and Airflow 3 migration — all using natural language.

Browse Cortex Code Starter Prompts

Need inspiration? Ask Cortex Code: “What can you do?”

Debug a pipeline failure

DAG pipeline failures can stem from connection timeouts, SQL errors, or other issues buried in task logs. Diagnosing the root cause requires sifting through run state, task instances, and logs across multiple tasks

Prompt
Why did my_pipeline fail last night?

Explore a DAG

New to a DAG or investigating an issue? Instead of jumping between tabs in the Airflow UI, run a single command to get the full picture — task graph, schedule, recent run history, and current state.

Terminal command
cortex airflow dags explore --dag-id daily_orders_etl

Author a new DAG

Writing a new DAG means wiring up operators, setting dependencies, configuring connections, and writing boilerplate before you get to the actual logic. Describe what you need and Cortex Code builds it using your existing patterns and connections.

Prompt
Create a DAG that loads CSV files from S3 into my raw schema every 6 hours using the Snowflake provider

Trigger and wait

Trigger a DAG run and block until it completes — no switching to the UI, no polling. Useful for CI/CD pipelines, testing, or any workflow where you need the result before moving on.

Terminal command
cortex airflow runs trigger-wait --dag-id nightly_aggregation

Migrate to Airflow 3

Upgrading from Airflow 2 to 3 means combing through every DAG for deprecated imports, context keys, and metadata access patterns. Cortex Code automates the migration, applying fixes across your project.

Prompt
Migrate my DAGs from Airflow 2 to Airflow 3

Check instance health

Catching environment issues early means checking import errors, DAG warnings, scheduler status, and run statistics, which usually requires clicking through multiple UI pages. Get it all in a single command.

Terminal command
cortex airflow health

What customers are saying about Cortex Code

Shelter Insurance logo

“Cortex Code helps us reduce friction in everyday data and AI development while maintaining the controls and oversight we need in a regulated environment. Our teams can build faster with the context they need to be successful.”

Vibhor Gupta
VP of Enterprise Data & AI, Shelter Mutual Insurance
LendingTree logo

“Cortex Code gives our teams a simple, in-platform way to move quickly from exploring ideas to delivering AI-driven workflows directly on Snowflake.”

Srinivas Madabushi
Sr. Vice President, Technology, LendingTree
United Rentals logo

“Cortex Code helps our engineers improve the performance of our business intelligence tools, meaningfully reducing the time it takes to improve quality and speed of Natural Language Query responses.”

Tony Leopold
Chief Technology and Strategy Officer, United Rentals

Frequently Asked Questions

If you're already a Snowflake customer, there's nothing new to sign up for — no separate contract, no subscription. Cortex Code CLI is billed on token consumption through your existing Snowflake account, the same way Cortex Agents and Snowflake Intelligence are billed. Rates are in the Service Consumption Table.

Any compute or storage the agent triggers (warehouses, tables, etc.) is billed separately at your normal Snowflake rates.

New to Snowflake? Sign up at signup.snowflake.com/cortex-code for a free trial with bundled usage. After 30 days it converts to a monthly paid subscription. You may cancel at any time (and manage other aspects of your subscription) through your Account Dashboard. Any compute or storage the agent triggers (warehouses, tables, etc.) is billed separately at your normal Snowflake rates.

Run cortex in your terminal and it walks you through picking (or creating) a connection and logging in — browser-based auth, SSO, whatever you already use. It reads the same connection files as the Snowflake CLI, so there's nothing extra to configure.

Cortex Code runs inside Snowflake's existing RBAC and governance — it can only touch what your roles allow. The CLI also sandboxes OS access, prompts before risky operations, and supports org-managed policies that lock down tools, accounts, and overrides. Inputs and outputs fall under Snowflake's AI and Pass-Through Terms. More detail in the Security best practices doc.

macOS, Linux (including WSL), and Windows. Run it in any terminal — standalone or inside VS Code, Cursor, etc. It works with your local repos, git, dbt, and other CLI tools while staying Snowflake-aware.