@sdt-tools/cli 0.2.6 β†’ 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,6 +11,8 @@ npm i -g @sdt-tools/cli
11
11
  sdt --help
12
12
  ```
13
13
 
14
+ πŸ“Ί **See it in action (60s each):** [Schema Compare](https://youtu.be/8bfHNoG2rdc) Β· [Safe deploy](https://youtu.be/bhjOkE4fSiE) Β· [Extract account](https://youtu.be/8aZ4P8WaRjM) Β· [all demos on YouTube](https://www.youtube.com/channel/UCc3L8L8BBOO9lVLI1V2FFNQ)
15
+
14
16
  ## What it does
15
17
 
16
18
  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.
package/dist/cli.js CHANGED
@@ -476,6 +476,26 @@ var COMMAND_LOADERS = {
476
476
  "query-log": async () => (await import("./query-log-6OM4GI7W.js")).queryLogCommand(),
477
477
  savings: async () => (await import("./savings-RHIXP6IT.js")).savingsCommand()
478
478
  };
479
+ async function tierGateHook(actionCommand) {
480
+ const path = [];
481
+ for (let c = actionCommand; c && c.parent; c = c.parent) {
482
+ path.unshift(c.name());
483
+ }
484
+ const licenseNs = await import("@sdt-tools/core/license");
485
+ const gate = licenseNs.findCommandGate(path);
486
+ if (!gate) return;
487
+ const requiredTier = licenseNs.resolveRequiredTier(gate.requiredTier, actionCommand.opts());
488
+ const access = await licenseNs.resolveAccessForCommand(requiredTier, gate.label);
489
+ if (!access.allowed) {
490
+ logger.error(access.blockedReason ?? `"${gate.label}" requires a ${requiredTier} license.`);
491
+ process.exitCode = 1;
492
+ process.exit(1);
493
+ return;
494
+ }
495
+ if (access.trialNotice) {
496
+ console.log(chalk.dim(access.trialNotice));
497
+ }
498
+ }
479
499
  async function main() {
480
500
  const firstArg = process.argv[2];
481
501
  if (firstArg === "--version" || firstArg === "-v") {
@@ -520,6 +540,12 @@ async function main() {
520
540
  "",
521
541
  "Personalized suggestions:",
522
542
  " sdt discover # feature tips based on your usage history",
543
+ "",
544
+ "Watch the 60-second demos:",
545
+ " Schema Compare https://youtu.be/8bfHNoG2rdc",
546
+ " Safe deploy https://youtu.be/bhjOkE4fSiE",
547
+ " Extract account https://youtu.be/8aZ4P8WaRjM",
548
+ " All demos https://www.youtube.com/channel/UCc3L8L8BBOO9lVLI1V2FFNQ",
523
549
  ""
524
550
  ].join("\n")
525
551
  );
@@ -533,6 +559,9 @@ async function main() {
533
559
  const reporting = await import("./errorReporting-AQXKKGZH.js");
534
560
  await reporting.finishErrorReporting(CLI_VERSION);
535
561
  });
562
+ program.hook("preAction", async (_thisCommand, actionCommand) => {
563
+ await tierGateHook(actionCommand);
564
+ });
536
565
  program.hook("postAction", async (_thisCommand, actionCommand) => {
537
566
  if (actionCommand.parent !== program) return;
538
567
  const { FeatureAdvisor, SDT_HINT_RULES } = await import("@sdt-tools/core/discovery");
@@ -570,6 +599,7 @@ if (process.env["SDT_CLI_NO_MAIN"] !== "1") {
570
599
  });
571
600
  }
572
601
  export {
573
- COMMAND_LOADERS
602
+ COMMAND_LOADERS,
603
+ tierGateHook
574
604
  };
575
605
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/cli.ts","../src/commandManifest.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * `sdt` command entry point.\n *\n * Subcommand modules are loaded LAZILY: only the requested subcommand's\n * module (and its `@sdt-tools/core` dependency chain) is imported on the common\n * path. `--help` / `--version` / no-arg / unknown-command paths fall back\n * to loading every command so Commander can render the full subcommand\n * list.\n *\n * Cold-start win: `sdt <known-cmd> ...` skips ~80 command-module loads\n * and their per-module `@sdt-tools/core/...` imports. Reasoning in\n * docs/BACKLOG.md COLD cluster + the 200 ms cold-start standing bar.\n */\nimport { Command, Help } from 'commander';\nimport { logger } from './util/logger.js';\n// RH4.2 β€” core modules are imported LAZILY (dynamic `import()` at the use\n// site), NOT eagerly at module top. The eager subpath imports of\n// `@sdt-tools/core/{discovery,features,outputStyle}` each statically pulled\n// their whole barrel subtree into the startup chunk, which Node parsed +\n// evaluated on every invocation β€” including the `--version` / `--help`\n// fast paths that never touch them. Deferring them lets tsup code-split\n// those subtrees out of the eager chunk so cold start pays only Node\n// bootstrap + commander + the requested command. `import type` is free\n// (erased at compile), so types stay top-level. The barrel (`@sdt-tools/core`)\n// is still never imported β€” subpath / dynamic only (RH3.3 pin).\nimport type { OutputStyle } from '@sdt-tools/core/outputStyle';\nimport { COMMAND_MANIFEST } from './commandManifest.js';\nimport chalk from 'chalk';\n\nconst VALID_OUTPUT_STYLES = new Set<OutputStyle>(['standard', 'audit', 'ci', 'review', 'terse']);\n\n/**\n * Resolve the default `--style` value without eagerly loading the\n * `@sdt-tools/core/outputStyle` module on the cold-start path. Mirrors\n * `resolveOutputStyle()` exactly (env var β†’ default 'standard'); the flag\n * value is not yet known here (commander resolves it after parse), so this\n * only folds in `SDT_OUTPUT_STYLE`. Kept in lockstep with\n * core/outputStyle/style.ts `resolveOutputStyle`.\n */\nfunction defaultOutputStyle(): OutputStyle {\n const env = process.env['SDT_OUTPUT_STYLE'];\n if (env && VALID_OUTPUT_STYLES.has(env as OutputStyle)) return env as OutputStyle;\n return 'standard';\n}\n\nconst CLI_VERSION = '0.2.6';\n\n// Cold-start timestamp for `sdt perf cold-start`. ESM hoists imports above\n// this line, so a plain `process.hrtime.bigint()` here would EXCLUDE the\n// import cost from the measurement. Back-date the stamp to true process\n// start (`performance.now()` counts from process timeOrigin) so the\n// reported number covers Node bootstrap + ESM imports + command dispatch.\n// `??=` preserves a value pre-set by any earlier bootstrap wrapper.\n(globalThis as { __SDT_START_NS__?: bigint }).__SDT_START_NS__ ??=\n process.hrtime.bigint() - BigInt(Math.round(performance.now() * 1e6));\n\n// Mapping of CLI subcommand-name β†’ lazy loader. Each loader resolves to\n// the Commander `Command` instance for that subcommand. When you add a\n// new top-level `sdt <name>` command, add its entry here. Aliases (`erd`)\n// can re-use the same module export with a different factory name.\nexport const COMMAND_LOADERS: Record<string, () => Promise<Command>> = {\n init: async () => (await import('./commands/init.js')).initCommand(),\n extract: async () => (await import('./commands/extract.js')).extractCommand(),\n build: async () => (await import('./commands/build.js')).buildCommand(),\n publish: async () => (await import('./commands/publish.js')).publishCommand(),\n compare: async () => (await import('./commands/compare.js')).compareCommand(),\n drift: async () => (await import('./commands/drift.js')).driftCommand(),\n validate: async () => (await import('./commands/validate.js')).validateCommand(),\n connection: async () => (await import('./commands/connection.js')).connectionCommand(),\n refactor: async () => (await import('./commands/refactor.js')).refactorCommand(),\n import: async () => (await import('./commands/import.js')).importCommand(),\n 'import-script': async () => (await import('./commands/import-script.js')).importScriptCommand(),\n format: async () => (await import('./commands/format.js')).formatCommand(),\n completion: async () => (await import('./commands/completion.js')).completionCommand(),\n telemetry: async () => (await import('./commands/telemetry.js')).telemetryCommand(),\n license: async () => (await import('./commands/license.js')).licenseCommand(),\n trial: async () => (await import('./commands/trial.js')).trialCommand(),\n pilot: async () => (await import('./commands/pilot.js')).pilotCommand(),\n suite: async () => (await import('./commands/suite.js')).suiteCommand(),\n docs: async () => (await import('./commands/docs.js')).docsCommand(),\n erd: async () => (await import('./commands/docs.js')).erdCommand(),\n mcp: async () => (await import('./commands/mcp.js')).mcpCommand(),\n ai: async () => (await import('./commands/ai.js')).aiCommand(),\n explain: async () => (await import('./commands/explain.js')).explainCommand(),\n feedback: async () => (await import('./commands/feedback.js')).feedbackCommand(),\n lint: async () => (await import('./commands/lint.js')).lintCommand(),\n features: async () => (await import('./commands/features.js')).featuresCommand(),\n hosts: async () => (await import('./commands/hosts.js')).hostsCommand(),\n 'install-hooks': async () => (await import('./commands/install-hooks.js')).installHooksCommand(),\n history: async () => (await import('./commands/history.js')).historyCommand(),\n 'audit-log': async () => (await import('./commands/audit-log.js')).auditLogCommand(),\n verify: async () => (await import('./commands/verify.js')).verifyCommand(),\n graph: async () => (await import('./commands/graph.js')).graphCommand(),\n script: async () => (await import('./commands/script.js')).scriptCommand(),\n revert: async () => (await import('./commands/revert.js')).revertCommand(),\n snapshot: async () => (await import('./commands/snapshot.js')).snapshotCommand(),\n seed: async () => (await import('./commands/seed.js')).seedCommand(),\n lineage: async () => (await import('./commands/lineage.js')).lineageCommand(),\n diagnose: async () => (await import('./commands/diagnose.js')).diagnoseCommand(),\n review: async () => (await import('./commands/review.js')).reviewCommand(),\n impact: async () => (await import('./commands/impact.js')).impactCommand(),\n 'cost-estimate': async () => (await import('./commands/cost-estimate.js')).costEstimateCommand(),\n 'pr-comment': async () => (await import('./commands/pr-comment.js')).prCommentCommand(),\n template: async () => (await import('./commands/template.js')).templateCommand(),\n anonymize: async () => (await import('./commands/anonymize.js')).anonymizeCommand(),\n test: async () => (await import('./commands/test.js')).testCommand(),\n branch: async () => (await import('./commands/branch.js')).branchCommand(),\n schema: async () => (await import('./commands/schema.js')).schemaCommand(),\n suggest: async () => (await import('./commands/suggest.js')).suggestCommand(),\n safety: async () => (await import('./commands/safety.js')).safetyCommand(),\n pii: async () => (await import('./commands/pii.js')).piiCommand(),\n bisect: async () => (await import('./commands/bisect.js')).bisectCommand(),\n changelog: async () => (await import('./commands/changelog.js')).changelogCommand(),\n replay: async () => (await import('./commands/replay.js')).replayCommand(),\n 'drift-gate': async () => (await import('./commands/drift-gate.js')).driftGateCommand(),\n promote: async () => (await import('./commands/promote.js')).promoteCommand(),\n 'data-fit': async () => (await import('./commands/data-fit.js')).dataFitCommand(),\n 'data-compare': async () => (await import('./commands/data-compare.js')).dataCompareCommand(),\n approval: async () => (await import('./commands/approval.js')).approvalCommand(),\n 'advise-tests': async () => (await import('./commands/advise-tests.js')).adviseTestsCommand(),\n 'safer-alternative': async () =>\n (await import('./commands/safer-alternative.js')).saferAlternativeCommand(),\n sketch: async () => (await import('./commands/sketch.js')).sketchCommand(),\n design: async () => (await import('./commands/design.js')).designCommand(),\n optimize: async () => (await import('./commands/optimize.js')).optimizeCommand(),\n 'rollback-suggest': async () =>\n (await import('./commands/rollback-suggest.js')).rollbackSuggestCommand(),\n 'compare-profiles': async () =>\n (await import('./commands/compare-profiles.js')).compareProfilesCommand(),\n explorer: async () => (await import('./commands/explorer.js')).explorerCommand(),\n catalog: async () => (await import('./commands/catalog.js')).catalogCommand(),\n 'xcompare-ir': async () => (await import('./commands/xcompare.js')).xcompareCommand(),\n profile: async () => (await import('./commands/profile.js')).profileCommand(),\n 'suggest-constraints': async () =>\n (await import('./commands/suggest-constraints.js')).suggestConstraintsCommand(),\n export: async () => (await import('./commands/export.js')).exportCommand(),\n purge: async () => (await import('./commands/purge.js')).purgeCommand(),\n preview: async () => (await import('./commands/preview.js')).previewCommand(),\n refresh: async () => (await import('./commands/refresh.js')).refreshCommand(),\n discover: async () => (await import('./commands/discover.js')).discoverCommand(),\n find: async () => (await import('./commands/find.js')).findCommand(),\n 'scan-secrets': async () => (await import('./commands/scan-secrets.js')).scanSecretsCommand(),\n 'error-lookup': async () => (await import('./commands/error-lookup.js')).errorLookupCommand(),\n 'deploy-status': async () => (await import('./commands/deploy-status.js')).deployStatusCommand(),\n 'approval-chain': async () =>\n (await import('./commands/approval-chain.js')).approvalChainCommand(),\n standards: async () => (await import('./commands/standards.js')).standardsCommand(),\n perf: async () => (await import('./commands/perf.js')).perfCommand(),\n 'migrate-platform': async () =>\n (await import('./commands/migrate-platform.js')).migratePlatformCommand(),\n migrate: async () => (await import('./commands/migrate-from-dbt.js')).migrateFromDbtCommand(),\n backlog: async () => (await import('./commands/backlog.js')).backlogCommand(),\n watch: async () => (await import('./commands/watch.js')).watchCommand(),\n bookmarks: async () => (await import('./commands/bookmarks.js')).bookmarksCommand(),\n snippets: async () => (await import('./commands/snippets.js')).snippetsCommand(),\n generate: async () => (await import('./commands/generate.js')).generateCommand(),\n exec: async () => (await import('./commands/exec.js')).execCommand(),\n search: async () => (await import('./commands/search.js')).searchCommand(),\n 'query-log': async () => (await import('./commands/query-log.js')).queryLogCommand(),\n savings: async () => (await import('./commands/savings.js')).savingsCommand(),\n};\n\nasync function main(): Promise<void> {\n // RH4.2 cold-start fast path: `sdt -v` / `sdt --version` is the canonical\n // cold-start benchmark and must not load any command chunk. With code\n // splitting (tsup `splitting: true`) the no-arg / `--help` / `--version`\n // path otherwise loads ALL ~85 command chunks (separate files) so\n // commander can render the full subcommand list β€” dozens of disk reads\n // that dominate wall-clock on Windows. `--version` only needs the\n // version string, so short-circuit before building the program. Mirrors\n // commander's own `--version` output (bare version line) exactly.\n const firstArg = process.argv[2];\n if (firstArg === '--version' || firstArg === '-v') {\n process.stdout.write(CLI_VERSION + '\\n');\n return;\n }\n\n const program = new Command();\n program\n .name('sdt')\n .description('Snowflake Data Tools β€” declarative schema management for Snowflake.')\n .version(CLI_VERSION, '-v, --version')\n .option(\n '--style <mode>',\n 'Output style: standard | audit | ci | review | terse. Also reads SDT_OUTPUT_STYLE env var.',\n defaultOutputStyle(),\n )\n .option('--explain-features', 'After each command, show related features from the catalog.');\n\n // Decide whether to load all commands or just the requested one. The\n // \"explicit known command\" path is the cold-start win β€” every other\n // path needs the full subcommand list registered so Commander can\n // render --help or emit the standard \"unknown command\" error.\n const arg2 = process.argv[2];\n const explicitLoader = arg2 && !arg2.startsWith('-') ? COMMAND_LOADERS[arg2] : undefined;\n\n if (explicitLoader) {\n program.addCommand(await explicitLoader());\n } else {\n // RH4.7 β€” help / no-arg / unknown-command path. Register STUB\n // subcommands (name + description) from the static manifest instead of\n // loading all ~85 command modules. Commander renders the subcommand\n // list + the standard \"unknown command\" error from these stubs with\n // zero command-module imports. The stub carries no options/arguments,\n // so its rendered term would be just the bare name; override\n // `subcommandTerm` to emit the manifest's exact term (e.g.\n // `compare [options] <source> <target>`) so the --help columns are\n // byte-identical to the load-everything path. Per-command help\n // (`sdt <cmd> --help`) still loads the real module via the\n // explicit-loader path above, so argument/option detail is unaffected.\n for (const [name, entry] of Object.entries(COMMAND_MANIFEST)) {\n program.command(name).description(entry.description);\n }\n const defaultHelp = new Help();\n program.configureHelp({\n // Manifest commands render their exact term; the implicit `help`\n // subcommand (and anything else not in the manifest) falls back to\n // commander's own term so `help [command]` stays intact.\n subcommandTerm: (cmd) =>\n COMMAND_MANIFEST[cmd.name()]?.term ?? defaultHelp.subcommandTerm(cmd),\n });\n }\n\n // Global help footer β€” surfaces the searchable options catalog (`sdt\n // explain <query>`) on every command's --help screen. Free-tier\n // discoverability hook: users land in --help, see the hint, learn\n // they can ask `sdt explain allowDropTable` for safety + path detail\n // without leaving the terminal. Mirrors the DDT-side footer.\n program.addHelpText('afterAll', () =>\n [\n '',\n 'Options catalog:',\n ' Every CLI flag and `.sdtproj` option has a searchable entry with safety',\n ' tier, default, related options, and an example. Look one up with:',\n ' sdt explain <name> # e.g. sdt explain allowDropTable',\n ' sdt explain <topic> # fuzzy: \"drop\", \"safety\", \"compare\"',\n '',\n 'Features catalog (locked + unlocked):',\n ' sdt features list # what ships in each tier',\n ' sdt features show <id>',\n '',\n 'Personalized suggestions:',\n ' sdt discover # feature tips based on your usage history',\n '',\n ].join('\\n'),\n );\n\n // ERR.2 β€” error-reporting lifecycle. Lazily imported so the cold-start\n // path pays nothing; the preAction hook handles first-run consent +\n // crash-hook install, the postAction hook drains the spool when consent\n // is on. Both no-op fast for exempt commands (telemetry, feedback, help).\n program.hook('preAction', async (_thisCommand, actionCommand) => {\n if (actionCommand.parent !== program) return;\n const reporting = await import('./util/errorReporting.js');\n await reporting.setupErrorReporting(actionCommand.name());\n });\n program.hook('postAction', async (_thisCommand, actionCommand) => {\n if (actionCommand.parent !== program) return;\n const reporting = await import('./util/errorReporting.js');\n await reporting.finishErrorReporting(CLI_VERSION);\n });\n\n // Feature Discovery: fire a single contextual hint after each top-level\n // command succeeds. One line, dim, easy to ignore. Disabled with SDT_NO_HINTS=1.\n // RH4.2 β€” the FeatureAdvisor + hint rules and the features catalog are\n // imported LAZILY inside the hook so the cold-start path (which never\n // runs an action hook for `--version` / `--help`) pays nothing for them.\n program.hook('postAction', async (_thisCommand, actionCommand) => {\n // Only hint for direct sdt subcommands, not nested subcommands.\n if (actionCommand.parent !== program) return;\n const { FeatureAdvisor, SDT_HINT_RULES } = await import('@sdt-tools/core/discovery');\n const sdtAdvisor = new FeatureAdvisor('sdt', SDT_HINT_RULES);\n const tip = sdtAdvisor.advise(actionCommand.name());\n if (tip) {\n console.log(chalk.dim(`\\n ✦ ${tip}`));\n console.log(chalk.dim(' sdt discover Β· sdt features list'));\n }\n // DSC.6 β€” explain-features: when the global flag is set, show related\n // features from the catalog for the command that just ran.\n if ((program.opts() as { explainFeatures?: boolean }).explainFeatures) {\n const cmdName = actionCommand.name();\n const featuresNs = await import('@sdt-tools/core/features');\n const related = featuresNs.pickRelatedFeatures(\n featuresNs.SDT_FEATURE_CATALOG,\n cmdName,\n 3,\n 'sdt',\n );\n const hint = featuresNs.renderRelatedFeaturesHint(related, cmdName, 'sdt');\n if (hint) console.log(chalk.dim('\\n' + hint));\n }\n });\n\n await program.parseAsync(process.argv);\n}\n\n// Only auto-run when invoked as the CLI entry point, not when imported by\n// a test harness (the COMMAND_LOADERS / COMMAND_MANIFEST anti-drift test\n// imports this module to introspect the registry without dispatching).\nif (process.env['SDT_CLI_NO_MAIN'] !== '1') {\n main().catch(async (err: unknown) => {\n logger.error(err instanceof Error ? err.message : String(err));\n process.exitCode = 1;\n // ERR.2 β€” capture the failure and (with consent) report it; without\n // consent, offer a one-keystroke manual report. Never throws.\n try {\n const reporting = await import('./util/errorReporting.js');\n await reporting.reportCliFailure(err, CLI_VERSION);\n } catch {\n // Error reporting must never mask the original failure.\n }\n });\n}\n","/**\n * Static command manifest β€” subcommand name β†’ { term, description }.\n *\n * RH4.7: the `--help` / no-arg / unknown-command paths render the full\n * subcommand list. Building that list by loading every entry in\n * `COMMAND_LOADERS` forces ~85 lazy command chunks (and their\n * `@sdt-tools/core/...` dependency chains) off disk on a path that never\n * executes a command β€” the dominant cost of `sdt --help` cold start.\n *\n * Instead, the help/error paths register STUB subcommands from this\n * manifest and render the subcommand list from it, so Commander produces a\n * byte-identical subcommand list + usage error without importing a single\n * command module. The real module is loaded only when a known command is\n * actually dispatched (see `cli.ts`).\n *\n * - `term` β€” the exact left-column term Commander renders for the\n * command in the parent --help list (name + ` [options]`\n * when the command registers any option + the\n * human-readable positional-argument signature). Used to\n * override `subcommandTerm` so the help columns line up\n * identically to the load-everything path.\n * - `description` β€” the one-line string the command module passes to\n * commander's `.description(...)`.\n *\n * `commandManifest.test.ts` dynamically loads every `COMMAND_LOADERS` entry\n * and asserts both `term` and `description` match what the real module\n * registers, plus that the key set + order are identical β€” so any drift (a\n * changed description, a new/removed option or argument, a new command\n * without a manifest row, a stale row) fails the test rather than silently\n * rotting the help text.\n *\n * Key order is kept aligned with `COMMAND_LOADERS` in `cli.ts` so the\n * rendered `--help` subcommand ordering is unchanged.\n */\nexport interface CommandManifestEntry {\n /** Exact Commander subcommand term for the parent --help list. */\n readonly term: string;\n /** One-line description (must equal the module's `.description(...)`). */\n readonly description: string;\n}\n\nexport const COMMAND_MANIFEST: Record<string, CommandManifestEntry> = {\n init: {\n term: 'init [options]',\n description: 'Initialize a new SDT project in the current directory.',\n },\n extract: {\n term: 'extract [options]',\n description: 'Extract a Snowflake account/database/schema into a project layout.',\n },\n build: { term: 'build [options]', description: 'Build a .sdtpac from a .sdtproj project.' },\n publish: {\n term: 'publish [options]',\n description:\n 'Compare a .sdtpac (the desired state) to a live Snowflake target and apply (or dry-run) the migration. Shared form with `ddt publish`: `--source <desired> --connection <live-target>`.',\n },\n compare: {\n term: 'compare [options] [source] [target]',\n description:\n 'Compare two schemas. Sources may be .sdtproj, .sdtpac, or snowflake://<profile>[/db[/schema]].',\n },\n drift: {\n term: 'drift [options]',\n description:\n 'Check whether a live Snowflake target has drifted from the project pac or a dbt manifest.',\n },\n validate: {\n term: 'validate [options]',\n description:\n 'Validate a .sdtproj β€” schema check; optionally resolve every object reference (--references).',\n },\n connection: { term: 'connection', description: 'Manage Snowflake connection profiles.' },\n refactor: {\n term: 'refactor',\n description: 'Record refactor operations (renames, moves) so compare emits ALTER … RENAME.',\n },\n import: {\n term: 'import [options]',\n description: 'Convert artifacts from other tools into an SDT project.',\n },\n 'import-script': {\n term: 'import-script [options]',\n description:\n 'Parse a SQL script and write each DDL statement into the .sdtproj tree under its canonical folder.',\n },\n format: {\n term: 'format [options] [files...]',\n description:\n 'Format SQL files using the tokenizer-based v2 engine (refuse-on-invalid, idempotent, token-faithful).',\n },\n completion: {\n term: 'completion <shell>',\n description: 'Print shell completion script (bash, zsh, fish, powershell).',\n },\n telemetry: {\n term: 'telemetry',\n description: 'Control opt-in usage telemetry and automatic error reporting.',\n },\n license: {\n term: 'license',\n description: 'Manage the SDT license key (open-core, offline, warn-mode in v0.1).',\n },\n trial: { term: 'trial', description: 'Manage the SDT 30-day Pro trial (no account required).' },\n pilot: {\n term: 'pilot',\n description: 'Join or check the SDT pilot program (90-day Pro access for early adopters).',\n },\n suite: {\n term: 'suite',\n description: 'Manage a .sdtsuite β€” a collection of .sdtproj projects deploying together.',\n },\n docs: {\n term: 'docs [options]',\n description: 'Generate HTML schema docs from a .sdtproj or .sdtpac.',\n },\n erd: {\n term: 'erd [options]',\n description:\n 'Generate an ER diagram (Mermaid Markdown or interactive 3D HTML) from a .sdtproj or .sdtpac.',\n },\n mcp: {\n term: 'mcp',\n description:\n 'Start the SDT Model Context Protocol server on stdio (for Claude / Cursor / agents).',\n },\n ai: { term: 'ai', description: 'Configure and test the AI provider adapter (BYO key).' },\n explain: {\n term: 'explain [options] [query...]',\n description:\n 'Search the options catalog. Explains what an option does, when to use it, and what it pairs with.',\n },\n feedback: {\n term: 'feedback [options] <message...>',\n description: 'Send a feedback / bug / feature-request ticket to the SDT team.',\n },\n lint: {\n term: 'lint [options]',\n description:\n 'Lint a SQL script for risky deploy patterns. Exits non-zero on any ERROR-severity finding.',\n },\n features: {\n term: 'features',\n description:\n 'Browse SDT features. Free users see paid features too β€” with copy explaining what each one does and how to unlock it.',\n },\n hosts: {\n term: 'hosts',\n description:\n 'Browse every host SDT plugs into β€” CLI, VS Code, MCP agents, GitHub Actions, dbt, Airflow, etc. Shows supported versions and the host-specific tailoring notes.',\n },\n 'install-hooks': {\n term: 'install-hooks [options]',\n description:\n 'Install a git pre-commit hook that runs `sdt validate` + `sdt format --check` before each commit.',\n },\n history: {\n term: 'history [options]',\n description:\n 'List deploy manifests (default) or query the live Snowflake QUERY_HISTORY views via --last/--query/--verify.',\n },\n 'audit-log': {\n term: 'audit-log',\n description:\n 'Export deploy history to enterprise audit sinks (file / syslog / Splunk HEC / Datadog Logs).',\n },\n verify: {\n term: 'verify [options]',\n description: 'Recompute checksums on a .sdtpac and confirm every object matches the manifest.',\n },\n graph: {\n term: 'graph [options]',\n description: 'Build an object-dependency DAG and emit it as Mermaid or DOT.',\n },\n script: {\n term: 'script [options]',\n description:\n 'Generate a deploy SQL script for source β†’ target. Always offline β€” does not touch the account.',\n },\n revert: {\n term: 'revert [options]',\n description:\n 'Replay a previous deploy manifest in reverse, executing reverseSql for each successful step.',\n },\n snapshot: {\n term: 'snapshot',\n description:\n 'Inspect / prune the pre-deploy snapshot registry written by `sdt publish --apply`.',\n },\n seed: {\n term: 'seed',\n description:\n 'Reference / dimension data seeds. Declare static rows next to DDL; engine generates MERGEs.',\n },\n lineage: {\n term: 'lineage [options]',\n description: 'Extract data-flow lineage from a .sdtproj, .sdtpac, or dbt manifest.json.',\n },\n diagnose: {\n term: 'diagnose [options]',\n description:\n 'Project-level health report: lint + lineage smells + object smells + cost smells, with reasoning.',\n },\n review: {\n term: 'review [options]',\n description:\n 'Senior-DBA-style health report (lint + lineage + smell + cost + safety, with reasoning).',\n },\n impact: {\n term: 'impact [options] <fqn>',\n description:\n 'Single-FQN blast-radius: who feeds it, who reads from it, what findings apply to it.',\n },\n 'cost-estimate': {\n term: 'cost-estimate [options]',\n description: 'Heuristic Snowflake-credit estimate for a generated migration script.',\n },\n 'pr-comment': {\n term: 'pr-comment [options]',\n description:\n 'Generate a Markdown PR comment from a source↔target compare (diff + safety + health).',\n },\n template: {\n term: 'template [options] <kind> <name>',\n description:\n 'Scaffold a common schema pattern (scd1|scd2|scd3|scd4|scd6|star|fact|scd2-merge|current-view|time-series|audit). Writes .sql files into <out>/.',\n },\n anonymize: {\n term: 'anonymize [options]',\n description: 'Generate MASKING POLICY DDL for PII columns detected in the project model.',\n },\n test: {\n term: 'test',\n description:\n 'Declarative tests (unique / not_null / accepted_values / relationships / expression) compiled from YAML to SQL.',\n },\n branch: {\n term: 'branch',\n description: 'PlanetScale-style branching via Snowflake zero-copy clone. create / drop / list.',\n },\n schema: {\n term: 'schema',\n description:\n 'Interop with third-party schema formats (DBML import/export; draw.io export). NOT a separate data modeler β€” SDT remains the canonical model.',\n },\n suggest: {\n term: 'suggest [options]',\n description:\n 'Suggest FK / PK / UK / composite-PK candidates with reasoning. Output is Markdown by default.',\n },\n safety: {\n term: 'safety',\n description:\n 'Inspect the safety-finding catalog. See `sdt safety list` and `sdt safety explain <code>`.',\n },\n pii: {\n term: 'pii',\n description:\n 'Detect PII columns + render Snowflake MASKING POLICY DDL. See `sdt pii scan` and `sdt pii mask`.',\n },\n bisect: {\n term: 'bisect [options] <fqn>',\n description: 'Find the commit where a specific FQN first changed in the project tree.',\n },\n changelog: {\n term: 'changelog [options]',\n description:\n 'Generate a Markdown CHANGELOG section from git commits between two refs (Conventional Commits parser).',\n },\n replay: {\n term: 'replay [options]',\n description:\n 'Re-execute forwardSql from one or more deploy manifests against a target Snowflake account.',\n },\n 'drift-gate': {\n term: 'drift-gate [options]',\n description:\n 'Refuse-on-drift CI gate across multiple replica Snowflake accounts. Compares replicas against a primary.',\n },\n promote: {\n term: 'promote [options]',\n description:\n 'Branch-per-env deploy: compare live sourceβ†’target, optionally open a PR with the deploy bundle.',\n },\n 'data-fit': {\n term: 'data-fit [options]',\n description:\n 'Emit pre-flight SELECT count_if() probes for every narrowing type change in a pac↔pac compare. Run them against the live target before --apply.',\n },\n 'data-compare': {\n term: 'data-compare [options]',\n description:\n 'Row-level data compare: diff two tables by primary key and emit an INSERT/UPDATE/DELETE script that converts target into source. Source/target rows read from JSON files in v1.',\n },\n approval: {\n term: 'approval',\n description: 'Record / list / verify multi-approver gate tokens for prod deploys.',\n },\n 'advise-tests': {\n term: 'advise-tests [options]',\n description:\n 'PR-time AI regression-test advisor. Walks the SDT feature catalog, flags features whose surfaces match the changed files, and recommends 1–8 tests to add alongside the diff.',\n },\n 'safer-alternative': {\n term: 'safer-alternative [options]',\n description:\n 'AI-assist: propose a safer DDL alternative for a safety finding. Requires a configured AI provider (sdt ai status).',\n },\n sketch: {\n term: 'sketch [options] <kind>',\n description:\n 'AI-assist: scaffold idiomatic Snowflake DDL from a prose description. Output always carries a REVIEW BEFORE DEPLOY header.',\n },\n design: {\n term: 'design',\n description:\n 'AI-assist: generative schema-design scaffolds. Output always carries a REVIEW BEFORE RUNNING header.',\n },\n optimize: {\n term: 'optimize [options]',\n description:\n 'Surface ranked optimization recommendations (clustering, narrowing, missing PKs, dynamic-table lag).',\n },\n 'rollback-suggest': {\n term: 'rollback-suggest [options]',\n description:\n 'AI-assist: propose a reverse SQL for a forward DDL when the deterministic plan-to-steps bridge could not invert it. Output always carries a REVIEW BEFORE APPLY header. Standalone β€” not auto-wired into `revert`.',\n },\n 'compare-profiles': {\n term: 'compare-profiles',\n description: 'Manage saved compare profiles (.sdt/compare-profiles.json).',\n },\n explorer: {\n term: 'explorer [options]',\n description:\n 'ASCII tree dump of the cached catalog for a connection. Run `sdt catalog refresh` first to populate.',\n },\n catalog: {\n term: 'catalog',\n description:\n 'Manage the per-connection catalog cache used by the Object Explorer + EE2 intellisense.',\n },\n 'xcompare-ir': {\n term: 'xcompare-ir [options]',\n description:\n 'Cross-platform IR compare (Snowflake ↔ Databricks). Maps source IRs through XPM-Deep substrate; emits tier-gated safety assessment. IR-level only (live-warehouse compare is a follow-up).',\n },\n profile: {\n term: 'profile [options] <fqn>',\n description:\n 'Compute per-column profile statistics (nulls, distinct, min/max, top values) for a table. Rows are read from a JSON file in v1 (live-warehouse executeRows wiring is a documented follow-up).',\n },\n 'suggest-constraints': {\n term: 'suggest-constraints [options] <fqn>',\n description:\n 'Suggest PK/UK/FK/CHECK candidates for a profiled table. Reads a TableProfile JSON (from `sdt profile`) and emits suggestions with confidence tiers + rationale.',\n },\n export: {\n term: 'export',\n description: 'Export an SDT project to another format (DCM, etc.). v1 supports `dcm` only.',\n },\n purge: {\n term: 'purge [options]',\n description:\n 'Generate a DROP script for every object in the project (bulk teardown). Requires --confirm-production. Honours all per-type drop gates β€” relax with --allow-* flags.',\n },\n preview: {\n term: 'preview [options] <fqn>',\n description:\n 'Preview rows from a table (SELECT * FROM <fqn> LIMIT <n>). Read-only β€” requires a connection profile.',\n },\n refresh: {\n term: 'refresh [options]',\n description:\n 'Generate a REFRESH script for the dynamic tables + tasks in the project. Operator runs the output script explicitly.',\n },\n discover: {\n term: 'discover [options]',\n description: 'Show personalized feature suggestions based on your usage history.',\n },\n find: {\n term: 'find [options] <query...>',\n description: 'Search SDT features by keyword β€” find what you want to do.',\n },\n 'scan-secrets': {\n term: 'scan-secrets [options]',\n description: 'Scan a project or pac for hardcoded credentials in DDL bodies.',\n },\n 'error-lookup': {\n term: 'error-lookup [options]',\n description: 'Look up a failure in the known-error catalog by code, fingerprint, or message.',\n },\n 'deploy-status': {\n term: 'deploy-status [options] [deployId]',\n description: 'Show or list resumable deploy checkpoints written by `sdt publish`.',\n },\n 'approval-chain': {\n term: 'approval-chain',\n description: 'Signed M-of-N approval workflow (DSR.8).',\n },\n standards: {\n term: 'standards',\n description: 'Team SQL standards β€” init, check, fix, and explain.',\n },\n perf: {\n term: 'perf',\n description: 'CLI performance diagnostics (cold-start audit, hot-path profiling).',\n },\n 'migrate-platform': {\n term: 'migrate-platform [options] <path>',\n description:\n 'Translate Snowflake SQL files to another platform dialect. v1: --to databricks. Reads .sql files from <path> (file or directory).',\n },\n migrate: {\n term: 'migrate',\n description: 'Migrate from another tool to SDT (`from-dbt` subcommand only in v1).',\n },\n backlog: {\n term: 'backlog',\n description: 'Local-compute backlog tooling. Pure parse + score; no warehouse contact.',\n },\n watch: {\n term: 'watch',\n description:\n 'Platform-feature drift detector. Diffs release-notes markdown against a cached snapshot.',\n },\n bookmarks: {\n term: 'bookmarks [options]',\n description: 'Save fast-access pointers to queries, files, or named sections.',\n },\n snippets: {\n term: 'snippets',\n description: 'Browse the built-in SQL snippet catalog (SCD, star schema, data quality).',\n },\n generate: {\n term: 'generate',\n description: 'Code generation: ingest notebooks, SCD merge scripts, star-schema pipelines.',\n },\n exec: {\n term: 'exec [options] <file>',\n description: 'Run a SQL script on one or more connection profiles in parallel.',\n },\n search: {\n term: 'search [options] <pattern>',\n description: 'Find objects matching a name pattern across one or more connection profiles.',\n },\n 'query-log': {\n term: 'query-log',\n description: 'Browse and manage the local query log from the EE3 query window (AUTH.5).',\n },\n savings: {\n term: 'savings [options]',\n description: 'Show estimated AI token savings from using deterministic SDT surfaces.',\n },\n};\n"],"mappings":";;;;;;;AAcA,SAAS,SAAS,YAAY;;;AC2BvB,IAAM,mBAAyD;AAAA,EACpE,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,OAAO,EAAE,MAAM,mBAAmB,aAAa,2CAA2C;AAAA,EAC1F,SAAS;AAAA,IACP,MAAM;AAAA,IACN,aACE;AAAA,EACJ;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,aACE;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,aACE;AAAA,EACJ;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,aACE;AAAA,EACJ;AAAA,EACA,YAAY,EAAE,MAAM,cAAc,aAAa,wCAAwC;AAAA,EACvF,UAA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AAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../src/cli.ts","../src/commandManifest.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * `sdt` command entry point.\n *\n * Subcommand modules are loaded LAZILY: only the requested subcommand's\n * module (and its `@sdt-tools/core` dependency chain) is imported on the common\n * path. `--help` / `--version` / no-arg / unknown-command paths fall back\n * to loading every command so Commander can render the full subcommand\n * list.\n *\n * Cold-start win: `sdt <known-cmd> ...` skips ~80 command-module loads\n * and their per-module `@sdt-tools/core/...` imports. Reasoning in\n * docs/BACKLOG.md COLD cluster + the 200 ms cold-start standing bar.\n */\nimport { Command, Help } from 'commander';\nimport { logger } from './util/logger.js';\n// RH4.2 β€” core modules are imported LAZILY (dynamic `import()` at the use\n// site), NOT eagerly at module top. The eager subpath imports of\n// `@sdt-tools/core/{discovery,features,outputStyle}` each statically pulled\n// their whole barrel subtree into the startup chunk, which Node parsed +\n// evaluated on every invocation β€” including the `--version` / `--help`\n// fast paths that never touch them. Deferring them lets tsup code-split\n// those subtrees out of the eager chunk so cold start pays only Node\n// bootstrap + commander + the requested command. `import type` is free\n// (erased at compile), so types stay top-level. The barrel (`@sdt-tools/core`)\n// is still never imported β€” subpath / dynamic only (RH3.3 pin).\nimport type { OutputStyle } from '@sdt-tools/core/outputStyle';\nimport { COMMAND_MANIFEST } from './commandManifest.js';\nimport chalk from 'chalk';\n\nconst VALID_OUTPUT_STYLES = new Set<OutputStyle>(['standard', 'audit', 'ci', 'review', 'terse']);\n\n/**\n * Resolve the default `--style` value without eagerly loading the\n * `@sdt-tools/core/outputStyle` module on the cold-start path. Mirrors\n * `resolveOutputStyle()` exactly (env var β†’ default 'standard'); the flag\n * value is not yet known here (commander resolves it after parse), so this\n * only folds in `SDT_OUTPUT_STYLE`. Kept in lockstep with\n * core/outputStyle/style.ts `resolveOutputStyle`.\n */\nfunction defaultOutputStyle(): OutputStyle {\n const env = process.env['SDT_OUTPUT_STYLE'];\n if (env && VALID_OUTPUT_STYLES.has(env as OutputStyle)) return env as OutputStyle;\n return 'standard';\n}\n\nconst CLI_VERSION = '0.2.6';\n\n// Cold-start timestamp for `sdt perf cold-start`. ESM hoists imports above\n// this line, so a plain `process.hrtime.bigint()` here would EXCLUDE the\n// import cost from the measurement. Back-date the stamp to true process\n// start (`performance.now()` counts from process timeOrigin) so the\n// reported number covers Node bootstrap + ESM imports + command dispatch.\n// `??=` preserves a value pre-set by any earlier bootstrap wrapper.\n(globalThis as { __SDT_START_NS__?: bigint }).__SDT_START_NS__ ??=\n process.hrtime.bigint() - BigInt(Math.round(performance.now() * 1e6));\n\n// Mapping of CLI subcommand-name β†’ lazy loader. Each loader resolves to\n// the Commander `Command` instance for that subcommand. When you add a\n// new top-level `sdt <name>` command, add its entry here. Aliases (`erd`)\n// can re-use the same module export with a different factory name.\nexport const COMMAND_LOADERS: Record<string, () => Promise<Command>> = {\n init: async () => (await import('./commands/init.js')).initCommand(),\n extract: async () => (await import('./commands/extract.js')).extractCommand(),\n build: async () => (await import('./commands/build.js')).buildCommand(),\n publish: async () => (await import('./commands/publish.js')).publishCommand(),\n compare: async () => (await import('./commands/compare.js')).compareCommand(),\n drift: async () => (await import('./commands/drift.js')).driftCommand(),\n validate: async () => (await import('./commands/validate.js')).validateCommand(),\n connection: async () => (await import('./commands/connection.js')).connectionCommand(),\n refactor: async () => (await import('./commands/refactor.js')).refactorCommand(),\n import: async () => (await import('./commands/import.js')).importCommand(),\n 'import-script': async () => (await import('./commands/import-script.js')).importScriptCommand(),\n format: async () => (await import('./commands/format.js')).formatCommand(),\n completion: async () => (await import('./commands/completion.js')).completionCommand(),\n telemetry: async () => (await import('./commands/telemetry.js')).telemetryCommand(),\n license: async () => (await import('./commands/license.js')).licenseCommand(),\n trial: async () => (await import('./commands/trial.js')).trialCommand(),\n pilot: async () => (await import('./commands/pilot.js')).pilotCommand(),\n suite: async () => (await import('./commands/suite.js')).suiteCommand(),\n docs: async () => (await import('./commands/docs.js')).docsCommand(),\n erd: async () => (await import('./commands/docs.js')).erdCommand(),\n mcp: async () => (await import('./commands/mcp.js')).mcpCommand(),\n ai: async () => (await import('./commands/ai.js')).aiCommand(),\n explain: async () => (await import('./commands/explain.js')).explainCommand(),\n feedback: async () => (await import('./commands/feedback.js')).feedbackCommand(),\n lint: async () => (await import('./commands/lint.js')).lintCommand(),\n features: async () => (await import('./commands/features.js')).featuresCommand(),\n hosts: async () => (await import('./commands/hosts.js')).hostsCommand(),\n 'install-hooks': async () => (await import('./commands/install-hooks.js')).installHooksCommand(),\n history: async () => (await import('./commands/history.js')).historyCommand(),\n 'audit-log': async () => (await import('./commands/audit-log.js')).auditLogCommand(),\n verify: async () => (await import('./commands/verify.js')).verifyCommand(),\n graph: async () => (await import('./commands/graph.js')).graphCommand(),\n script: async () => (await import('./commands/script.js')).scriptCommand(),\n revert: async () => (await import('./commands/revert.js')).revertCommand(),\n snapshot: async () => (await import('./commands/snapshot.js')).snapshotCommand(),\n seed: async () => (await import('./commands/seed.js')).seedCommand(),\n lineage: async () => (await import('./commands/lineage.js')).lineageCommand(),\n diagnose: async () => (await import('./commands/diagnose.js')).diagnoseCommand(),\n review: async () => (await import('./commands/review.js')).reviewCommand(),\n impact: async () => (await import('./commands/impact.js')).impactCommand(),\n 'cost-estimate': async () => (await import('./commands/cost-estimate.js')).costEstimateCommand(),\n 'pr-comment': async () => (await import('./commands/pr-comment.js')).prCommentCommand(),\n template: async () => (await import('./commands/template.js')).templateCommand(),\n anonymize: async () => (await import('./commands/anonymize.js')).anonymizeCommand(),\n test: async () => (await import('./commands/test.js')).testCommand(),\n branch: async () => (await import('./commands/branch.js')).branchCommand(),\n schema: async () => (await import('./commands/schema.js')).schemaCommand(),\n suggest: async () => (await import('./commands/suggest.js')).suggestCommand(),\n safety: async () => (await import('./commands/safety.js')).safetyCommand(),\n pii: async () => (await import('./commands/pii.js')).piiCommand(),\n bisect: async () => (await import('./commands/bisect.js')).bisectCommand(),\n changelog: async () => (await import('./commands/changelog.js')).changelogCommand(),\n replay: async () => (await import('./commands/replay.js')).replayCommand(),\n 'drift-gate': async () => (await import('./commands/drift-gate.js')).driftGateCommand(),\n promote: async () => (await import('./commands/promote.js')).promoteCommand(),\n 'data-fit': async () => (await import('./commands/data-fit.js')).dataFitCommand(),\n 'data-compare': async () => (await import('./commands/data-compare.js')).dataCompareCommand(),\n approval: async () => (await import('./commands/approval.js')).approvalCommand(),\n 'advise-tests': async () => (await import('./commands/advise-tests.js')).adviseTestsCommand(),\n 'safer-alternative': async () =>\n (await import('./commands/safer-alternative.js')).saferAlternativeCommand(),\n sketch: async () => (await import('./commands/sketch.js')).sketchCommand(),\n design: async () => (await import('./commands/design.js')).designCommand(),\n optimize: async () => (await import('./commands/optimize.js')).optimizeCommand(),\n 'rollback-suggest': async () =>\n (await import('./commands/rollback-suggest.js')).rollbackSuggestCommand(),\n 'compare-profiles': async () =>\n (await import('./commands/compare-profiles.js')).compareProfilesCommand(),\n explorer: async () => (await import('./commands/explorer.js')).explorerCommand(),\n catalog: async () => (await import('./commands/catalog.js')).catalogCommand(),\n 'xcompare-ir': async () => (await import('./commands/xcompare.js')).xcompareCommand(),\n profile: async () => (await import('./commands/profile.js')).profileCommand(),\n 'suggest-constraints': async () =>\n (await import('./commands/suggest-constraints.js')).suggestConstraintsCommand(),\n export: async () => (await import('./commands/export.js')).exportCommand(),\n purge: async () => (await import('./commands/purge.js')).purgeCommand(),\n preview: async () => (await import('./commands/preview.js')).previewCommand(),\n refresh: async () => (await import('./commands/refresh.js')).refreshCommand(),\n discover: async () => (await import('./commands/discover.js')).discoverCommand(),\n find: async () => (await import('./commands/find.js')).findCommand(),\n 'scan-secrets': async () => (await import('./commands/scan-secrets.js')).scanSecretsCommand(),\n 'error-lookup': async () => (await import('./commands/error-lookup.js')).errorLookupCommand(),\n 'deploy-status': async () => (await import('./commands/deploy-status.js')).deployStatusCommand(),\n 'approval-chain': async () =>\n (await import('./commands/approval-chain.js')).approvalChainCommand(),\n standards: async () => (await import('./commands/standards.js')).standardsCommand(),\n perf: async () => (await import('./commands/perf.js')).perfCommand(),\n 'migrate-platform': async () =>\n (await import('./commands/migrate-platform.js')).migratePlatformCommand(),\n migrate: async () => (await import('./commands/migrate-from-dbt.js')).migrateFromDbtCommand(),\n backlog: async () => (await import('./commands/backlog.js')).backlogCommand(),\n watch: async () => (await import('./commands/watch.js')).watchCommand(),\n bookmarks: async () => (await import('./commands/bookmarks.js')).bookmarksCommand(),\n snippets: async () => (await import('./commands/snippets.js')).snippetsCommand(),\n generate: async () => (await import('./commands/generate.js')).generateCommand(),\n exec: async () => (await import('./commands/exec.js')).execCommand(),\n search: async () => (await import('./commands/search.js')).searchCommand(),\n 'query-log': async () => (await import('./commands/query-log.js')).queryLogCommand(),\n savings: async () => (await import('./commands/savings.js')).savingsCommand(),\n};\n\n/**\n * PIL.5 tier-gating enforcement β€” the body of the `preAction` hook `main()`\n * registers on `program`, extracted so it's independently testable (the\n * `preAction` callback itself calls `process.exit(1)` directly, which can't\n * be exercised safely except by mocking `process.exit` around a call to\n * this function β€” see `tests/tier-gate-hook.test.ts`). Walks `actionCommand`\n * up to its root to build the full subcommand path (so `sdt drift watch`\n * resolves to `['drift', 'watch']`, not just `['watch']`), looks it up in\n * `commandTiers.ts`'s `COMMAND_TIER_GATES`, and blocks (exit 1) or notes a\n * trial countdown exactly as `resolveAccessForCommand` decides.\n */\nexport async function tierGateHook(actionCommand: Command): Promise<void> {\n const path: string[] = [];\n for (let c: Command | null = actionCommand; c && c.parent; c = c.parent) {\n path.unshift(c.name());\n }\n const licenseNs = await import('@sdt-tools/core/license');\n const gate = licenseNs.findCommandGate(path);\n if (!gate) return;\n\n const requiredTier = licenseNs.resolveRequiredTier(gate.requiredTier, actionCommand.opts());\n const access = await licenseNs.resolveAccessForCommand(requiredTier, gate.label);\n if (!access.allowed) {\n logger.error(access.blockedReason ?? `\"${gate.label}\" requires a ${requiredTier} license.`);\n process.exitCode = 1;\n process.exit(1);\n // Unreachable in production (process.exit terminates); the explicit\n // return keeps control flow self-evidently safe under a test double\n // that mocks process.exit as a no-op instead of actually exiting.\n return;\n }\n if (access.trialNotice) {\n console.log(chalk.dim(access.trialNotice));\n }\n}\n\nasync function main(): Promise<void> {\n // RH4.2 cold-start fast path: `sdt -v` / `sdt --version` is the canonical\n // cold-start benchmark and must not load any command chunk. With code\n // splitting (tsup `splitting: true`) the no-arg / `--help` / `--version`\n // path otherwise loads ALL ~85 command chunks (separate files) so\n // commander can render the full subcommand list β€” dozens of disk reads\n // that dominate wall-clock on Windows. `--version` only needs the\n // version string, so short-circuit before building the program. Mirrors\n // commander's own `--version` output (bare version line) exactly.\n const firstArg = process.argv[2];\n if (firstArg === '--version' || firstArg === '-v') {\n process.stdout.write(CLI_VERSION + '\\n');\n return;\n }\n\n const program = new Command();\n program\n .name('sdt')\n .description('Snowflake Data Tools β€” declarative schema management for Snowflake.')\n .version(CLI_VERSION, '-v, --version')\n .option(\n '--style <mode>',\n 'Output style: standard | audit | ci | review | terse. Also reads SDT_OUTPUT_STYLE env var.',\n defaultOutputStyle(),\n )\n .option('--explain-features', 'After each command, show related features from the catalog.');\n\n // Decide whether to load all commands or just the requested one. The\n // \"explicit known command\" path is the cold-start win β€” every other\n // path needs the full subcommand list registered so Commander can\n // render --help or emit the standard \"unknown command\" error.\n const arg2 = process.argv[2];\n const explicitLoader = arg2 && !arg2.startsWith('-') ? COMMAND_LOADERS[arg2] : undefined;\n\n if (explicitLoader) {\n program.addCommand(await explicitLoader());\n } else {\n // RH4.7 β€” help / no-arg / unknown-command path. Register STUB\n // subcommands (name + description) from the static manifest instead of\n // loading all ~85 command modules. Commander renders the subcommand\n // list + the standard \"unknown command\" error from these stubs with\n // zero command-module imports. The stub carries no options/arguments,\n // so its rendered term would be just the bare name; override\n // `subcommandTerm` to emit the manifest's exact term (e.g.\n // `compare [options] <source> <target>`) so the --help columns are\n // byte-identical to the load-everything path. Per-command help\n // (`sdt <cmd> --help`) still loads the real module via the\n // explicit-loader path above, so argument/option detail is unaffected.\n for (const [name, entry] of Object.entries(COMMAND_MANIFEST)) {\n program.command(name).description(entry.description);\n }\n const defaultHelp = new Help();\n program.configureHelp({\n // Manifest commands render their exact term; the implicit `help`\n // subcommand (and anything else not in the manifest) falls back to\n // commander's own term so `help [command]` stays intact.\n subcommandTerm: (cmd) =>\n COMMAND_MANIFEST[cmd.name()]?.term ?? defaultHelp.subcommandTerm(cmd),\n });\n }\n\n // Global help footer β€” surfaces the searchable options catalog (`sdt\n // explain <query>`) on every command's --help screen. Free-tier\n // discoverability hook: users land in --help, see the hint, learn\n // they can ask `sdt explain allowDropTable` for safety + path detail\n // without leaving the terminal. Mirrors the DDT-side footer.\n program.addHelpText('afterAll', () =>\n [\n '',\n 'Options catalog:',\n ' Every CLI flag and `.sdtproj` option has a searchable entry with safety',\n ' tier, default, related options, and an example. Look one up with:',\n ' sdt explain <name> # e.g. sdt explain allowDropTable',\n ' sdt explain <topic> # fuzzy: \"drop\", \"safety\", \"compare\"',\n '',\n 'Features catalog (locked + unlocked):',\n ' sdt features list # what ships in each tier',\n ' sdt features show <id>',\n '',\n 'Personalized suggestions:',\n ' sdt discover # feature tips based on your usage history',\n '',\n 'Watch the 60-second demos:',\n ' Schema Compare https://youtu.be/8bfHNoG2rdc',\n ' Safe deploy https://youtu.be/bhjOkE4fSiE',\n ' Extract account https://youtu.be/8aZ4P8WaRjM',\n ' All demos https://www.youtube.com/channel/UCc3L8L8BBOO9lVLI1V2FFNQ',\n '',\n ].join('\\n'),\n );\n\n // ERR.2 β€” error-reporting lifecycle. Lazily imported so the cold-start\n // path pays nothing; the preAction hook handles first-run consent +\n // crash-hook install, the postAction hook drains the spool when consent\n // is on. Both no-op fast for exempt commands (telemetry, feedback, help).\n program.hook('preAction', async (_thisCommand, actionCommand) => {\n if (actionCommand.parent !== program) return;\n const reporting = await import('./util/errorReporting.js');\n await reporting.setupErrorReporting(actionCommand.name());\n });\n program.hook('postAction', async (_thisCommand, actionCommand) => {\n if (actionCommand.parent !== program) return;\n const reporting = await import('./util/errorReporting.js');\n await reporting.finishErrorReporting(CLI_VERSION);\n });\n\n // PIL.5 β€” tier-gating enforcement. Runs for every command INCLUDING\n // nested subcommands (unlike the two hooks above, which only fire for\n // direct `sdt <cmd>` invocations) so `sdt drift watch`, `sdt approval\n // add`, etc. are covered by their own gate entries. Commands with no\n // entry in the table (Free tier, or a deliberately-deferred mixed-tier\n // command β€” see commandTiers.ts) pass through untouched.\n program.hook('preAction', async (_thisCommand, actionCommand) => {\n await tierGateHook(actionCommand);\n });\n\n // Feature Discovery: fire a single contextual hint after each top-level\n // command succeeds. One line, dim, easy to ignore. Disabled with SDT_NO_HINTS=1.\n // RH4.2 β€” the FeatureAdvisor + hint rules and the features catalog are\n // imported LAZILY inside the hook so the cold-start path (which never\n // runs an action hook for `--version` / `--help`) pays nothing for them.\n program.hook('postAction', async (_thisCommand, actionCommand) => {\n // Only hint for direct sdt subcommands, not nested subcommands.\n if (actionCommand.parent !== program) return;\n const { FeatureAdvisor, SDT_HINT_RULES } = await import('@sdt-tools/core/discovery');\n const sdtAdvisor = new FeatureAdvisor('sdt', SDT_HINT_RULES);\n const tip = sdtAdvisor.advise(actionCommand.name());\n if (tip) {\n console.log(chalk.dim(`\\n ✦ ${tip}`));\n console.log(chalk.dim(' sdt discover Β· sdt features list'));\n }\n // DSC.6 β€” explain-features: when the global flag is set, show related\n // features from the catalog for the command that just ran.\n if ((program.opts() as { explainFeatures?: boolean }).explainFeatures) {\n const cmdName = actionCommand.name();\n const featuresNs = await import('@sdt-tools/core/features');\n const related = featuresNs.pickRelatedFeatures(\n featuresNs.SDT_FEATURE_CATALOG,\n cmdName,\n 3,\n 'sdt',\n );\n const hint = featuresNs.renderRelatedFeaturesHint(related, cmdName, 'sdt');\n if (hint) console.log(chalk.dim('\\n' + hint));\n }\n });\n\n await program.parseAsync(process.argv);\n}\n\n// Only auto-run when invoked as the CLI entry point, not when imported by\n// a test harness (the COMMAND_LOADERS / COMMAND_MANIFEST anti-drift test\n// imports this module to introspect the registry without dispatching).\nif (process.env['SDT_CLI_NO_MAIN'] !== '1') {\n main().catch(async (err: unknown) => {\n logger.error(err instanceof Error ? err.message : String(err));\n process.exitCode = 1;\n // ERR.2 β€” capture the failure and (with consent) report it; without\n // consent, offer a one-keystroke manual report. Never throws.\n try {\n const reporting = await import('./util/errorReporting.js');\n await reporting.reportCliFailure(err, CLI_VERSION);\n } catch {\n // Error reporting must never mask the original failure.\n }\n });\n}\n","/**\n * Static command manifest β€” subcommand name β†’ { term, description }.\n *\n * RH4.7: the `--help` / no-arg / unknown-command paths render the full\n * subcommand list. Building that list by loading every entry in\n * `COMMAND_LOADERS` forces ~85 lazy command chunks (and their\n * `@sdt-tools/core/...` dependency chains) off disk on a path that never\n * executes a command β€” the dominant cost of `sdt --help` cold start.\n *\n * Instead, the help/error paths register STUB subcommands from this\n * manifest and render the subcommand list from it, so Commander produces a\n * byte-identical subcommand list + usage error without importing a single\n * command module. The real module is loaded only when a known command is\n * actually dispatched (see `cli.ts`).\n *\n * - `term` β€” the exact left-column term Commander renders for the\n * command in the parent --help list (name + ` [options]`\n * when the command registers any option + the\n * human-readable positional-argument signature). Used to\n * override `subcommandTerm` so the help columns line up\n * identically to the load-everything path.\n * - `description` β€” the one-line string the command module passes to\n * commander's `.description(...)`.\n *\n * `commandManifest.test.ts` dynamically loads every `COMMAND_LOADERS` entry\n * and asserts both `term` and `description` match what the real module\n * registers, plus that the key set + order are identical β€” so any drift (a\n * changed description, a new/removed option or argument, a new command\n * without a manifest row, a stale row) fails the test rather than silently\n * rotting the help text.\n *\n * Key order is kept aligned with `COMMAND_LOADERS` in `cli.ts` so the\n * rendered `--help` subcommand ordering is unchanged.\n */\nexport interface CommandManifestEntry {\n /** Exact Commander subcommand term for the parent --help list. */\n readonly term: string;\n /** One-line description (must equal the module's `.description(...)`). */\n readonly description: string;\n}\n\nexport const COMMAND_MANIFEST: Record<string, CommandManifestEntry> = {\n init: {\n term: 'init [options]',\n description: 'Initialize a new SDT project in the current directory.',\n },\n extract: {\n term: 'extract [options]',\n description: 'Extract a Snowflake account/database/schema into a project layout.',\n },\n build: { term: 'build [options]', description: 'Build a .sdtpac from a .sdtproj project.' },\n publish: {\n term: 'publish [options]',\n description:\n 'Compare a .sdtpac (the desired state) to a live Snowflake target and apply (or dry-run) the migration. Shared form with `ddt publish`: `--source <desired> --connection <live-target>`.',\n },\n compare: {\n term: 'compare [options] [source] [target]',\n description:\n 'Compare two schemas. Sources may be .sdtproj, .sdtpac, or snowflake://<profile>[/db[/schema]].',\n },\n drift: {\n term: 'drift [options]',\n description:\n 'Check whether a live Snowflake target has drifted from the project pac or a dbt manifest.',\n },\n validate: {\n term: 'validate [options]',\n description:\n 'Validate a .sdtproj β€” schema check; optionally resolve every object reference (--references).',\n },\n connection: { term: 'connection', description: 'Manage Snowflake connection profiles.' },\n refactor: {\n term: 'refactor',\n description: 'Record refactor operations (renames, moves) so compare emits ALTER … RENAME.',\n },\n import: {\n term: 'import [options]',\n description: 'Convert artifacts from other tools into an SDT project.',\n },\n 'import-script': {\n term: 'import-script [options]',\n description:\n 'Parse a SQL script and write each DDL statement into the .sdtproj tree under its canonical folder.',\n },\n format: {\n term: 'format [options] [files...]',\n description:\n 'Format SQL files using the tokenizer-based v2 engine (refuse-on-invalid, idempotent, token-faithful).',\n },\n completion: {\n term: 'completion <shell>',\n description: 'Print shell completion script (bash, zsh, fish, powershell).',\n },\n telemetry: {\n term: 'telemetry',\n description: 'Control opt-in usage telemetry and automatic error reporting.',\n },\n license: {\n term: 'license',\n description: 'Manage the SDT license key (open-core, offline, warn-mode in v0.1).',\n },\n trial: { term: 'trial', description: 'Manage the SDT 30-day Pro trial (no account required).' },\n pilot: {\n term: 'pilot',\n description: 'Join or check the SDT pilot program (90-day Pro access for early adopters).',\n },\n suite: {\n term: 'suite',\n description: 'Manage a .sdtsuite β€” a collection of .sdtproj projects deploying together.',\n },\n docs: {\n term: 'docs [options]',\n description: 'Generate HTML schema docs from a .sdtproj or .sdtpac.',\n },\n erd: {\n term: 'erd [options]',\n description:\n 'Generate an ER diagram (Mermaid Markdown or interactive 3D HTML) from a .sdtproj or .sdtpac.',\n },\n mcp: {\n term: 'mcp',\n description:\n 'Start the SDT Model Context Protocol server on stdio (for Claude / Cursor / agents).',\n },\n ai: { term: 'ai', description: 'Configure and test the AI provider adapter (BYO key).' },\n explain: {\n term: 'explain [options] [query...]',\n description:\n 'Search the options catalog. Explains what an option does, when to use it, and what it pairs with.',\n },\n feedback: {\n term: 'feedback [options] <message...>',\n description: 'Send a feedback / bug / feature-request ticket to the SDT team.',\n },\n lint: {\n term: 'lint [options]',\n description:\n 'Lint a SQL script for risky deploy patterns. Exits non-zero on any ERROR-severity finding.',\n },\n features: {\n term: 'features',\n description:\n 'Browse SDT features. Free users see paid features too β€” with copy explaining what each one does and how to unlock it.',\n },\n hosts: {\n term: 'hosts',\n description:\n 'Browse every host SDT plugs into β€” CLI, VS Code, MCP agents, GitHub Actions, dbt, Airflow, etc. Shows supported versions and the host-specific tailoring notes.',\n },\n 'install-hooks': {\n term: 'install-hooks [options]',\n description:\n 'Install a git pre-commit hook that runs `sdt validate` + `sdt format --check` before each commit.',\n },\n history: {\n term: 'history [options]',\n description:\n 'List deploy manifests (default) or query the live Snowflake QUERY_HISTORY views via --last/--query/--verify.',\n },\n 'audit-log': {\n term: 'audit-log',\n description:\n 'Export deploy history to enterprise audit sinks (file / syslog / Splunk HEC / Datadog Logs).',\n },\n verify: {\n term: 'verify [options]',\n description: 'Recompute checksums on a .sdtpac and confirm every object matches the manifest.',\n },\n graph: {\n term: 'graph [options]',\n description: 'Build an object-dependency DAG and emit it as Mermaid or DOT.',\n },\n script: {\n term: 'script [options]',\n description:\n 'Generate a deploy SQL script for source β†’ target. Always offline β€” does not touch the account.',\n },\n revert: {\n term: 'revert [options]',\n description:\n 'Replay a previous deploy manifest in reverse, executing reverseSql for each successful step.',\n },\n snapshot: {\n term: 'snapshot',\n description:\n 'Inspect / prune the pre-deploy snapshot registry written by `sdt publish --apply`.',\n },\n seed: {\n term: 'seed',\n description:\n 'Reference / dimension data seeds. Declare static rows next to DDL; engine generates MERGEs.',\n },\n lineage: {\n term: 'lineage [options]',\n description: 'Extract data-flow lineage from a .sdtproj, .sdtpac, or dbt manifest.json.',\n },\n diagnose: {\n term: 'diagnose [options]',\n description:\n 'Project-level health report: lint + lineage smells + object smells + cost smells, with reasoning.',\n },\n review: {\n term: 'review [options]',\n description:\n 'Senior-DBA-style health report (lint + lineage + smell + cost + safety, with reasoning).',\n },\n impact: {\n term: 'impact [options] <fqn>',\n description:\n 'Single-FQN blast-radius: who feeds it, who reads from it, what findings apply to it.',\n },\n 'cost-estimate': {\n term: 'cost-estimate [options]',\n description: 'Heuristic Snowflake-credit estimate for a generated migration script.',\n },\n 'pr-comment': {\n term: 'pr-comment [options]',\n description:\n 'Generate a Markdown PR comment from a source↔target compare (diff + safety + health).',\n },\n template: {\n term: 'template [options] <kind> <name>',\n description:\n 'Scaffold a common schema pattern (scd1|scd2|scd3|scd4|scd6|star|fact|scd2-merge|current-view|time-series|audit). Writes .sql files into <out>/.',\n },\n anonymize: {\n term: 'anonymize [options]',\n description: 'Generate MASKING POLICY DDL for PII columns detected in the project model.',\n },\n test: {\n term: 'test',\n description:\n 'Declarative tests (unique / not_null / accepted_values / relationships / expression) compiled from YAML to SQL.',\n },\n branch: {\n term: 'branch',\n description: 'PlanetScale-style branching via Snowflake zero-copy clone. create / drop / list.',\n },\n schema: {\n term: 'schema',\n description:\n 'Interop with third-party schema formats (DBML import/export; draw.io export). NOT a separate data modeler β€” SDT remains the canonical model.',\n },\n suggest: {\n term: 'suggest [options]',\n description:\n 'Suggest FK / PK / UK / composite-PK candidates with reasoning. Output is Markdown by default.',\n },\n safety: {\n term: 'safety',\n description:\n 'Inspect the safety-finding catalog. See `sdt safety list` and `sdt safety explain <code>`.',\n },\n pii: {\n term: 'pii',\n description:\n 'Detect PII columns + render Snowflake MASKING POLICY DDL. See `sdt pii scan` and `sdt pii mask`.',\n },\n bisect: {\n term: 'bisect [options] <fqn>',\n description: 'Find the commit where a specific FQN first changed in the project tree.',\n },\n changelog: {\n term: 'changelog [options]',\n description:\n 'Generate a Markdown CHANGELOG section from git commits between two refs (Conventional Commits parser).',\n },\n replay: {\n term: 'replay [options]',\n description:\n 'Re-execute forwardSql from one or more deploy manifests against a target Snowflake account.',\n },\n 'drift-gate': {\n term: 'drift-gate [options]',\n description:\n 'Refuse-on-drift CI gate across multiple replica Snowflake accounts. Compares replicas against a primary.',\n },\n promote: {\n term: 'promote [options]',\n description:\n 'Branch-per-env deploy: compare live sourceβ†’target, optionally open a PR with the deploy bundle.',\n },\n 'data-fit': {\n term: 'data-fit [options]',\n description:\n 'Emit pre-flight SELECT count_if() probes for every narrowing type change in a pac↔pac compare. Run them against the live target before --apply.',\n },\n 'data-compare': {\n term: 'data-compare [options]',\n description:\n 'Row-level data compare: diff two tables by primary key and emit an INSERT/UPDATE/DELETE script that converts target into source. Source/target rows read from JSON files in v1.',\n },\n approval: {\n term: 'approval',\n description: 'Record / list / verify multi-approver gate tokens for prod deploys.',\n },\n 'advise-tests': {\n term: 'advise-tests [options]',\n description:\n 'PR-time AI regression-test advisor. Walks the SDT feature catalog, flags features whose surfaces match the changed files, and recommends 1–8 tests to add alongside the diff.',\n },\n 'safer-alternative': {\n term: 'safer-alternative [options]',\n description:\n 'AI-assist: propose a safer DDL alternative for a safety finding. Requires a configured AI provider (sdt ai status).',\n },\n sketch: {\n term: 'sketch [options] <kind>',\n description:\n 'AI-assist: scaffold idiomatic Snowflake DDL from a prose description. Output always carries a REVIEW BEFORE DEPLOY header.',\n },\n design: {\n term: 'design',\n description:\n 'AI-assist: generative schema-design scaffolds. Output always carries a REVIEW BEFORE RUNNING header.',\n },\n optimize: {\n term: 'optimize [options]',\n description:\n 'Surface ranked optimization recommendations (clustering, narrowing, missing PKs, dynamic-table lag).',\n },\n 'rollback-suggest': {\n term: 'rollback-suggest [options]',\n description:\n 'AI-assist: propose a reverse SQL for a forward DDL when the deterministic plan-to-steps bridge could not invert it. Output always carries a REVIEW BEFORE APPLY header. Standalone β€” not auto-wired into `revert`.',\n },\n 'compare-profiles': {\n term: 'compare-profiles',\n description: 'Manage saved compare profiles (.sdt/compare-profiles.json).',\n },\n explorer: {\n term: 'explorer [options]',\n description:\n 'ASCII tree dump of the cached catalog for a connection. Run `sdt catalog refresh` first to populate.',\n },\n catalog: {\n term: 'catalog',\n description:\n 'Manage the per-connection catalog cache used by the Object Explorer + EE2 intellisense.',\n },\n 'xcompare-ir': {\n term: 'xcompare-ir [options]',\n description:\n 'Cross-platform IR compare (Snowflake ↔ Databricks). Maps source IRs through XPM-Deep substrate; emits tier-gated safety assessment. IR-level only (live-warehouse compare is a follow-up).',\n },\n profile: {\n term: 'profile [options] <fqn>',\n description:\n 'Compute per-column profile statistics (nulls, distinct, min/max, top values) for a table. Rows are read from a JSON file in v1 (live-warehouse executeRows wiring is a documented follow-up).',\n },\n 'suggest-constraints': {\n term: 'suggest-constraints [options] <fqn>',\n description:\n 'Suggest PK/UK/FK/CHECK candidates for a profiled table. Reads a TableProfile JSON (from `sdt profile`) and emits suggestions with confidence tiers + rationale.',\n },\n export: {\n term: 'export',\n description: 'Export an SDT project to another format (DCM, etc.). v1 supports `dcm` only.',\n },\n purge: {\n term: 'purge [options]',\n description:\n 'Generate a DROP script for every object in the project (bulk teardown). Requires --confirm-production. Honours all per-type drop gates β€” relax with --allow-* flags.',\n },\n preview: {\n term: 'preview [options] <fqn>',\n description:\n 'Preview rows from a table (SELECT * FROM <fqn> LIMIT <n>). Read-only β€” requires a connection profile.',\n },\n refresh: {\n term: 'refresh [options]',\n description:\n 'Generate a REFRESH script for the dynamic tables + tasks in the project. Operator runs the output script explicitly.',\n },\n discover: {\n term: 'discover [options]',\n description: 'Show personalized feature suggestions based on your usage history.',\n },\n find: {\n term: 'find [options] <query...>',\n description: 'Search SDT features by keyword β€” find what you want to do.',\n },\n 'scan-secrets': {\n term: 'scan-secrets [options]',\n description: 'Scan a project or pac for hardcoded credentials in DDL bodies.',\n },\n 'error-lookup': {\n term: 'error-lookup [options]',\n description: 'Look up a failure in the known-error catalog by code, fingerprint, or message.',\n },\n 'deploy-status': {\n term: 'deploy-status [options] [deployId]',\n description: 'Show or list resumable deploy checkpoints written by `sdt publish`.',\n },\n 'approval-chain': {\n term: 'approval-chain',\n description: 'Signed M-of-N approval workflow (DSR.8).',\n },\n standards: {\n term: 'standards',\n description: 'Team SQL standards β€” init, check, fix, and explain.',\n },\n perf: {\n term: 'perf',\n description: 'CLI performance diagnostics (cold-start audit, hot-path profiling).',\n },\n 'migrate-platform': {\n term: 'migrate-platform [options] <path>',\n description:\n 'Translate Snowflake SQL files to another platform dialect. v1: --to databricks. Reads .sql files from <path> (file or directory).',\n },\n migrate: {\n term: 'migrate',\n description: 'Migrate from another tool to SDT (`from-dbt` subcommand only in v1).',\n },\n backlog: {\n term: 'backlog',\n description: 'Local-compute backlog tooling. Pure parse + score; no warehouse contact.',\n },\n watch: {\n term: 'watch',\n description:\n 'Platform-feature drift detector. Diffs release-notes markdown against a cached snapshot.',\n },\n bookmarks: {\n term: 'bookmarks [options]',\n description: 'Save fast-access pointers to queries, files, or named sections.',\n },\n snippets: {\n term: 'snippets',\n description: 'Browse the built-in SQL snippet catalog (SCD, star schema, data quality).',\n },\n generate: {\n term: 'generate',\n description: 'Code generation: ingest notebooks, SCD merge scripts, star-schema pipelines.',\n },\n exec: {\n term: 'exec [options] <file>',\n description: 'Run a SQL script on one or more connection profiles in parallel.',\n },\n search: {\n term: 'search [options] <pattern>',\n description: 'Find objects matching a name pattern across one or more connection profiles.',\n },\n 'query-log': {\n term: 'query-log',\n description: 'Browse and manage the local query log from the EE3 query window (AUTH.5).',\n },\n savings: {\n term: 'savings [options]',\n description: 'Show estimated AI token savings from using deterministic SDT surfaces.',\n },\n};\n"],"mappings":";;;;;;;AAcA,SAAS,SAAS,YAAY;;;AC2BvB,IAAM,mBAAyD;AAAA,EACpE,MAAM;AAAA,IACJ,MAA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,IAER;AAAA,EACF,CAAC;AACH;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdt-tools/cli",
3
- "version": "0.2.6",
3
+ "version": "0.3.0",
4
4
  "description": "SDT command-line interface. `sdt` lets you extract, build, compare, and deploy Snowflake schemas.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Varol Consulting LLC",
