How sng2c/rpipe works
rpipe is a Go CLI that bridges local streams or a child process to Redis pub/sub, with pipe-transfer and chat modes and optional end-to-end encryption. The main workflow is local input → message preparation and encryption → Redis publication; incoming Redis messages are handled by the runtime, decrypted when secured, and delivered to local output or a child’s stdin. The README documents the overall bridge and key negotiation; the excerpts show the runtime and helpers, but omit parts of the main loop, so some internal receive-path links are not asserted.
Main entry points: rpipe.go Rpipe runtime · cryptor.go Key management · spawn.go Child process adapter · msg.go Wire envelope
Components 11
Bridge runtime
- Rpipe runtime
rpipe.go
Message protocol
- Chat framing
msgspec/msg.go - Wire envelope
msgspec/msg.go
Encryption
- Key management
secure/cryptor.go - Payload cipher
secure/cryptor.go
Local I/O
- Stream framing
pipe/bufutil.go - Child process adapter
pipe/spawn.go
Other components
- CLI user
- Local streams
- Child command
- Redis pub/sub
Connections 12
- CLI user → Rpipe runtime: configures and starts
README.md - Rpipe runtime → Stream framing: reads and writes
rpipe.go - Rpipe runtime → Child process adapter: spawns command
rpipe.go - Child process adapter → Child command: runs command
pipe/spawn.go - Rpipe runtime → Local streams: reads and writes
rpipe.go - Rpipe runtime → Chat framing: parses and encodes
rpipe.go - Rpipe runtime → Wire envelope: publishes messages
rpipe.go - Rpipe runtime → Key management: manages keys
rpipe.go - Rpipe runtime → Payload cipher: encrypts and decrypts
rpipe.go - Key management → Wire envelope: builds reset messages
secure/cryptor.go - Key management → Redis pub/sub: stores and fetches keys
secure/cryptor.go - Rpipe runtime → Redis pub/sub: publishes and subscribes
README.md