Spec42
Spec42 is open, local-first tooling for SysML v2 and KerML: edit textual models with live feedback, understand structure and behavior beyond the source, and keep the same analysis engine in the editor, CI, and assistant workflows.

Why Spec42
User documentation — getting started, features, project setup and troubleshooting, with a version selector for published releases.
One analysis engine backs the editor, the CLI, GitHub Actions, generators and assistant integrations, so what you see while modeling is what CI checks. The language server, standard library and Elan8 domain libraries ship with Spec42: it works offline, and your models stay in your own repositories.
What you get
- An editor for SysML v2 and KerML — diagnostics, highlighting, navigation, rename and formatting, with completion and quick fixes that add missing imports for you.
- Views of the model, not just the text — diagrams and the Feature Inspector show resolved typing, inheritance, relationships and values. The Views panel has title-bar actions to fit the drawing, open its definition, and export SVG, PNG or view JSON.
- Validation for automation —
spec42 checkuses the same engine, with text, JSON, SARIF and JUnit output. - Generators — sandboxed WebAssembly plugins read the same analysis as the editor.
- Libraries — the OMG SysML libraries and searchable Elan8 domain libraries are bundled, and you can add your own.
- Assistant support — Copilot Language Model Tools in VS Code, and CLI helpers for other AI hosts.
Where Spec42 fits
| Surface | Role |
|---|---|
| VS Code | Primary modeling environment: edit, navigate, diagram, inspect. |
| CLI | check, model-export, generate, diagram, doctor and library management. |
| GitHub Action | Repeatable model validation with optional SARIF upload. |
| LM Tools | Validation and model context for AI-assisted workflows. |
| Zed | Lightweight editor support with the same server family. |
Views
| View | What it is for |
|---|---|
| General View | Structure and relationships across the exposed model. |
| Interconnection View | Parts, ports, connectors, and architecture wiring. |
| Action Flow View | Control and data flow through actions. |
| State Transition View | States and transitions for lifecycle behavior. |
| Sequence View | Lifelines and messages for interaction-oriented models. |
| Browser View | Hierarchical membership browsing. |
| Grid View | Tabular arrangement of exposed elements and relationships. |
| Geometry View | Spatial items (partial while authored geometry and 3D catch up). |
Examples
| Example | Best for |
|---|---|
examples/office |
Smallest first read: parts, ports, connections, simple behavior. |
examples/timer |
Recommended first substantial model. |
examples/intersection |
Controllers and state machines. |
examples/webshop |
Software architecture, requirements, and views. |
examples/drone |
Broader system decomposition and mission behavior. |
Get started
- Install Spec42 – SysML v2 Editor & Diagrams from the VS Code Marketplace.
- Open a
.sysml/.kermlfile, or try the bundled timer example from the Spec42 sidebar. - Follow the full walkthrough in Getting Started.
To start a clean multi-file workspace from the CLI, run:
spec42 init my-modelThe target must be new or empty; init never overwrites existing files and validates the generated workspace before reporting success.
CLI and CI users can download platform archives from GitHub Releases. Setup details for Actions, assistants, and troubleshooting live in the docs linked below.
Documentation
- User documentation — getting started, diagram view, Feature Inspector, libraries
- VS Code extension
- GitHub Action
- AI assistants
- Troubleshooting
- What's included
- Conformance matrix
- Contributor development guide
License
MIT. See LICENSE. The embedded SysML standard library is subject to separate licensing; see THIRD_PARTY_NOTICES.md.