Skip to main content

Runglet

PyPI Python License

Internal alpha: PyPI distribution is public for installation convenience. The GitHub repository, Releases, Issues, CI, and hosted documentation are intentionally private and their links require invited alpha access.

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.1; 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.1
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.1

To install a reviewed wheel into an existing environment:

python -m pip install ./runglet-0.5.1-py3-none-any.whl

For invited alpha testers, 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
  • SHA256SUMS for the published assets.

The Windows executables launch directly and do not use PowerShell. See Windows installation.

For invited contributors with repository access, source development starts with:

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

The hosted links below currently require invited alpha access. The installed package remains self-describing through runglet help --all, runglet authoring-context, runglet inspect --package, and runglet target inspect.

Contributing and license

Invited contributors can 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

runglet-0.5.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

runglet-0.5.1-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file runglet-0.5.1.tar.gz.

File metadata

  • Download URL: runglet-0.5.1.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

Hashes for runglet-0.5.1.tar.gz
Algorithm Hash digest
SHA256 7e8396b5ee83388248b5b7a30a8a48ba3c30845d44f33928eab23f88af2d958f
MD5 eb4b5ab083f5da074749ed46da74e1e7
BLAKE2b-256 2c07310c16e7c21eb4ebf31d3a08b699c6e7f5ca1eea15088353d07efa6c3b32

See more details on using hashes here.

Provenance

The following attestation bundles were made for runglet-0.5.1.tar.gz:

Publisher: publish-github-release.yml on vedit/Runglet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file runglet-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: runglet-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for runglet-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe6aca911a5de910c55d28891b3c7b32a9101fff7e36d8cfe249f3c65268123b
MD5 ee9a49655c7a5f37b194a3824010a9cc
BLAKE2b-256 e804adddd95e5c4c140d043033b3c00ab4f3e3fbd3b5b5a6d5d48aa74a591da2

See more details on using hashes here.

Provenance

The following attestation bundles were made for runglet-0.5.1-py3-none-any.whl:

Publisher: publish-github-release.yml on vedit/Runglet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 files

0.5.0

2 files

0.4.3

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page