SerialPilot

/02 — Reference

Package matrix

Twenty-one published packages, all version 1.0.0, all under the @serialpilot scope (with the exception of the meta package, which is just serialpilot). Install the meta package for the common case; cherry-pick when bundle size matters.

Meta

PackageWhat it doesDepends on
serialpilot Auto-detected bindings, the stream wrapper, every parser re-exported. Most projects only need this one. everything below

Bindings

PackageWhat it does
@serialpilot/bindings-cpp Native N-API bindings. Ships with prebuilds for the common (OS, arch, Node) triples; falls back to a source build if none match.
@serialpilot/bindings-interface The TypeScript interface every binding implements. Import this if you're writing your own backend (a virtual port, a TCP-bridged port, a CI mock).
@serialpilot/binding-mock In-memory binding for tests. Echo, record, periodic data, programmable responders. See Mocking.

A pure-Rust binding ships in the same monorepo as a Cargo crate at crates/bindings-rust. It's not on npm because it isn't a JavaScript package — use it from Rust projects directly.

Interfaces

PackageWhat it does
@serialpilot/stream The Node.js Duplex stream wrapper that SerialPilot extends. Re-export it directly if you want a different binding without the parser bundle.

High-level helpers

PackageWhat it does
@serialpilot/reconnect Auto-reconnect wrapper with exponential backoff and device-filter rediscovery. See the recipe.
@serialpilot/command-queue Request/response over half-duplex links — AT commands, Modbus RTU, ccTalk. Per-command timeout, retry, regex match. See the Modbus recipe.

CLI

PackageBinaryPurpose
@serialpilot/listserialpilot-listEnumerate ports.
@serialpilot/terminalserialpilot-terminalInteractive console.
@serialpilot/replserialpilot-replScriptable Node REPL.

Parsers

PackageClassFor
parser-byte-lengthByteLengthParserFixed-size frames.
parser-cctalkCCTalkParserCoin/bill validators.
parser-delimiterDelimiterParserSplit on byte sequence.
parser-inter-byte-timeoutInterByteTimeoutParserQuiescence-based framing.
parser-packet-lengthPacketLengthParserLength-prefixed packets.
parser-readlineReadlineParserLine-by-line text.
parser-readyReadyParserWait for sentinel.
parser-regexRegexParserSplit on a pattern.
parser-slip-encoderSlipEncoder / SlipDecoderRFC 1055 SLIP framing.
parser-spacepacketSpacePacketParserCCSDS Space Packet.
parser-start-endStartEndParserSTX/ETX-style frames.

How the layers fit

┌────────────────────────────────────────────────────┐
│  serialpilot      (meta — re-exports everything)   │
└────────────────────────────────────────────────────┘
│            │             │
┌────▼────┐  ┌────▼────┐   ┌────▼────────────┐
│ stream  │  │ parsers │   │ helpers         │
│ Duplex  │  │ × 11    │   │ reconnect       │
│ wrapper │  │         │   │ command-queue   │
└────┬────┘  └─────────┘   └─────────────────┘
│
┌────▼─────────────────────────┐
│ bindings-interface           │
│  ↑ implemented by ↑          │
│ bindings-cpp · binding-mock  │
└──────────────────────────────┘

Versioning

All @serialpilot/* packages are released in lock-step. A 1.x release of the meta package always pins exact 1.x versions of its dependencies — there is no scenario where you should mix-and-match minor versions across the scope.

Pick the smallest set

If you're worried about install size or cold-start time:

  • Just opening a port and reading raw bytes? @serialpilot/bindings-cpp + @serialpilot/stream.
  • Plus line-oriented protocols? Add @serialpilot/parser-readline.
  • Need the mock for tests but only in dev? npm i -D @serialpilot/binding-mock.
  • Production resilience? @serialpilot/reconnect.

Edit this page on GitHub