npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sysml-validate

v0.15.4

Published

Headless SysML v2 / KerML validator — parse, link, and diagnose model files from a terminal or a CI pipeline, with text, JSON, SARIF, and GitHub Actions output.

Readme

sysml-validate

Headless SysML v2 / KerML validation. Runs the same parser, linker, and diagnostics as the SysML v2 VS Code extension — the Problems panel, in a terminal or a CI job. No VS Code, no browser, no display server.

npx sysml-validate models/
models/control.sysml
  2:5    error  SYN067  Import visibility is required by the Release syntax; use 'private import' unless re-export is intended.

models/vehicle.sysml
  12:23  error  RES001  Could not resolve reference to Element named 'Engien'.

✖ 2 problems (2 errors) in 2 of 2 files

…and when the model is healthy:

✓ 2 files checked, no problems found

Colour is used on a terminal and dropped everywhere else — a pipe, a log file, or a coding agent's chat window gets exactly the plain text above. --color and --no-color force it either way, and NO_COLOR is honoured.

Usage

sysml-validate [paths...] [options]

  --format <fmt>        text | compact | json | sarif | github (default: text).
                        text     grouped and aligned, colour on a terminal
                        compact  file:line:col: severity [CODE]: message
  --out <path>          Write the report to a file instead of stdout.
  --strict              Fail on warnings as well as errors.
  --max-warnings <n>    Fail when more than n warnings are reported.
  --all                 Report informational notices and hints too.
  --lint-profile <p>    Override sysml.lint.profile: default | quiet | strict.
  --workspace <path>    Index this project for cross-file reference resolution.
  --no-config           Ignore .vscode/settings.json and .vscode/sysml/project.json.
  --library <path>      Standard-library directory (default: the bundled library).
  --color, --no-color   Force ANSI colour on or off (default: on a terminal only).

Paths may be files or directories; directories are searched recursively for .sysml and .kerml, skipping node_modules, VCS directories, build output, and vendored library trees. With no path, the working directory is checked. By default, no model file outside the paths you name is discovered or indexed. Use --workspace <path> only when references should resolve against other project files.

The OMG standard library ships with the package, so Real, ISQ::*, SI::* and the rest resolve with nothing else installed.

Examples

Check one file while you work. Paths, positions, severity, and the diagnostic code — everything needed to jump to the problem:

$ sysml-validate models/vehicle.sysml
models/vehicle.sysml
  12:23  error  RES001  Could not resolve reference to Element named 'Engien'.

✖ 1 problem (1 error) in 1 of 1 file

See the advisory notices too. Hints and info are out of the way by default — --all brings them in:

$ sysml-validate models/ --all
models/vehicle.sysml
  5:19   hint  RES016  'power' shadows a standard-library element of the same name; the library symbol is hidden in this scope.
  16:21  hint  SEM006  Requirement definition 'MassLimit' has no 'subject' declaration.

▲ 2 problems (2 hints) in 1 of 2 files

One line per problem for grep, an editor error matcher, or a coding agent that wants to parse the output:

$ sysml-validate models/ --format compact
models/control.sysml:2:5: error [SYN067]: Import visibility is required by the Release syntax; use 'private import' unless re-export is intended.
models/vehicle.sysml:12:23: error [RES001]: Could not resolve reference to Element named 'Engien'.

Compact prints nothing at all on a clean run, so [ -s report.txt ] and if sysml-validate . --format compact | grep . both behave.

Structured output for a script or a dashboard:

$ sysml-validate models/ --format json | jq '.counts, .diagnostics[0].code'
{
  "error": 2,
  "warning": 0,
  "info": 0,
  "hint": 0
}
"SYN067"

Gate a commit hook on errors, and allow a small warning budget:

$ sysml-validate models/ --max-warnings 5 && echo "model is publishable"

Check just what changed, without loading any model outside that list:

$ git diff --name-only --diff-filter=d origin/main | grep -E '\.(sysml|kerml)$' | xargs -r sysml-validate

If those files need definitions elsewhere in the checkout, opt into workspace indexing explicitly:

$ git diff --name-only --diff-filter=d origin/main | grep -E '\.(sysml|kerml)$' | xargs -r sysml-validate --workspace .

--workspace . indexes the rest of the project for reference resolution, but still reports diagnostics only for the files you named.

Use it from a coding agent. The default output is plain text with a stable one-line summary, so an agent can act on it directly:

$ sysml-validate models/ --format compact ; echo "exit=$?"
models/vehicle.sysml:12:23: error [RES001]: Could not resolve reference to Element named 'Engien'.
exit=1

Your project's configuration is honoured

The validator reads the settings your team commits, in the editor's own precedence — .vscode/settings.json first, then .vscode/sysml/project.json:

| Setting | Effect | |---|---| | sysml.lint.profile | default / quiet / strict style-notice volume | | sysml.validation.severities | Per-code severity overrides (e.g. { "SEM006": "warning" }) | | sysml.diagnostics.unusedImports | off / warning / error | | sysml.diagnostics.units | UNIT001–UNIT005 dimensional analysis on/off |

--lint-profile overrides the profile for one run, and --no-config ignores both files. Note that sysml.validation.severities covers the validator's own codes; unresolved-reference errors (RES001) come from the linker and are always errors.

Exit codes

| Code | Meaning | |---|---| | 0 | no blocking diagnostics | | 1 | errors, or warnings under --strict / --max-warnings | | 2 | the command line or the environment was wrong (bad flag, unreadable path) |

Informational notices and hints never fail a run; they are only printed with --all.

GitHub Actions

Fail the build on model errors, with inline annotations on the diff:

- uses: actions/setup-node@v4
  with: { node-version: 20 }

- name: Validate the SysML model
  run: npx sysml-validate models/ --format github --strict

Or upload SARIF so diagnostics land in Security → Code scanning and on the pull request:

- name: Validate the SysML model
  run: npx sysml-validate models/ --format sarif --out sysml.sarif
  continue-on-error: true

- uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: sysml.sarif

License

The CLI uses the extension's Freeware License (see LICENSE). The vendored OMG standard library under resources/sysml.library keeps its upstream OMG LICENSE / LICENSE-GPL terms; see that directory's NOTICE.md.