OPC UA Modeler for VS Code
Write OPC UA information models the way you write code.
The OPC UA Modeler extension turns VS Code into a full modeling workbench for
.model.yaml files: completions that understand the OPC UA address space, hover
cards that resolve any type, semantic diagnostics as you type, one-click quick
fixes, and a live tree of the model you are building.
Install in one command
npm install -g @sterfive/opcua-modeler
opcua-modeler install-extension
That single step installs the extension from the Marketplace (with an offline
.vsix fallback), pulls in the companion
RedHat YAML
extension for schema validation, and points opcuaModeler.serverPath at the
CLI it just installed. Open any *.model.yaml file and you are modeling.
Prefer the Marketplace UI? Search for OPC UA Modeler (publisher Sterfive) in the Extensions panel. Other install routes are listed below.
Schema validation and completions work out of the box for everyone. The semantic layer (type resolution, browse-path checks, quick fixes, Address Space explorer) needs an OPC UA Modeler licence. See sterfive.com/product/opcua-modeler.
Six things you will not want to model without
1. Completions that know the address space
Press Space, :, - or / and the server offers only what is valid where
the cursor is. Browse paths for organizedBy:, componentOf: or propertyOf:
are walked from the live node tree, typeDefinition: lists every instantiable
type across the standard and imported namespaces, and dataType: mixes the OPC UA
primitives with your own structures. Types declared in the current file always
sort first.
| Field | What you get |
|---|---|
typeDefinition: | All non-abstract ObjectTypes and VariableTypes in the address space |
subtypeOf: | Types filtered by the enclosing section kind (objectTypes, variableTypes, ...) |
dataType: | All 23 OPC UA scalar primitives plus your custom structure types |
optionals: / promotedToMandatory: | Optional members of the enclosing type |
organizedBy: / componentOf: / propertyOf: | Valid browse paths in the virtual node tree |
initializers: variable: | Initializable variable paths with data types and enum values |
interfaces: | All available InterfaceTypes |
2. Hover any type and see it resolved
Hovering a type reference opens a card with every member the type brings in,
split into mandatory and optional, with its kind and data type. Inherited members
from companion specifications such as DI or Machinery are resolved for you, so
there is no need to open the NodeSet2 XML to check what a DeviceType carries.
Hovering an initializers: variable: path shows the variable's DataType and,
for enumerations, the valid values with their numeric codes.
3. Errors as you type, fixed in one click
Two validation layers run in the background. JSON Schema catches structural mistakes instantly. The semantic pass, half a second after you stop typing, checks what only an OPC UA engine can: unknown type references, broken browse paths, duplicate anchors, illegal optionals. When a placement path is wrong, the lightbulb offers the closest valid path so the fix is a single click.
4. Explore the address space you are building
The OPC UA Modeler view in the side bar shows the resolved definition of the node under the cursor and the full address space produced by the file, Objects and Types alike. Filter it down to this model or expand into the standard and companion namespaces it builds on.
5. Generate without leaving the editor
When the model is green, run the CLI from the integrated terminal. One command
produces the standard NodeSet2.xml, a stable symbols file that keeps NodeIds
from drifting between releases, and a Markdown document with hierarchy diagrams,
member tables and method signatures. opcua-modeler viewer opens it in the browser.
6. The same engine everywhere
The intelligence lives in the opcua-modeler language server, so what you see
in VS Code is exactly what the CLI, your CI pipeline and the
MCP connector see. Neovim, Zed and Emacs users get the same
features through the LSP server.
Reference
Other ways to install
VS Code Marketplace. Open the Extensions panel (Ctrl+Shift+X), search for
"OPC UA Modeler" (publisher: Sterfive) and click Install. With this route
you install the
RedHat YAML extension
separately.
Manual .vsix install.
code --install-extension opcua-modeler-<version>.vsix
CLI flags for install-extension. --offline skips the Marketplace and uses
the bundled .vsix, --force re-installs even if already present, and
--editor <code|cursor|codium|code-insiders> targets another VS Code flavour.
Activated file types
| Pattern | Description |
|---|---|
*.nodeset.yaml | Recommended extension for NodeSet YAML files |
*.nodeset.yml | Alternate short extension |
*.model.yaml | Legacy convention |
*.model.yml | Legacy short extension |
model.yaml | Bare filename convention |
model.yml | Bare short filename |
Extension settings
Open VS Code settings (Ctrl+,) and search for opcuaModeler:
| Setting | Default | Description |
|---|---|---|
opcuaModeler.useCli | true | When true, uses opcua-modeler lsp --stdio as the server process. When false, uses the bundled Node IPC server. |
opcuaModeler.serverPath | (auto) | Full path to the opcua-modeler CLI binary. Leave empty to use the binary found in PATH. |
opcuaModeler.trace.server | "off" | LSP trace level: "off" / "messages" / "verbose". Use "verbose" for debugging. |
Status bar
The extension adds a small indicator to the VS Code status bar (bottom-left):
| State | Indicator |
|---|---|
| Starting... | ⟳ OPC UA Modeler |
| Ready | ✓ OPC UA Modeler |
| Error | ✗ OPC UA Modeler (click for details) |
Commands
Open the Command Palette (Ctrl+Shift+P) and search for:
| Command | Description |
|---|---|
OPC UA Modeler: Restart Language Server | Force-restarts the LSP server process. Useful after updating opcua-modeler. |
Troubleshooting
Completions or diagnostics not working?
- Check the status bar indicator. If it shows
✗, click it to open the Output panel. - Make sure
opcua-modeleris installed and accessible in yourPATH:opcua-modeler version - If using a custom binary path, verify
opcuaModeler.serverPathis correct. - Try
OPC UA Modeler: Restart Language Serverfrom the Command Palette. - Set
opcuaModeler.trace.serverto"verbose"and inspect the Output → OPC UA Modeler channel.