Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>KlaivNew to Visual Studio Code? Get it now.
Klaiv

Klaiv

Preview

Klaiv

|
17 installs
| (2) | Free
Git-native UML and SysML modeling for VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Klaiv

Klaiv is a VS Code extension for modeling systems and software in SysML and UML. The model is stored as plain YAML in your repository, next to the code it describes, so you branch, review, and merge it the same way you handle code. A change to the architecture shows up as a readable diff in a pull request, instead of a binary blob only one tool can open.

In preview. Expect changes.

Klaiv in VS Code: a system decomposition diagram on the left, the YAML it is stored as on the right

The model is the YAML on the right. The diagram on the left is Klaiv's view of it.

The model lives in git

Klaiv keeps the meaning of a model separate from how a diagram is drawn. Elements, relationships, and diagrams are the model. Where you place a box, and its size and color, go in separate layout files. So moving a node around the canvas changes only the layout file, and a change to the design itself shows up as a clean diff you can read.

That is the point of storing the model this way. Architecture review happens in the pull request you already use, and because the files are plain text, the model merges like the rest of your code.

Diagram diffs on pull requests

When a pull request changes a diagram, the Klaiv GitHub action posts one comment that links the before and after of each changed diagram, so a reviewer sees what moved on the canvas and not only in the YAML. The rendered images are kept on a separate branch, so they stay out of your real history and the comment stays short even when several diagrams change.

A diagram diff on a pull request, showing a system decomposition before and after the change

What a reviewer sees on a pull request: the diagram before and after the change.

It covers structural and use case diagrams today. The behavioral diagrams are not in the diff yet. You turn it on by adding a workflow to your .github/workflows folder.

Visual merge

When two branches change the same diagram and git cannot merge the file on its own, Klaiv opens both versions and lets you resolve the conflict on the canvas. It writes the result back to YAML when you are done, so you get the branch-and-merge you already have for code, on the diagram itself.

Your own types

Klaiv ships UML 2.5 and SysML 1.7 out of the box. When you need more, you can extend the metamodel with your own element, relationship, and diagram types. The profile that defines them lives in the repository with the model, so your conventions travel with the project and stay in the same readable format.

What you can model

Klaiv covers UML 2.5 and SysML 1.7.

  • UML, structural and editable: Component, Class, Package, Deployment, Use Case.
  • SysML, structural and editable: Block Definition, Internal Block, Requirement.
  • Behavioral, rendered read-only: Sequence with fragments, State Machine, Activity with swimlanes.

On Blocks and parts you get proxy and full ports, typed by Interface Blocks, connected port to port and carrying Item Flows; you can hide a port with its connectors and restore it later. Requirements come with the SysML relationship set (Satisfy, Verify, Refine, Trace, Derive, Copy, Allocate), alongside Value Types, Units, and Quantity Kinds for typed value properties.

Class diagram of an order domain model

Use case diagram with a system boundary

Sequence diagram of a checkout flow with fragments

Basics

Open a folder in VS Code. Press Ctrl+Shift+P (Cmd+Shift+P on macOS) to open the command palette, then pick Klaiv: Initialize New Model. This creates an architecture/ directory with a basic YAML scaffold.

The Model Explorer in the activity bar shows elements and diagrams in a package tree. Right-click to create, rename, delete, or reorganize. Attributes, operations, and ports appear under their element, so you can act on a member without opening the editor.

Model Explorer with packages, elements, and diagrams

Opening a diagram from the Explorer shows a canvas. Drag nodes to position them; positions save to .layout.yaml files so they stay out of the semantic diff. The Connect button lets you draw relationships in two clicks. Clicking a node opens its properties: name, stereotype, tags, ports, attributes, operations, depending on the type.

Validation

Klaiv checks the model as you edit. Broken references, unknown types, and stereotype violations show up as squiggles in the YAML and entries in the Problems panel, with a suggested fix where there is one. A command-line version of the same checks, so a pull request can fail when the architecture is invalid, is on the way.

Getting started

  1. Install Klaiv from the marketplace, or search "Klaiv" in the Extensions panel.
  2. Open any folder in VS Code.
  3. Press Ctrl+Shift+P (Cmd+Shift+P on macOS) and pick Klaiv: Initialize New Model.
  4. Open the Klaiv view in the activity bar.
  5. Right-click the tree to add an element or a diagram.

An empty model shows an empty Explorer. That is not a bug.

Preview

Klaiv is in preview and under active development. Your model is plain YAML in your own git repository, with stable identifiers and readable diffs, so what you produce is yours and stays readable whatever happens to the tool. Preview applies to the tooling, not to your data.

Until version 1.0 the file format and schema will keep changing, and the tool does not yet migrate an older model for you. When a release changes the schema in a way that affects existing models, the CHANGELOG says what changed and how to bring a model up to date. If a change needs more than that, write to hello@klaiv.dev or use the Share feedback link inside Klaiv and we will help you through it. From 1.0 on, releases carry the migration for you and this step goes away.

Requirements

VS Code 1.120 or later. Node 18 or later for the command-line validator.

Documentation

The Klaiv docs cover the getting started guide, examples, and the thinking behind the tool.

Feedback

This is preview software, so feedback helps. Two ways to send it:

  • The Share feedback link at the bottom of any diagram panel.
  • Klaiv: Share Feedback from the command palette.

Either one lets you file a public bug on GitHub or send a short private note to the team.

License

Proprietary. Not open source.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft