SnowConvert AI CLI - Getting Started¶
Note
Important SnowConvert AI (scai) replaces our older CLI (snowct). snowct is deprecated and will no longer be in active development. If you have any concerns, please write us at snowconvert-support@snowflake.com.
What is SnowConvert AI CLI?¶
SnowConvert AI CLI (scai) encapsulates all SnowConvert functions into a single command line tool dedicated to increasing the speed of migrations from various source platforms into Snowflake.
With the SnowConvert AI CLI, migration engineers can extract code from their source platform, run a deterministic conversion on that code, further advance their migration using ai-conversion to cover objects that the deterministic engine could not translate, deploy that code to snowflake, migrate data from the source system to snowflake, and then validate that data between the two systems.
The CLI will also allow developers to create skills and agents that utilize the tool to automate their process.
Prerequisites¶
macOS, Windows, or Linux
Snowflake CLI: recommended for Snowflake connection configuration (install guide)
Snowflake Connection Setup¶
The SnowConvert AI CLI reuses your Snowflake CLI connection configuration.
Before using scai init, scai code convert, scai code extract, scai ai-convert or scai code deploy, ensure:
You can connect to Snowflake with snow connection test
Your Snowflake CLI has a default connection configured (the one used when you don’t specify a connection name)
Once configured, scai code deploy will use your Snowflake CLI connections automatically.
Installation¶
Package Manager (macOS only)¶
PUBLIC and BETA channels are available via
Verify installation:
If you encounter issues, perform a clean install:
Installer packages (macOS, Linux, Windows)¶
BETA Releases¶
OS |
Package type |
Permalink |
|---|---|---|
macOS |
arm64 .pkg |
|
macOS |
x64 .pkg |
https://snowconvert.snowflake.com/storage/darwin_x64/beta/cli/snowflake-scai-cli-darwin-x64-beta.pkg |
Linux |
arm64 .rpm |
https://snowconvert.snowflake.com/storage/linux/beta/cli/snowflake-scai-cli-linux-arm64-beta.rpm |
Linux |
arm64 .deb |
https://snowconvert.snowflake.com/storage/linux/beta/cli/snowflake-scai-cli-linux-arm64-beta.deb |
Linux |
x64 .rpm |
https://snowconvert.snowflake.com/storage/linux/beta/cli/snowflake-scai-cli-linux-x64-beta.rpm |
Linux |
x64 .deb |
https://snowconvert.snowflake.com/storage/linux/beta/cli/snowflake-scai-cli-linux-x64-beta.deb |
Windows |
arm64 .msi |
|
Windows |
x64 .msi |
https://snowconvert.snowflake.com/storage/windows/beta/cli/snowflake-scai-cli-windows-x64-beta.msi |
Understanding Projects¶
A project is required before you can use any other scai command. This is similar to how Git requires you to run git init before using other Git commands.
A project:
Organizes your migration work in a dedicated folder structure
Tracks your source dialect (Oracle, SQL Server, Teradata, etc.)
Stores configuration, source code, converted code, and reports
When you run scai init, it creates this folder structure in the target directory.
If you pass a PATH, scai will create that folder (if it doesn’t exist) and initialize the project inside it.
If you omit PATH, scai initializes the current directory (which must be empty).
.
Important: After creating a project, run all subsequent scai commands from within the project folder (where the .scai/ directory exists).
CLI logs are written to ~/.scai/logs/jobs.log by default.
Quick Start: Code Conversion Only¶
Use this workflow when you have existing SQL files to convert. Works with all supported dialects.
# 1. Create a project folder and initialize it (project name is inferred from folder name)
# 2. Add your source code
# 3. Convert to Snowflake SQL
# 4. Deploy to Snowflake
Your converted code will be in the converted/ folder (including converted/Output/SnowConvert/), and conversion reports in converted/Reports/.
Quick Start: End-to-End Migration¶
Use this workflow to extract code directly from your source database. Only available for SQL Server and Redshift.
Step 1: Create Project¶
# Create a project folder and initialize it (project name is inferred from folder name)
Step 2: Configure Source Connection¶
# SQL Server (interactive mode - recommended)
# Redshift (interactive mode - recommended)
The interactive mode will prompt you for connection details. See for non-interactive options.
Set a default source connection (used when scai code extract runs without –source-connection):
# or:
Step 3: Extract, Convert, Deploy¶
# Extract code from source database
# Convert to Snowflake SQL
# Deploy to Snowflake
Workflow Examples¶
Example 1: Migrate Oracle Stored Procedures¶
Example 2: SQL Server End-to-End with Specific Schema¶
Example 4: AI Convert After Code Conversion¶
Getting Help¶
Use –help with any command to see available options:
Troubleshooting¶
“Project file not found”¶
You must run commands from within a project directory. Navigate to your project folder (where the .scai/ directory exists) before running commands:
“Connection not found” (source database)¶
List your connections:
scai connection list -l \<language\>Add a connection if needed:
scai connection add-sql-serverorscai connection add-redshiftOr set a default:
scai connection set-default -l \<language\> --connection-name \<name\>
“Authentication failed” for Snowflake¶
The SCAI CLI uses your Snowflake CLI configuration. Ensure your connection is working:
Make sure you have a default Snowflake connection configured in the Snowflake CLI (used when no connection name is specified).
Supported Source Dialects¶
Dialect |
Code Extraction |
Code Conversion |
Deployment |
|---|---|---|---|
SQL Server |
✅ |
✅ |
✅ |
Redshift |
✅ |
✅ |
✅ |
Oracle |
— |
✅ |
— |
Teradata |
— |
✅ |
— |
BigQuery |
— |
✅ |
— |
Databricks |
— |
✅ |
— |
Greenplum |
— |
✅ |
— |
Sybase |
— |
✅ |
— |
PostgreSQL |
— |
✅ |
— |
Netezza |
— |
✅ |
— |
Spark |
— |
✅ |
— |
Vertica |
— |
✅ |
— |
Hive |
— |
✅ |
— |
DB2 |
— |
✅ |
— |