@@ -24,12 +24,21 @@
24
24
  "README.md",
25
25
  "LICENSE"
26
26
  ],
27
+ "scripts": {
28
+ "build": "tsup",
29
+ "clean": "rimraf dist",
30
+ "dev": "tsup --watch",
31
+ "start": "node ./dist/cli.js",
32
+ "test": "vitest run --passWithNoTests",
33
+ "test:watch": "vitest --passWithNoTests",
34
+ "typecheck": "tsc --noEmit"
35
+ },
27
36
  "dependencies": {
37
+ "@sdt-tools/core": "workspace:*",
28
38
  "chalk": "^5.3.0",
29
39
  "commander": "^14.0.0",
30
40
  "ora": "^9.4.0",
31
- "zod": "^4.4.3",
32
- "@sdt-tools/core": "0.2.6"
41
+ "zod": "^4.4.3"
33
42
  },
34
43
  "devDependencies": {
35
44
  "@types/node": "^25.9.1",
@@ -37,14 +46,5 @@
37
46
  "tsup": "^8.3.5",
38
47
  "typescript": "^6.0.0",
39
48
  "vitest": "^4.1.8"
40
- },
41
- "scripts": {
42
- "build": "tsup",
43
- "clean": "rimraf dist",
44
- "dev": "tsup --watch",
45
- "start": "node ./dist/cli.js",
46
- "test": "vitest run --passWithNoTests",
47
- "test:watch": "vitest --passWithNoTests",
48
- "typecheck": "tsc --noEmit"
49
49
  }
50
- }
50
+ }