@sdt-tools/cli
v0.2.6
Published
SDT command-line interface. `sdt` lets you extract, build, compare, and deploy Snowflake schemas.
Readme
@sdt-tools/cli — Snowflake Data Tools
The sdt command: declarative schema management for Snowflake. Author each Snowflake object as a .sql file, compare your project against a live account, and deploy with a safety classifier that refuses destructive changes unless you opt in.
🚧 Public Beta — all features free during the 30-day beta. AI features are bring-your-own-API-key. After the beta, the free core stays free forever; Pro features keep working with warnings (no hard paywall).
Install
npm i -g @sdt-tools/cli
sdt --helpWhat it does
You describe the desired state of your schema as SQL files; sdt computes the deltas against the live account, classifies each change (SAFE / DESTRUCTIVE / EXPENSIVE / UNRECOVERABLE), emits a reviewable migration script, and captures a manifest for one-command rollback. No hand-written forward/backward migration files.
sdt init # scaffold a .sdtproj
sdt extract --target snowflake://prod # reverse-engineer a live account into .sql files
sdt compare --source ./MyProject.sdtproj --target snowflake://prod # diff + safety classification
sdt publish --source ./MyProject.sdtproj --target snowflake://prod # generate / apply migration (gated)Command overview
The CLI surface is broad; the lifecycle commands below are the core, and sdt --help lists the rest (lineage, diagnose, review, lint, drift, refactor, import, MCP server, AI helpers, and more).
| Command | Purpose |
| ------------------------------ | -------------------------------------------------------------------------------------- |
| sdt init | Scaffold a new .sdtproj. |
| sdt extract | Snapshot a live Snowflake account into a project tree. |
| sdt build | Compile a .sdtproj into a .sdtpac artifact. |
| sdt compare | Diff any pair of: project, pac, live account — with per-change safety class. |
| sdt publish | Generate (and optionally apply) a migration script. Destructive ops gated. |
| sdt drift | Report when a live account has drifted from your project / pac. |
| sdt validate | Validate a .sdtproj against the schema. |
| sdt connection | Manage Snowflake connection profiles. |
| sdt safety explain <code> | Teaching page for a safety finding: why it's dangerous, safer alternatives. |
| sdt revert --manifest <path> | Roll back a captured deploy in one command. |
| sdt lint / sdt format | Lint and format project SQL. |
| sdt lineage / sdt graph | Column-level lineage and dependency graphs. |
| sdt import | Migrate from schemachange, dbt, dacpac, Liquibase/Flyway, Atlas, raw .sql, and more. |
| sdt mcp | Run the MCP server so agents (Claude, Cursor, Continue) can call the engine. |
| sdt feedback | Send feedback / report a bug. |
Full reference: docs/CLI_REFERENCE.md. Every flag and .sdtproj option is also searchable in-terminal with sdt explain <name>.
AI features (bring your own key)
AI composes on top of the deterministic engine — useful without it. Supply your own API key for Anthropic, OpenAI, Azure OpenAI, any OpenAI-compatible endpoint, or a self-hosted model (Enterprise can route through Snowflake Cortex). Examples: sdt compare --explain (plain-English diff narration), sdt sketch <kind> (prose → DDL), sdt safer-alternative. Calls are billed by your provider; sdt adds no markup.
Also available
- VS Code extension — "Snowflake Data Tools" on the Marketplace (the GUI counterpart).
- Public repo (issues, docs, pricing): https://github.com/GVOrganization/sdt-tools.
Privacy
Opt-in error reporting only. When enabled, sdt sends sanitized diagnostics (error fingerprints, path-stripped stack traces, command name, version) — never your SQL, identifiers, data, or credentials. Toggle with sdt telemetry. See PRIVACY.md.
SDT is an independent tool and is not affiliated with or endorsed by Snowflake Inc.
License: Apache-2.0.
