A kit of device communication protocols.
Industrial device comms (Modbus, MC, Open Protocol) — multi-language, not related to protobuf tooling.
Protokit is a monorepo of small, focused libraries and services for talking to industrial devices (PLCs, controllers, assembly tools), organized by language:
protokit/
node/ npm workspaces — @digta/* packages (published to npm)
go/ Go module — libraries + runnable commands (compiled binaries)
Each language uses its own native tooling — npm for node/, Go modules for
go/ — so they don't step on each other.
Published under the @digta scope; install
only the protocol you need.
| Package | Protocol | Status | npm |
|---|---|---|---|
| @digta/fins | Omron FINS TCP | ✅ Working (app/service) | npm i @digta/fins |
| @digta/modbus | Modbus TCP | ✅ Working (zero-dep TCP master) | npm i @digta/modbus |
| @digta/mcprotocol | Mitsubishi MELSEC MC (1E/3E) | ✅ Working (fork of mcprotocol 0.1.2 + ASCII 3E framing fix) | npm i @digta/mcprotocol |
| @digta/open-protocol | Atlas Copco Open Protocol | ✅ Working (zero-dep MID codec + TCP client) | npm i @digta/open-protocol |
Status legend: ✅ usable today · 🚧 scaffolded, implementation in progress.
Note:
@digta/open-protocolis the Atlas Copco assembly-tool protocol, not Google Protocol Buffers.
Go module github.com/digtaalfathir/protokit/go — compiles to single static
binaries (no runtime needed on the target). See go/README.md
for layout and how to build, run, and autostart (systemd / pm2).
| Package | Protocol | Status |
|---|---|---|
| go/mcprotocol | Mitsubishi MELSEC MC (3E binary, word devices) | ✅ read/write words |
| go/modbus | Modbus TCP (master) | ✅ read/write coils + registers |
| go/open-protocol | Atlas Copco Open Protocol | ✅ codec + client (reconnect/heartbeat) |
| go/fins | Omron FINS/TCP | ✅ read/write memory areas |
npm i @digta/fins
npm i @digta/modbus
npm i @digta/mcprotocol
npm i @digta/open-protocolNative npm workspaces (no Lerna/Nx/Turborepo).
git clone https://github.com/digtaalfathir/protokit.git
cd protokit
npm install # install + link all node/ workspaces
npm run start -w @digta/fins # run a script in one package
npm test --workspaces --if-present # run tests across all packagescd go
go run ./cmd/<tool> # run during development
go build -o <tool> ./cmd/<tool> # build a binary
GOOS=linux GOARCH=amd64 go build ... # cross-compile for a Linux device- Create
node/<name>/. - Add
node/<name>/package.json:"name": "@digta/<name>","version": "0.1.0"description+keywords(protocol, industrial, plc, iot, tcp, serial, …)"license": "MIT","author": "Rifky Andigta Al-Fathir"main/exportsand a"files"field (publish only what's needed)repository:{ "type": "git", "url": "git+https://github.com/digtaalfathir/protokit.git", "directory": "node/<name>" }
- Add
node/<name>/index.js(entrypoint) andnode/<name>/README.md. - Run
npm installat the repo root to wire the new workspace in. - Add a row to the Node.js packages table above.
Add a library under go/<name>/ and/or a runnable command under
go/cmd/<tool>/. See go/README.md.
📖 First time? Full step-by-step walkthrough: PUBLISHING.md.
Node packages are not published automatically. Prerequisites: create the npm
org digta and npm login. Scoped packages default to private, so pass
--access public:
npm publish -w @digta/<name> --access publicMIT © Rifky Andigta Al-Fathir