SysML v2 and KerML analysis CLI (binary distribution)
Project description
Syster CLI
Command-line interface for SysML v2 and KerML analysis, interchange, and semantic model editing.
Installation
cargo install syster-cli
Or build from source:
cargo build --release --features interchange
The interchange feature (enabled by default) adds model export/import, decompilation, and semantic editing commands.
Usage
Basic Analysis
# Analyze a single file
syster model.sysml
# Analyze a directory
syster ./models/
# With verbose output
syster -v model.sysml
# Standard library is loaded by default; skip with --no-stdlib
syster --no-stdlib model.sysml
# Custom stdlib path
syster --stdlib-path /path/to/sysml.library model.sysml
Export Formats
Export models to various interchange formats:
# Export to XMI (OMG standard)
syster model.sysml --export xmi
# Export to YAML (human-readable)
syster model.sysml --export yaml
# Export to JSON-LD (linked data)
syster model.sysml --export json-ld
# Export to KPAR (Kernel Package Archive)
syster model.sysml --export kpar -o model.kpar
# Export AST as JSON
syster model.sysml --export-ast
# Self-contained export (includes stdlib)
syster model.sysml --export xmi --self-contained
Import and Roundtrip
# Import and validate an XMI file
syster model.xmi --import
# Import into workspace for analysis
syster model.xmi --import-workspace
# Decompile XMI back to SysML text + metadata
syster model.xmi --decompile
Decompilation produces two files:
model.sysml— the reconstructed SysML textmodel.metadata.json— element ID mappings for round-trip fidelity
Query and Inspect
Browse the semantic model without modifying it:
# List all elements in a model
syster model.sysml --list
# Search elements by name (substring match)
syster model.sysml --query Vehicle
# Filter by metaclass kind
syster model.sysml --list --kind PartDefinition
syster model.sysml --query mass --kind AttributeUsage
# Inspect a specific element (children, relationships, ID)
syster model.sysml --inspect Vehicle
# Inspect by qualified name
syster model.sysml --inspect "VehicleModel::Car::engine"
# JSON output for any command
syster model.sysml --list --json
syster model.sysml --inspect Vehicle --json
Rename Elements
Rename a definition or usage across the model:
# Rename an element
syster model.sysml --rename Vehicle=Automobile -o updated.sysml
The renamed output is written to the specified file (or stdout). A companion .metadata.json file is written alongside the output so that element IDs are preserved through subsequent edits.
Add Members
Add a new part, attribute, or other member to an existing element:
# Add an untyped part
syster model.sysml --add-member "Vehicle:PartUsage:chassis" -o updated.sysml
# Add a typed part
syster model.sysml --add-member "Vehicle:PartUsage:engine:Engine" -o updated.sysml
# Add an attribute
syster model.sysml --add-member "Vehicle:AttributeUsage:color" -o updated.sysml
The format is PARENT:KIND:NAME[:TYPE]. Supported kinds:
| Kind string | Element kind |
|---|---|
PartUsage, part |
Part usage |
PartDefinition, part_def |
Part definition |
AttributeUsage, attribute, attr |
Attribute usage |
AttributeDefinition, attr_def |
Attribute definition |
PortUsage, port |
Port usage |
PortDefinition, port_def |
Port definition |
ItemUsage, item |
Item usage |
ItemDefinition, item_def |
Item definition |
Package |
Package |
Remove Elements
Remove an element from the model by name or qualified name:
# Remove by simple name
syster model.sysml --remove-member wheels -o updated.sysml
# Remove by qualified name
syster model.sysml --remove-member "VehicleModel::Car::wheels" -o updated.sysml
Metadata and ID Preservation
When working with interchange formats, element identity (UUIDs) matters. The CLI uses companion .metadata.json files to preserve element IDs across edits:
- Export a model to XMI — each element gets a stable UUID.
- Decompile the XMI back to SysML — a
.metadata.jsonfile records the original IDs. - Edit the SysML (rename, add, remove) — the CLI reads the companion metadata and carries IDs forward.
- Re-export — previously-known elements retain their original UUIDs.
# Full round-trip example
syster model.sysml --export xmi -o model.xmi
syster model.xmi --decompile -o model.sysml # creates model.metadata.json
syster model.sysml --rename Car=Sedan -o model.sysml # updates model.metadata.json
syster model.sysml --add-member "Sedan:PartUsage:sunroof" -o model.sysml
syster model.sysml --export xmi -o model.xmi # IDs preserved
Export Format Examples
Given this SysML input:
part def Vehicle {
attribute mass : Real;
}
XMI Output
<?xml version="1.0" encoding="ASCII"?>
<sysml:PartDefinition
xmlns:sysml="https://www.omg.org/spec/SysML/20250201"
xmi:id="68e00c54-9196-421b-9149-76783d5c26f5"
declaredName="Vehicle"
qualifiedName="Vehicle">
<ownedRelatedElement xsi:type="sysml:AttributeUsage"
xmi:id="15e06b2e-7efc-4d4a-8c66-670ce186f57f"
declaredName="mass"
qualifiedName="Vehicle::mass"/>
</sysml:PartDefinition>
YAML Output
- '@type': PartDefinition
'@id': cc10f11d-996f-4251-8952-9723018b762d
name: Vehicle
qualifiedName: Vehicle
ownedMember:
- '@id': 48e432b9-fdfe-483a-bd2d-36e6417703b2
- '@type': AttributeUsage
'@id': 48e432b9-fdfe-483a-bd2d-36e6417703b2
name: mass
qualifiedName: Vehicle::mass
owner:
'@id': cc10f11d-996f-4251-8952-9723018b762d
- '@type': FeatureTyping
'@id': rel_1
source:
'@id': 48e432b9-fdfe-483a-bd2d-36e6417703b2
target:
'@id': Real
AST JSON Output (--export-ast)
{
"files": [
{
"path": "model.sysml",
"symbols": [
{
"name": "Vehicle",
"qualified_name": "Vehicle",
"kind": "PartDefinition",
"start_line": 1,
"start_col": 10,
"supertypes": ["Parts::Part"]
},
{
"name": "mass",
"qualified_name": "Vehicle::mass",
"kind": "AttributeUsage",
"supertypes": ["Real"]
}
]
}
]
}
All Options
syster [OPTIONS] <FILE>
Arguments:
<FILE> Input file or directory to analyze
Options:
-v, --verbose Enable verbose output
-o, --output <FILE> Write output to file instead of stdout
--json Output results as JSON
--no-stdlib Skip loading standard library
--stdlib-path Path to custom standard library
Analysis:
--export-ast Export AST as JSON
Interchange (requires interchange feature):
--export <FMT> Export model (xmi, yaml, json-ld, kpar)
--self-contained Include stdlib in export
--import Import and validate interchange file
--import-workspace Import into workspace for analysis
--decompile Decompile interchange to SysML + metadata
Semantic Model:
--list List all model elements
--query <NAME> Search elements by name (substring)
--kind <KIND> Filter by metaclass kind
--inspect <NAME> Inspect element details
--rename <OLD=NEW> Rename an element
--add-member <PARENT:KIND:NAME[:TYPE]> Add a member element
--remove-member <NAME> Remove an element
Exit Codes
| Code | Meaning |
|---|---|
0 |
Success — no errors |
1 |
Error — parse failure, missing element, invalid input, or hard validation error |
2 |
Success with warnings — e.g. --import with unresolved stdlib type references |
Features
- Parse and validate SysML v2 and KerML files
- Symbol table analysis with qualified names
- Import resolution and type checking
- Error reporting with source locations
- Export to XMI, YAML, JSON-LD, and KPAR formats
- Import and validate interchange files
- Decompile XMI back to SysML text with metadata
- Self-contained export with embedded stdlib
- Semantic model queries (list, search, inspect)
- In-place model editing (rename, add member, remove)
- Element ID preservation across edit round-trips via companion metadata
Supported Formats
| Format | Extension | Description |
|---|---|---|
| XMI | .xmi |
OMG XML Metadata Interchange (standard) |
| YAML | .yaml |
Human-readable YAML representation |
| JSON-LD | .jsonld |
JSON Linked Data format |
| KPAR | .kpar |
Kernel Package Archive (ZIP) |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file syster_cli-0.4.3a0.tar.gz.
File metadata
- Download URL: syster_cli-0.4.3a0.tar.gz
- Upload date:
- Size: 59.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c99694a85beb87b362cd1fa81eeee671d5f22ded3263eda6440dd4878d399a1
|
|
| MD5 |
bfd432f8184abbf26258fbdec36c62ab
|
|
| BLAKE2b-256 |
a82bfdac497221270ffa05e43fe6914dfe1c38798573a0b32e1d9e3ee8eeb571
|
Provenance
The following attestation bundles were made for syster_cli-0.4.3a0.tar.gz:
Publisher:
release.yml on jade-codes/syster-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syster_cli-0.4.3a0.tar.gz -
Subject digest:
9c99694a85beb87b362cd1fa81eeee671d5f22ded3263eda6440dd4878d399a1 - Sigstore transparency entry: 985805170
- Sigstore integration time:
-
Permalink:
jade-codes/syster-cli@ff4f240d4703cf0e131122585230df3f9a507aca -
Branch / Tag:
refs/tags/v0.4.3-alpha - Owner: https://github.com/jade-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff4f240d4703cf0e131122585230df3f9a507aca -
Trigger Event:
push
-
Statement type:
File details
Details for the file syster_cli-0.4.3a0-py3-none-win_amd64.whl.
File metadata
- Download URL: syster_cli-0.4.3a0-py3-none-win_amd64.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f211ec1af95db6b4d76a4e03691b88518fafa0bfe0274e0a3b03f5b6d9d6b603
|
|
| MD5 |
09c5e643eebc706b328519af867ba155
|
|
| BLAKE2b-256 |
8a4d525930eec896d8beec757ffbf6862bf25ea83cc35cc9e95d2b7f8c0e900c
|
Provenance
The following attestation bundles were made for syster_cli-0.4.3a0-py3-none-win_amd64.whl:
Publisher:
release.yml on jade-codes/syster-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syster_cli-0.4.3a0-py3-none-win_amd64.whl -
Subject digest:
f211ec1af95db6b4d76a4e03691b88518fafa0bfe0274e0a3b03f5b6d9d6b603 - Sigstore transparency entry: 985805175
- Sigstore integration time:
-
Permalink:
jade-codes/syster-cli@ff4f240d4703cf0e131122585230df3f9a507aca -
Branch / Tag:
refs/tags/v0.4.3-alpha - Owner: https://github.com/jade-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff4f240d4703cf0e131122585230df3f9a507aca -
Trigger Event:
push
-
Statement type:
File details
Details for the file syster_cli-0.4.3a0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: syster_cli-0.4.3a0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ffc7e724117715a955f8844aa3ac6618a42d604a012fa0a1d3fa444d2ded598
|
|
| MD5 |
5c37c4652403e15a00b20e1b0dcc8b4d
|
|
| BLAKE2b-256 |
66087b49e906bf81b569eb0c942ec1329bff2ae90e110de3a65aff8826f4c6b2
|
Provenance
The following attestation bundles were made for syster_cli-0.4.3a0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on jade-codes/syster-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syster_cli-0.4.3a0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
1ffc7e724117715a955f8844aa3ac6618a42d604a012fa0a1d3fa444d2ded598 - Sigstore transparency entry: 985805184
- Sigstore integration time:
-
Permalink:
jade-codes/syster-cli@ff4f240d4703cf0e131122585230df3f9a507aca -
Branch / Tag:
refs/tags/v0.4.3-alpha - Owner: https://github.com/jade-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff4f240d4703cf0e131122585230df3f9a507aca -
Trigger Event:
push
-
Statement type:
File details
Details for the file syster_cli-0.4.3a0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: syster_cli-0.4.3a0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a766ce1567c649983f0f5c292c03d8525f4e4b98184393e191d3a54d11e5332
|
|
| MD5 |
cb737c1295815f1eba49cc36be3402ad
|
|
| BLAKE2b-256 |
dc8494c78374f7ecedf43ada7991f08f050cbf790ed278d48fe870f607933fc1
|
Provenance
The following attestation bundles were made for syster_cli-0.4.3a0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on jade-codes/syster-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syster_cli-0.4.3a0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
8a766ce1567c649983f0f5c292c03d8525f4e4b98184393e191d3a54d11e5332 - Sigstore transparency entry: 985805190
- Sigstore integration time:
-
Permalink:
jade-codes/syster-cli@ff4f240d4703cf0e131122585230df3f9a507aca -
Branch / Tag:
refs/tags/v0.4.3-alpha - Owner: https://github.com/jade-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff4f240d4703cf0e131122585230df3f9a507aca -
Trigger Event:
push
-
Statement type:
File details
Details for the file syster_cli-0.4.3a0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl.
File metadata
- Download URL: syster_cli-0.4.3a0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4249e73a4ef65507d9760c4f4c3b89f5f4797682e840076346a69ccb96fdf2ea
|
|
| MD5 |
596eee3323600cfd6e3de63a8e54c3f4
|
|
| BLAKE2b-256 |
8d393533b612c2998f558d40df4a09ac544b7b47bfbbd608799f9dfe074f47ab
|
Provenance
The following attestation bundles were made for syster_cli-0.4.3a0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl:
Publisher:
release.yml on jade-codes/syster-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syster_cli-0.4.3a0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl -
Subject digest:
4249e73a4ef65507d9760c4f4c3b89f5f4797682e840076346a69ccb96fdf2ea - Sigstore transparency entry: 985805192
- Sigstore integration time:
-
Permalink:
jade-codes/syster-cli@ff4f240d4703cf0e131122585230df3f9a507aca -
Branch / Tag:
refs/tags/v0.4.3-alpha - Owner: https://github.com/jade-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff4f240d4703cf0e131122585230df3f9a507aca -
Trigger Event:
push
-
Statement type:
File details
Details for the file syster_cli-0.4.3a0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: syster_cli-0.4.3a0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fa93d3aa42fc6410559ae7b7c924925f5aaba0cd8f90ba6a0842e068731908b
|
|
| MD5 |
bacecd13a76ab2fa3f0b1a440da1eb6d
|
|
| BLAKE2b-256 |
f5b3211325db064ec6bd11886a2888faaf9e8259c0ceb323db564c0bf7ad068d
|
Provenance
The following attestation bundles were made for syster_cli-0.4.3a0-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on jade-codes/syster-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syster_cli-0.4.3a0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
9fa93d3aa42fc6410559ae7b7c924925f5aaba0cd8f90ba6a0842e068731908b - Sigstore transparency entry: 985805181
- Sigstore integration time:
-
Permalink:
jade-codes/syster-cli@ff4f240d4703cf0e131122585230df3f9a507aca -
Branch / Tag:
refs/tags/v0.4.3-alpha - Owner: https://github.com/jade-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff4f240d4703cf0e131122585230df3f9a507aca -
Trigger Event:
push
-
Statement type:
File details
Details for the file syster_cli-0.4.3a0-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: syster_cli-0.4.3a0-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0572fb114c258fd0f6db726f087c5f923ae364df0f3be34b58d546a2bb52ca4
|
|
| MD5 |
df25f587424a3a8aa7a8884e979e6cf7
|
|
| BLAKE2b-256 |
21d1e0345f1e39fb52564240be71a4e057c5a36aba822871a113b4176a33310a
|
Provenance
The following attestation bundles were made for syster_cli-0.4.3a0-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on jade-codes/syster-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syster_cli-0.4.3a0-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
d0572fb114c258fd0f6db726f087c5f923ae364df0f3be34b58d546a2bb52ca4 - Sigstore transparency entry: 985805198
- Sigstore integration time:
-
Permalink:
jade-codes/syster-cli@ff4f240d4703cf0e131122585230df3f9a507aca -
Branch / Tag:
refs/tags/v0.4.3-alpha - Owner: https://github.com/jade-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff4f240d4703cf0e131122585230df3f9a507aca -
Trigger Event:
push
-
Statement type: