netcat for industrial I/O Press [T] for Theme

70% of field troubleshooting is reading registers. Leave it to otcat.

Read, write, and watch PLC registers directly from the command line using otcat (or short binary alias otc), the way nc lets you inspect a TCP socket. Zero external dependencies, single static binary.

go install github.com/QuitOperation/otcat/cmd/otc@latest

What is otcat

A single static Go binary designed for automation engineers, OT security, and shell scriptability.

FOR AUTOMATION & SCADA

Direct PLC Register Diagnostics

Query Modbus holding registers, coils, and discrete inputs directly from standard terminal shell sessions.

FOR FIELD TECHS

Zero Vendor Software Required

Ditch multi-gigabyte proprietary vendor clients. Read raw numbers or structured JSON in under 5ms.

FOR DEVOPS & CI

Unix Pipe Composition

Pipe register values directly into awk, jq, or tee for instant automated field logging.

Install via Package Managers

Native package distribution for Debian/Ubuntu, Fedora/RHEL, Alpine Linux, Python PyPI, and Go.

sudo apt install -y otcat

Official Python Library

Python bindings wrapping the compiled Go core binary with zero extra dependencies.

pip install otcat
example.py — Python 3.9+ Bindings
otcat.Client
1from otcat import Client
2
3# Connect directly to target PLC or Modbus TCP gateway
4c = Client("192.168.1.10:502")
5
6# Read holding register 40001
7val = c.read("holding:40001")
8print(val.value, val.quality, val.ts)
9
10# Live watch stream for real-time telemetry analytics
11for item in c.watch("holding:40001", interval="500ms", count=10):
12 print(item.ts, item.value)
13
14# Write register setpoint value (confirm=True by default for safety)
15c.write("holding:40001", 100)

Field Terminal GIF Demos

Recorded live terminal sessions of otcat executing Modbus operations and AWK pipelines.

otcat quickstart demo recording showing JSON output
otcat quickstart: reading holding register 40001 as JSON

Visual Command Builder

Visually configure CLI flags and execute them directly in the terminal simulator.

otcat --modbus 192.168.1.10:502 --read holding:40001 --json --confirm

Read, watch & write from simply standard shell

No GUI overhead. Run single-shot queries or continuous live telemetry watch streams with jittered exponential backoff for field resilience.

Quick Tip: Use otc as a short binary alias for maximum shell typing speed.
$ otcat --modbus 192.168.1.10:502 --read holding:40001 --json
{ "address": "holding:40001", "table": "holding", "offset": 0, "value": 12450, "status": "OK" }

Interactive Address Converter

Convert 5-digit Modbus addresses to 0-indexed hex offsets and protocol function codes.

Data Table
Holding Registers
0-Indexed Offset
0x0000 (0)
Function Code
FC03 (Read)
otcat CLI Flag
holding:40001
0
Third-party external Go dependencies
100%
Standard library Go code compliance
< 5ms
Average Modbus TCP register query latency

Frequently Asked Questions

Everything you need to know about using otcat in industrial environments.

What protocols are currently supported in otcat?
Modbus TCP is completely implemented across all four data tables (coils, discrete inputs, holding registers, input registers), supporting both classic 40001-style addressing and zero-based offsets. EtherNet/IP, S7comm, and BACnet CLI flags are registered and on the active roadmap.
Yes, otcat requires explicit safety confirmation gates (--confirm) or stdin piping flags (--from-stdin) before sending any write PDU to a controller, preventing accidental register writes.
otc is simply otcat compiled under its short name, giving you identical flags and behavior while saving characters when typing in terminal field sessions.

Once your backlog starts, start with otcat.

Install the binary using Go or download prebuilt releases for Linux, macOS, or Windows.