{"id":18799,"library":"sml-cli","title":"SML CLI","description":"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.","status":"active","version":"2026.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/semanticdatalayer/SML","tags":["javascript","sml","semantic modeling language","semantic layer","atscale","cli","typescript"],"install":[{"cmd":"npm install sml-cli","lang":"bash","label":"npm"},{"cmd":"yarn add sml-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add sml-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; requires Node >=18","symbol":"cli","correct":"import { cli } from 'sml-cli'"},{"note":"TypeScript type, not a runtime value","wrong":"import { SMLConfig } from 'sml-cli'","symbol":"SMLConfig","correct":"import type { SMLConfig } from 'sml-cli'"},{"note":"ESM-only since v2026.0.0; CommonJS not supported","wrong":"const { runCLI } = require('sml-cli')","symbol":"runCLI","correct":"import { runCLI } from 'sml-cli'"}],"quickstart":{"code":"import { runCLI } from 'sml-cli';\n\nasync function main() {\n  await runCLI(['--version']);\n  // Or use programmatically:\n  const result = await runCLI(['validate', 'model.yaml']);\n  console.log(result.exitCode);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Programmatic usage of SML CLI to validate a semantic model file."},"warnings":[{"fix":"Switch to ESM or downgrade to v2025.x (if available).","message":"ESM-only: CJS require() throws Module not found error. Package is ESM-only since v2026.0.0. Use import syntax.","severity":"breaking","affected_versions":">=2026.0.0"},{"fix":"Upgrade Node.js to 18 or later.","message":"Node.js >=18 required. Older Node versions cause runtime errors.","severity":"breaking","affected_versions":">=2026.0.0"},{"fix":"Always use array: runCLI(['validate', 'file.sml'])","message":"CLI arguments must be passed as array of strings. runCLI() with a single string fails silently.","severity":"gotcha","affected_versions":"*"},{"fix":"Migrate to runCLI() API.","message":"v2025.x functions like validateModel() are removed in v2026; use runCLI() instead.","severity":"deprecated","affected_versions":">=2026.0.0"},{"fix":"Cross-check with CLI help output.","message":"TypeScript types are experimental and may not cover all runtime errors. Verify with actual CLI.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use import syntax or set type: module in package.json, or downgrade to v2025.x.","cause":"Package is ESM-only and cannot be required with CommonJS require().","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/sml-cli/index.js not supported."},{"fix":"Use import { runCLI } from 'sml-cli'","cause":"Incorrect import: default import used instead of named import, or wrong path.","error":"TypeError: runCLI is not a function"},{"fix":"Wrap arguments in array: runCLI(['--validate', 'model.sml'])","cause":"Passing a single string instead of array of args to runCLI.","error":"Error: Unknown argument: --validate"},{"fix":"Install package: npm install sml-cli, and ensure Node >=18.","cause":"Package not installed or Node.js version <18.","error":"MODULE_NOT_FOUND: Cannot find module 'sml-cli'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}