Skip to main content

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.

Reference counts above every node, engineering units and ranges inline: the model reads like source code.

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.

Free and licensed tiers

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.

Completing organizedBy: with the browse paths that actually exist in the model, local anchors first.
FieldWhat 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.

Hover on typeDefinition: BottleFillerType lists the resolved mandatory and optional members with their kind and data type.

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.

A mistyped organizedBy: path is flagged immediately; the quick fix replaces it with the best match.

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.

The Address Space explorer follows the file: Filler01 shows up under Objects/Machines as soon as it is placed there.

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.

opcua-modeler generate then viewer, from the VS Code terminal to the rendered documentation 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​

PatternDescription
*.nodeset.yamlRecommended extension for NodeSet YAML files
*.nodeset.ymlAlternate short extension
*.model.yamlLegacy convention
*.model.ymlLegacy short extension
model.yamlBare filename convention
model.ymlBare short filename

Extension settings​

Open VS Code settings (Ctrl+,) and search for opcuaModeler:

SettingDefaultDescription
opcuaModeler.useClitrueWhen 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):

StateIndicator
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:

CommandDescription
OPC UA Modeler: Restart Language ServerForce-restarts the LSP server process. Useful after updating opcua-modeler.

Troubleshooting​

Completions or diagnostics not working?

  1. Check the status bar indicator. If it shows ✗, click it to open the Output panel.
  2. Make sure opcua-modeler is installed and accessible in your PATH:
    opcua-modeler version
  3. If using a custom binary path, verify opcuaModeler.serverPath is correct.
  4. Try OPC UA Modeler: Restart Language Server from the Command Palette.
  5. Set opcuaModeler.trace.server to "verbose" and inspect the Output → OPC UA Modeler channel.