A kit of device communication protocols.
Industrial device comms (Modbus, MC, Open Protocol) — not related to protobuf tooling.
Protokit is a monorepo of small, focused Node.js libraries for talking to
industrial devices (PLCs, controllers, assembly tools). Each protocol is
published as its own npm package under the @digta
scope, so you 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/openprotocolis the Atlas Copco assembly-tool protocol, not Google Protocol Buffers.
Install any package on its own:
npm i @digta/fins
npm i @digta/modbus
npm i @digta/mcprotocol
npm i @digta/open-protocolThis repo uses native npm workspaces (no Lerna/Nx/Turborepo).
git clone https://github.com/digtaalfathir/protokit.git
cd protokit
npm install # installs all workspaces + links them togetherCommon workspace commands:
npm install # install deps for every package
npm run start -w @digta/fins # run a script in one package
npm test --workspaces --if-present # run tests across all packages- Create the folder:
packages/<name>/. - Add
packages/<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": "packages/<name>" }
- Add
packages/<name>/index.js(the entrypoint) andpackages/<name>/README.md(what the protocol is, install, a short usage example). - Run
npm installat the repo root to wire the new workspace in. - Add a row to the Packages table above.
📖 First time? Full step-by-step walkthrough: PUBLISHING.md.
Packages are not published automatically. To publish (or update) a package:
Prerequisites (one-time):
- Create the npm organization
digta(npmjs.com → Add Organization). - Log in locally:
npm login.
Publish a package. Scoped packages default to private, so you must pass
--access public:
npm publish -w @digta/<name> --access publicFor example:
npm publish -w @digta/fins --access publicMIT © Rifky Andigta Al-Fathir