| Crates.io | tether-utils |
| lib.rs | tether-utils |
| version | 1.3.0-alpha |
| created_at | 2023-07-06 14:53:09.438006+00 |
| updated_at | 2025-05-09 14:50:13.96115+00 |
| description | Utilities for Tether Systems |
| homepage | https://github.com/RandomStudio/tether |
| repository | https://github.com/RandomStudio/tether |
| max_upload_size | |
| id | 909965 |
| size | 199,188 |
Utilities for Tether, a standardised MQTT+MessagePack system for inter-process communication.
This is both a library (for Tether Agents to use) and CLI tool (for development and troubleshooting), written in Rust.
With the CLI tool, users are provided a single binary with subcommands as follows:
playback belowThe utils are also provided as a library with an API; extensive use of this facility has been made by tether-egui (a GUI application providing much of the same utility as above, plus more). For example of API usage, see examples/api.rs for a quick overview.
Install
cargo install tether-utils
Monitor messages on all topics:
tether receive
There are always two parts to the CLI command
tether
--host or --loglevelreceive, send, topics, record or playback
Here's an example of using the receive subcommand but specifying some non-default details for the MQTT Broker, and a non-default topic:
tether --host 10.0.0.1 --username myUserName --password myPaSsWorD! receive --topic something/something
tether receivetether receivetether send --helptether sendtether sendtether send --help--message:This will be automatically converted into a MessagePack payload if it is valid JSON. You can typically enclose everything in single-quotes, like this:
tether send --message '{"foo":[1,2,3]}
tether send --message '[0,1,2]'
tether send --message '{"hello":"world", "arr":[1,2,3]}'
Alternatively, escape characters such as ", [, ], { and }:
tether send --message \{\"hello\":\"world\"\,\"arr\":\[1,2,3\]\}
tether topicsSuper useful for seeing which Agents are online, and how message topics are being parsed according to Agent Role, Channel Name and (optional) Agent ID. Now also provides live rate calculations (messages per second) and activity graph as below:

💡 This utility can't see into the past (except in the case of retained messages), so keep this in mind for Agents that don't publish frequently.
tether topicstether topics --helptether recordtether recordtether record --helpBy default, a file named recording-00000000.json (where the numbers are a timestamp) is generated in the current directory.
tether playbacktether playback--topics.filtertether playback --helpIf you don't specify a file, an included demo file (demo.json) will be used instead. You probably want to specify a path to a real file, in most cases.
💡Tip: loop the playback infinitely by passing
--loops.infinite