Runglet
Runglet lets you develop PLC control software with coding agents instead of drawing ladder diagrams by hand.
It is a typed, deterministic source language and offline toolchain. You describe control intent and scan-level tests as text; Runglet gives people and agents structured diagnostics, versioned authoring context, exact-scan scenarios, and deterministic builds. A checked program lowers to canonical Relay IR and, for a supported target subset, vendor artifacts such as ladder logic.
The aim is not to hide PLC semantics. It is to make scan behavior, state ownership, interlocks, numeric policy, and output arbitration explicit enough for an agent to write, inspect, test, repair, and review without using a vendor editor as the primary programming environment.
You still need to understand the controlled process and the PLC execution model. You should not have to learn a vendor's ladder drawing workflow just to express and test that logic.
Runglet is alpha software. The compiler, reference runtime, formatter, language server,
VS Code extension, and offline project workflow are usable today. Target deployment is
still evidence-gated and is not production-ready. The current package is 0.5.0; the
portable language specification is independently versioned and frozen at 0.22.0.
Why Runglet
- Ladder is a target, not the authoring interface. Application logic is written and tested as ordinary text. Supported backends take responsibility for the mechanical target representation.
- Scan behavior is part of the program. Snapshot-atomic state, following-scan commits, timer behavior, and output ownership are checked instead of inferred from rung order.
- Tests live beside the logic. Embedded scenarios run against an exact-scan reference runtime without a PLC or vendor IDE.
- Builds are reviewable. Source, Relay IR, target plans, profiles, and generated artifacts carry deterministic identities and stable semantic IDs.
- Agents get a real development interface. Generated workflow files, bounded context packs, stable diagnostics, JSON inspection, checked examples, and fail-closed target discovery keep an agent tied to the installed compiler rather than its memory of the language.
Agentic development is a compiler feature
runglet init creates more than a sample program. It creates an agent-ready workspace
with task guidance, a machine-readable capability manifest, thin tool skills, agent
entry points, checked source, and a scaffold identity. From there, the supported loop
is explicit:
requirements brief
-> discover the installed language, libraries, and target limits
-> author Runglet source and scenarios
-> repair stable compiler diagnostics
-> format, check, and run exact-scan tests
-> inspect deterministic builds and target plans
-> hand reviewable evidence to the target-specific engineering step
The agent does not need to read Runglet's Python implementation or guess syntax from a prompt. These commands expose the contract it needs:
runglet authoring-context --profile core --format markdown
runglet inspect --package runglet.std.control --json
runglet check runglet.toml --json
runglet suite runglet.toml
runglet target inspect fatek-fbs --json
This does not remove the need to understand the controlled process, electrical design, failure behavior, or commissioning boundary. It removes hand-authored ladder from the normal implementation loop. Read the agentic authoring guide for the workspace contract and a practical task handoff.
A one-minute example
Install the command-line application with pipx:
pipx install runglet==0.5.0
runglet init demo --name demo
cd demo
runglet check src/main.rung
runglet suite src/main.rung --scan-period-ms 10
The starter contains ordinary control logic and two executable scenarios:
RULE run_permission:
ID "RULE-RUN-PERMISSION-001"
DRIVE permitted
WHEN:
start_requested
END
END
OUTPUT_LOGIC demo_command:
ID "LOGIC-DEMO-COMMAND-001"
DEFAULT FALSE
TURN_ON WHEN:
permitted
END
END
The suite result is short enough to read in a terminal and detailed enough to retain as JSON when needed:
SCENARIO SCENARIO-REQUESTED-COMMAND-001: PASS scans=1
SCENARIO SCENARIO-IDLE-COMMAND-001: PASS scans=1
SUMMARY passed=2 failed=0 total=2
Start with the getting-started guide for installation choices, VS Code setup, and the full authoring loop.
What works today
| Surface | Current state |
|---|---|
| Language and compiler | Frozen language 0.22; typed analysis, canonical formatting, projects, packages, components, deterministic machines, bounded data, explicit numeric policies, executable-contract lifecycle, properties, and exact diagnostics |
| Reference execution | Exact-scan scenarios, traces, semantic coverage, properties, and mutation campaigns |
| Agentic authoring | Generated agent workflow and capability files, bounded context packs, stable JSON diagnostics, package/target discovery, deterministic scenarios, and reviewable evidence |
| Human authoring | CLI, LSP, and a VS Code extension with diagnostics, formatting, completion, hover, navigation, and compiler tasks |
| Standard library | Reviewed source packages for events, numeric/data handling, signals, validation, tables, filters, fixed-point control, and profiles |
| Relay IR builds | Deterministic, hash-bound, backend-neutral build artifacts |
| FATEK FBs target | A documented offline lowering subset with fail-closed planning; complete deployment evidence remains open |
| Siemens S7-1500 | Planned second backend: SCL first, then a LAD wrapper and a bounded direct-LAD subset |
| Certified safety or production deployment | Not claimed |
The current status and exact exclusions are maintained in Language readiness, not inferred from release notes or screenshots.
Installation
Runglet requires Python 3.12 or later.
pipx install runglet==0.5.0
To install a reviewed wheel into an existing environment:
python -m pip install ./runglet-0.5.0-py3-none-any.whl
Tagged GitHub Releases also provide:
- the Python wheel and source archive;
- a standalone Windows ZIP containing
runglet.exe,runglet-lsp.exe, and their private runtime; - the matching VS Code VSIX; and
SHA256SUMSfor the published assets.
The Windows executables launch directly and do not use PowerShell. See Windows installation.
For source development:
git clone https://github.com/vedit/Runglet.git
cd Runglet
uv sync --extra dev --locked
How it fits together
Runglet source
│
├── analysis, diagnostics, formatting, LSP
│
└── canonical Relay IR
├── reference scenarios, traces, properties
├── portable resource reports
└── target preflight, planning, and review bundles
Relay IR is the portable semantic boundary. A backend must preserve the selected execution model, use a named emulation strategy, or reject the program. Vendor syntax acceptance alone is not treated as proof of equivalent behavior.
Physical addresses are not written into .rung source. Acquisition and output
publication live in separate, versioned binding manifests so logical behavior can be
reviewed and tested before a physical contract exists.
Project workflow
Use a project layout when the program will have multiple files or standard-library dependencies:
runglet init plant-control --name plant_control --layout project
cd plant-control
runglet authoring-context --profile core --format markdown
runglet check runglet.toml
runglet suite runglet.toml
runglet build runglet.toml --output build/main
Useful discovery commands include:
runglet help --all
runglet inspect --package runglet.std.control --json
runglet inspect --package runglet.std.control --example
runglet target list --json
runglet target inspect fatek-fbs --json
The CLI and project guide covers locks, offline packages, target planning, and deterministic output ownership.
Boundaries
Runglet is not a certified or qualified safety development tool. A passing check, scenario suite, vendor import, simulator run, or isolated bench observation establishes only the claim attached to that exact gate and artifact.
Authoring and compilation do not authorize contact with WinProLadder, a PLC, HIL, or production equipment. Credited protection must remain independent unless a separate safety lifecycle explicitly establishes otherwise.
Read Readiness and safety before using generated target logic beyond offline review.
Documentation
- Getting started
- Agentic authoring
- Language tour
- VS Code
- Scenarios and tracing
- Standard library
- Compiler and Relay IR
- Target support
- Language reference
Contributing and license
See CONTRIBUTING.md for the locked development workflow and review expectations. Please also read the code of conduct and use the security policy for private vulnerability reports.
Runglet is licensed under the Mozilla Public License 2.0. User-authored Runglet programs and compiler-generated artifacts are not relicensed merely because Runglet processes them. The precise boundary is described in LICENSING.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 runglet-0.5.0.tar.gz.
File metadata
- Download URL: runglet-0.5.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6b0c4f5c45a2dec81e47cd5cec6f3151c343f1b262dd5548019728a9e47c8e0
|
|
| MD5 |
8f08a98f2a8b7e6d4a6fe2aa2f8ec860
|
|
| BLAKE2b-256 |
44ceada812e7a3c499a95553130eea6815346d7c8ab258e6505cc2298b4f3e4e
|
Provenance
The following attestation bundles were made for runglet-0.5.0.tar.gz:
Publisher:
publish-github-release.yml on vedit/Runglet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runglet-0.5.0.tar.gz -
Subject digest:
e6b0c4f5c45a2dec81e47cd5cec6f3151c343f1b262dd5548019728a9e47c8e0 - Sigstore transparency entry: 2466629152
- Sigstore integration time:
-
Permalink:
vedit/Runglet@33cd149251cb6ec859fa660e02e7866893145426 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/vedit
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-github-release.yml@33cd149251cb6ec859fa660e02e7866893145426 -
Trigger Event:
push
-
Statement type:
File details
Details for the file runglet-0.5.0-py3-none-any.whl.
File metadata
- Download URL: runglet-0.5.0-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc8617399c7fbd324e993052b424abe104d48a0d73ee24ee5675189ffb7e3fdc
|
|
| MD5 |
83c17d613fe0a3ec3786934c535a4634
|
|
| BLAKE2b-256 |
a02dd495751b14b2a0d0d1f71516ff9e11b523581e3afed9bd99ce7cf02955a5
|
Provenance
The following attestation bundles were made for runglet-0.5.0-py3-none-any.whl:
Publisher:
publish-github-release.yml on vedit/Runglet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runglet-0.5.0-py3-none-any.whl -
Subject digest:
dc8617399c7fbd324e993052b424abe104d48a0d73ee24ee5675189ffb7e3fdc - Sigstore transparency entry: 2466629155
- Sigstore integration time:
-
Permalink:
vedit/Runglet@33cd149251cb6ec859fa660e02e7866893145426 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/vedit
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-github-release.yml@33cd149251cb6ec859fa660e02e7866893145426 -
Trigger Event:
push
-
Statement type: