SML CLI

raw JSON →
2026.3.0 verified Sat Apr 25 auth: no javascript

Semantic Modeling Language (SML) CLI tool for managing semantic layer deployments via AtScale or compatible backends. Current stable version is 2026.3.0, released quarterly following the SML specification versioning. Provides model validation, transformation, and lifecycle management from the command line. Differentiators include native TypeScript types, Node.js >=18 requirement, and adherence to the open SML standard for semantic models.

error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/sml-cli/index.js not supported.
cause Package is ESM-only and cannot be required with CommonJS require().
fix
Use import syntax or set type: module in package.json, or downgrade to v2025.x.
error TypeError: runCLI is not a function
cause Incorrect import: default import used instead of named import, or wrong path.
fix
Use import { runCLI } from 'sml-cli'
error Error: Unknown argument: --validate
cause Passing a single string instead of array of args to runCLI.
fix
Wrap arguments in array: runCLI(['--validate', 'model.sml'])
error MODULE_NOT_FOUND: Cannot find module 'sml-cli'
cause Package not installed or Node.js version <18.
fix
Install package: npm install sml-cli, and ensure Node >=18.
breaking ESM-only: CJS require() throws Module not found error. Package is ESM-only since v2026.0.0. Use import syntax.
fix Switch to ESM or downgrade to v2025.x (if available).
breaking Node.js >=18 required. Older Node versions cause runtime errors.
fix Upgrade Node.js to 18 or later.
gotcha CLI arguments must be passed as array of strings. runCLI() with a single string fails silently.
fix Always use array: runCLI(['validate', 'file.sml'])
deprecated v2025.x functions like validateModel() are removed in v2026; use runCLI() instead.
fix Migrate to runCLI() API.
gotcha TypeScript types are experimental and may not cover all runtime errors. Verify with actual CLI.
fix Cross-check with CLI help output.
npm install sml-cli
yarn add sml-cli
pnpm add sml-cli

Programmatic usage of SML CLI to validate a semantic model file.

import { runCLI } from 'sml-cli';

async function main() {
  await runCLI(['--version']);
  // Or use programmatically:
  const result = await runCLI(['validate', 'model.yaml']);
  console.log(result.exitCode);
}

main().catch(console.error);