SCADA, built like software. A Go + SvelteKit toolkit for building industrial control and supervisory systems the way software engineers already work, with version control, tests, CI/CD, and code review, instead of inside a proprietary vendor IDE.
Write your control logic in IEC 61131-3 (Structured Text, Ladder, Function Block, or Sequential Function Chart, the portable standard languages) or in native Go. Host it on a deterministic scan loop. Build the operator screens on the included SvelteKit component kit. Bring your own field I/O, redundancy and historian through small, documented interfaces. Develop it in VS Code. Ship it like any other binary.
For teams that want the libraries and the seams, not a walled garden.
Why
A PLC program should be code: diffable, reviewable, unit-tested, built by CI, rolled back with one command, and observable from your editor. Vendor tooling makes almost none of that possible. nautilus makes control logic a first-class software artifact and keeps the runtime a tiny, pure-stdlib core you can read.
Architecture
runtime/ scan loop · tag bus · program host (compile, hot-swap, retained state)
lang/st IEC 61131-3 Structured Text: lexer, parser, lowering
lang/fbd Function Block Diagram: netlist text ⇄ diagram model, transpiles to ST
lang/ld Ladder Diagram: rung text ⇄ ladder model, transpiles to FBD
lang/sfc Sequential Function Chart: steps, transitions, actions, transpiles to ST
lang/ir typed IR + tree-walking virtual machine (pure stdlib)
io/ Driver seam — bring your own bus (Modbus, EtherNet/IP, OPC-UA, sim)
eip/ EtherNet/IP driver for Allen-Bradley Logix: pure-Go CIP stack,
tag browse + UDT import codegen, polling io.Driver, Logix emulator
sparkplug/ Sparkplug B edge node (and host application) over MQTT
opcua/server OPC UA server: the tag store as an address space (browse, read, subscribe)
retain/ retained-memory stores: file, Kubernetes ConfigMap
leader/ redundancy: Kubernetes Lease leader election
oplog/ redundancy: a replicated log of operator intent (acks, shelves), agreed by a majority
hist/ historian seam + Postgres sink, `naut historian`
alarm/ ISA-18.2 alarms: rules over UDT members, ack/shelve, journal
acceptance/ virtual-time acceptance tests (`naut test`, `*_test.yaml`)
server/ tag API over HTTP: JSON snapshot, SSE stream, tag writes, alarms, program history
cmd/naut the developer CLI: new · run · test · check · build · pull · lsp · eip · sparkplug · historian · alarms
hmi/ SvelteKit digital-twin component kit + realtime SSE client
tools/vscode-iec/ VS Code extension: syntax, diagnostics, go-to-def, live values, diagram editors
tools/jitter/ scan-loop lateness harness: the numbers behind docs/design/realtime.md
rt/ harder real-time spikes beside the Go build (a Rust fast loop + shared-memory tag exchange)
examples/ four real plant projects — lift-station, batch-skid, remote-fleet, go-sdk — see examples/README.md
The public API is the seams. You implement interfaces to bring your world:
| Interface | You provide |
|---|---|
io.Driver |
your field bus (Modbus / EtherNet-IP / OPC-UA / REST rack / sim) |
retain.Store |
where retained memory persists — file and k8s ConfigMap ship in retain/ |
runtime.Coordinator |
redundancy / leader election — a k8s Lease elector ships in leader/ |
hist.Sink |
where process history is archived — Postgres + naut historian ship in hist/ |
alarm.Journal / alarm.Notifier |
where alarm events land — a ring, rotated JSONL, and Postgres ship in alarm/ |
Getting started
Platforms: nautilus is one static binary with no runtime dependencies.
Every release ships builds for macOS (Apple Silicon and Intel),
Linux (x86-64, arm64 and ARMv7), and Windows (x86-64 and arm64);
the controller it builds runs anywhere the same binary does, from a laptop
to a Raspberry Pi to a Kubernetes pod, and on vendor controllers that open
their Linux: an Opto 22 groov EPIC and a Phoenix Contact PLCnext (see the
groov EPIC and
PLCnext guides). VS Code is the editor experience on all
three. The
release page
has the archives and a checksums.txt.
1. Install the CLI
macOS — pick arm64 for Apple Silicon, amd64 for Intel:
v=$(curl -fsSL https://api.github.com/repos/joyautomation/nautilus/releases/latest | grep -m1 '"tag_name"' | cut -d'"' -f4)
curl -fsSL "https://github.com/joyautomation/nautilus/releases/download/$v/nautilus_${v#v}_darwin_arm64.tar.gz" | tar xz naut
sudo mv naut /usr/local/bin/
Downloading with curl skips Gatekeeper's quarantine. If you fetched the
archive in a browser instead and macOS refuses to open the binary, clear the
flag once: xattr -d com.apple.quarantine /usr/local/bin/naut.
Linux — amd64 or arm64:
v=$(curl -fsSL https://api.github.com/repos/joyautomation/nautilus/releases/latest | grep -m1 '"tag_name"' | cut -d'"' -f4)
curl -fsSL "https://github.com/joyautomation/nautilus/releases/download/$v/nautilus_${v#v}_linux_amd64.tar.gz" | tar xz naut
sudo install naut /usr/local/bin/naut
Check it:
naut version
The command is
naut, notnautilus. GNOME's file manager already owns/usr/bin/nautiluson essentially every Linux desktop, and sharing the name broke both ways: install ours onPATHand clicking Files in the dock launched the CLI (org.gnome.Nautilus.desktoprunsExec=nautilusby bare name); leave it offPATHand typingnautilusopened the file manager, which read the argument as a folder and showed "Unable to find … Please check the spelling and try again."If you installed an earlier build as
nautilus, remove it:sudo rm -f /usr/local/bin/nautilus. The project is still called nautilus — only the command changed.
Windows — PowerShell, amd64 or arm64:
$v = (Invoke-RestMethod https://api.github.com/repos/joyautomation/nautilus/releases/latest).tag_name
Invoke-WebRequest "https://github.com/joyautomation/nautilus/releases/download/$v/nautilus_$($v.TrimStart('v'))_windows_amd64.zip" -OutFile nautilus.zip
Expand-Archive nautilus.zip -DestinationPath "$env:LOCALAPPDATA\nautilus" -Force
[Environment]:https://github.com/joyautomation/nautilus/blob/HEAD/:SetEnvironmentVariable("Path", "$env:LOCALAPPDATA\nautilus;" + [Environment]::GetEnvironmentVariable("Path", "User"), "User")
Open a new terminal afterwards so the Path change is picked up.
Any OS, with Go 1.24+ installed:
go install github.com/joyautomation/nautilus/cmd/naut@latest
This puts the binary in $(go env GOPATH)/bin, which needs to be on your
PATH. Whichever route you took, naut version should now answer.
The one binary is the whole toolchain: naut new (scaffold a
project), run, test, check (the CI gate: compiles every program and
cross-checks it against the manifest), build, pull (bring a controller's
running program back into the repo), lsp (the language server the VS Code
extension uses), and the eip, modbus, sparkplug, and historian tools.
2. Scaffold a project
naut new my-plant # the tour: 3 tasks, 3 IEC languages, simulated plant
naut new my-plant --template minimal # one task, one program, one test
naut new my-plant --template sdk # Go project, for a custom field bus
naut new my-plant --template sdk-demo # Go project with plant physics in Go
A nautilus project is your logic and a manifest. Run, test, and ship it with the CLI alone — no toolchain:
cd my-plant
naut run # scan loop + dashboard + tag API on http://localhost:8080
naut test # acceptance tests, in virtual time
naut build # emit ./my-plant — a self-contained controller binary
nautilus.yaml declares the tasks (one program file each, any language,
own scan rates), the tags by role, the server, and the field driver
(loopback for bring-up, EtherNet/IP by configuration). naut build
appends the project to the runner and emits one deployable binary — no Go
toolchain anywhere.
Your logic gets real tests. *_test.yaml files run against a virtual
clock, so a ten-second on-delay or a PI loop's settling time is asserted
exactly, deterministically, in milliseconds — the assertions a wall clock
makes impossible:
- name: low-temp alarm waits its full 10 s
suspend: [sim] # freeze the plant; drive the value directly
given: { TempC: 45.0 }
steps:
- advance: 9.5s
expect: { TempLowAlm: false } # the TON has not elapsed
- advance: 1s
expect: { TempLowAlm: true } # ... and now it has
The fixture is nautilus.yaml itself — tasks, rates, roles, seeds — so a
retuned gain can't drift away from what the tests verify. Assertions are
tag matchers or ST expressions (ABS(TempC - TempSP) < 0.5) compiled by
the same compiler as your logic.
Go is the SDK, not the base: --template sdk when you need a custom
field bus or richer simulation physics. Same runtime, with the manifest
written as code.
Run it bare for the interactive form, sv-create style — pick the template,
the program language, and the features (CI workflow, VS Code setup, git
init). An sdk template also asks for a module path, and gives you
main.go, program.st, a driver.go seam to fill in, Go acceptance
tests, CI, and .vscode/ recommendations.
3. Run and test it
cd my-plant
naut test # the acceptance suite, in virtual time
naut run # scan loop + tag API on http://localhost:8080
An sdk project is an ordinary Go program — go mod tidy, go run .,
go test ./... — and its Go tests get the same virtual clock through the
acceptance package.
Open http://localhost:8080 for the built-in live dashboard, or
GET /api/state for the raw tag snapshot. Setpoints are click-to-set right
in the tag table (BOOLs get a toggle); inputs and outputs are not editable,
because the driver rewrites one before every scan and the logic rewrites the
other after. Reads are open; set NAUTILUS_TOKEN=<secret> to require a token
on writes.
4. Develop in VS Code
Install nautilus IEC 61131-3 from the
VS Code Marketplace
or Open VSX
(code --install-extension joyauto.vscode-iec; Switch to Pre-Release
Version on the extension page follows main). Open your project folder — it recommends the extension — and with go run .
running you get compile diagnostics as you type, go-to-definition / hover /
completion, and live tag values as pills next to identifiers in
program.st.
On macOS, VS Code launched from the Dock or Spotlight gets the login PATH,
not your shell's, so it may not find naut even though your terminal
does. If the extension reports it could not start the language server, run
nautilus: Install or Update the naut CLI, set nautilus.cliPath to the
full path (which naut), or launch VS Code from a terminal with code ..
5. Make it yours
- Write control logic in
program.st, or in.ld,.fbd, or.sfc; the graphical languages open in full diagram editors in VS Code. - Swap
plant.gofor a realio.Driver— Modbus, EtherNet/IP, OPC-UA, your bus — when you have hardware. The control logic doesn't change. - Add an HMI:
npm install @joyautomation/nautilus-hmiin a SvelteKit app for SCADA faceplates and an SSE realtime client. Build it withadapter-staticand a manifest project can serve the build itself —server: { hmi: ./hmi/build }— so one binary is the whole deploy; see the tag-model guide's "Serving the HMI from the controller". - Ship it as one binary:
naut buildfor a manifest project,go buildfor an SDK project. The scaffolded CI gates onnaut check,naut test, andnaut build;naut new --deployadds a Dockerfile, a redundant-pair Kubernetes manifest, and the workflow that ships a merged commit to the controller.
Under the scaffold, a complete controller — an IEC program on a 10 Hz scan loop driving a field device — is about 30 lines:
rt, _ := runtime.New(runtime.Options{
Program: program, // IEC 61131-3 Structured Text (go:embed)
Driver: NewPlant(), // anything implementing io.Driver
Scan: 100 * time.Millisecond,
DtTag: "ScanDtS",
Tags: []runtime.TagDef{ // each tag's role, seed, and HMI docs — once
runtime.Input("LevelPct", runtime.Unit("%")),
runtime.Input("TempC", runtime.Unit("°C")),
runtime.Setpoint("TempSP", 65.0, runtime.Unit("°C")),
runtime.Setpoint("Kp", 12.0),
runtime.Setpoint("Ki", 0.15),
runtime.Output("PumpRun", runtime.Init(false)), // logic reads it back
runtime.Output("Heater", runtime.Unit("%")),
},
})
go rt.Run(ctx) // read inputs → run program → write outputs, every scan
How tags work — where they come from, which role fits which job, and the one rule that bites (reads fault, writes create) — is spelled out in The tag model below.
Or, from a clone of this repo, run the worked example:
go run ./examples/go-sdk
nautilus · go-sdk (heated tank) — tag API on http://localhost:8080 — Ctrl+C to stop
level 60.0% temp 60.0°C pump off heater 61% scans 9
level 59.9% temp 60.0°C pump off heater 62% scans 19
level 59.9% temp 60.0°C pump off heater 62% scans 29
The control logic itself lives in examples/go-sdk/program.st —
pump hysteresis and a PI temperature loop, in plain Structured Text. The
plant physics (plant.go) shows the shape a real field-bus driver takes —
see examples/go-sdk/README.md for the whole
SDK story. Everywhere else in examples/ the plant is a manifest
project — no Go — starting with examples/lift-station.
Talking to a real PLC (EtherNet/IP)
Point the importer at an Allen-Bradley Logix controller and it generates the types and bindings your project needs — committed source, not runtime config:
naut eip browse --host 192.168.1.10 # see what's on the controller
naut eip import --host 192.168.1.10 \
--tags 'Line1*,Program:MainProgram.*' \
--writable 'Line1Cmd*'
That writes eip_types.st (a TYPE block mirroring the controller's UDTs plus
suggested VAR_EXTERNAL declarations) and eip_manifest.go (the tag manifest).
Wire it into main.go:
driver, err := eip.New("192.168.1.10", EIPManifest,
eip.WithSlot(0),
// Polling policy is configuration, not codegen: re-running the import
// refreshes the tag catalog without touching these.
eip.WithScanRate(500*time.Millisecond), // default scan class
eip.WithScanClass("fast", 100*time.Millisecond),
eip.WithScanClass("slow", 10*time.Second),
eip.WithTagClass("fast", "Line1_PIT_*"), // globs on tag/device names
eip.WithTagClass("slow", "*_Totals"),
eip.WithTagClass(eip.NoPoll, "Line1Cmd*"), // cataloged + writable, never polled
)
driver.Start(ctx)
rt, err := runtime.New(runtime.Options{
Program: program,
Driver: driver,
Inputs: driver.InputNames(),
Outputs: driver.OutputNames(),
})
The driver polls each scan class on its own interval over one connection
(UDTs arrive as real struct values in ST), validates the manifest against
the live controller at startup so type drift fails loudly, and writes
changed outputs back on change — the runtime behaves like a PLC peer on the
network. Pure Go, no cgo; tested against an in-repo ControlLogix emulator
(eip/logixserver).
No PLC on the bench? naut logix emulate --l5x UpstreamLine.L5X serves a
Logix Designer export's tags — UDTs, program tags, initial values — as a
ControlLogix on 127.0.0.1:44818 (--ramp makes the numbers move), so
browse, import and a driver: {type: eip} project all run against it.
Writing Logix programs in nautilus (experimental)
The other direction: write the logic in nautilus — ladder or ST, in git,
tested on the nautilus runtime — and deploy it to a ControlLogix or
CompactLogix, with Studio 5000 running headless behind a logixd agent as
compiler and loader. Add a target: logix section to nautilus.yaml and:
naut check # also enforces the Logix subset, by rule ID
naut logix deploy --online # write the L5X, build it, online-edit the controller
naut test --target logix # the same acceptance tests, on the controller
naut logix import --project <dir> Line.L5X turns an existing export into
such a project. This is a proof of concept, verified on one controller
family at one firmware revision; see the
Authoring for Logix guide
and docs/design/logix-authoring.md.
Talking to Modbus TCP devices
Field devices that aren't a Logix PLC — PID loops behind a gateway, VFDs, analysers, power meters — come from a committed device map: register maps off the datasheet once per device type, hosts and unit-ids once per instance.
naut modbus import --map devices.yaml --plan
That writes modbus_manifest.yaml and tags/modbus.yaml — both generated,
never hand-edited, byte-identical on re-run — and --plan prints the
block-read plan: a four-channel analyser's floats coalesce into one FC3
request instead of four. In a manifest project the driver is configuration:
driver:
type: modbus
manifest: modbus_manifest.yaml # from `naut modbus import`
scan-rate: 1s
scan-classes: { fast: 500ms, slow: 2.5s }
tag-files: [tags/modbus.yaml]
Addresses are 0-based PDU addresses (40001 is holding 0); word and byte
order are per source, because the same hardware ships both ways. A Modbus
exception marks just that block bad and keeps polling; a transport failure
reconnects with backoff while values hold and <source>__Online goes false.
naut modbus serve stands in for the whole plant on one listener, so
the bench needs no hardware. examples/lift-station runs a whole plant
against it (devices.yaml, modbus_manifest.yaml), and the
Modbus TCP guide covers
the rest.
More than one bus: drivers:
A controller that polls a Modbus skid and consumes a Sparkplug fleet on
the same scan lists both. drivers: is the plural of driver: — each entry
is the same shape, with an optional name that status rows and error
messages use (default: the type, deduped as eip-2 when a type repeats):
drivers:
- type: modbus
manifest: modbus_manifest.yaml
- type: sparkplug-host
name: fleet
broker: "tcp://mqtt.plant:1883"
group-id: Plant
host-id: plant-scada
manifest: sparkplug_manifest.yaml
Reads fan out and merge, writes route to the driver whose bindings claim the
tag, and ownership is disjoint by construction: a tag delivered by two
drivers is a load error naming both, the same no-last-wins rule tag files
keep. /api/drivers shows one row per driver, and on a sparkplug: edge
node each field connection is its own device, born and killed by its own
link. The memory loopback cannot
join a list — it owns whatever is written to it, which is exactly what makes
it unroutable next to another driver.