SUB(1)

πŸ“¦
version 0.2.8 Β· 3 versions
, in fedora 43

πŸ’– SUB(1) β€” like, the manual page, bestie πŸ’–

okay so real talk, you found the man page for sub from the SUB(1) manual, and honestly? she's a baddie. let's get into it 🫢


✨ NAME ✨

sub β€” subscribe to MQTT topics 🌸


✨ SYNOPSIS ✨

sub [OPTIONS]

that's it. that's the whole vibe. no positional args, just options, and she eats every time πŸ’…


✨ DESCRIPTION ✨

sub connects to the MQTT broker you tell her about and subscribes to all the topics you specify. Every message that comes in on a topic gets printed to stdout, and it's prefixed with the topic the message arrived on, so you always know who's talking. main character behavior tbh πŸ‘‘

and here's the cute part: every single option can be passed either as a command-line argument or written in a simple config file. your choice, your rules, no cap ✨


✨ OPTIONS ✨

  • -auto-reconnect β€” automatically reconnect when connection is lost. she comes back. she always comes back πŸ¦‹
  • -broker URL β€” broker address (should be in the form of a URL)
  • -ca-root FILE β€” path to a FILE containing CA certificates (optional)
  • -cert-file FILE β€” authenticate with a certificate πŸŽ€
  • -clean β€” discard any pending messages from the broker (default true)
  • -client-id STRING β€” unique identifier for this client (defaults to a semi-random string)
  • -connect-retry β€” automatically retry initial connection to broker πŸ”
  • -connect-retry-interval DURATION β€” wait DURATION between initial connection attempts (default 30s)
  • -config FILE β€” path to FILE containing configuration values (optional)
  • -header KEY=VALUE β€” set an HTTP header (in KEY=VALUE form) (can be specified multiple times)
  • -key-file FILE β€” authenticate with a private key πŸ”
  • -password STRING β€” authenticate with a password
  • -qos INTEGER β€” quality of service for messages
  • -tls-alpn STRING β€” ALPN value to include in the TLS handshake (can be specified multiple times)
  • -topic STRING β€” topic to publish or subscribe to (can be specified multiple times) πŸ’–
  • -username STRING β€” authenticate with a username
  • -verbose β€” increase output πŸ—£οΈ
  • -version β€” print version

✨ CONFIGURATION ✨

Any option may be specified as a value in a configuration file instead of (or in addition to) a command-line option. like, you don't have to pick one, you can do both, it's giving polyamorous but for flags πŸ’œ

Values present on the command-line take precedent over values in the configration file. so the command line always wins, periodt πŸ‘‘

Thus it is easy to create a base configration file that can be augmented easily at run time. build your little base, then spice it up on the fly. iconic.

The configuration file takes the form of a simple space-separated "option value" format (i.e. "broker tcp://test.mosquitto.org:1883").

ngl bestie, the original spells it "configration" twice β€” that's a typo in the man page itself, not a you problem. i'm keeping it exactly as written because facts are facts πŸ™ˆ

✨ EXAMPLES ✨

Connect to a broker anonymously and subscribe to two topics. ✨

sub -broker tcp://test.mosquitto.org:1883 -topic mqttcli/pubtest -topic mqttcli/pubtest1

Connect to a broker using username/password authentication and subscribe to a topic. πŸ”

sub -broker tcp://test.mosquitto.org:1884 -username ro -password readonly -topic mqttcli/pubtest

✨ AUTHOR ✨

Link Dupont <link@sub-pop.net>

  • Author. πŸ’–

and that's the whole page, bestie!! this was SUB(1), dated 08/22/2026, and it's lowkey a masterpiece. go forth, subscribe to your topics, and slay πŸ’…βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’–πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from
  • fedora 43: mqttcli 0.2.8-2.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND EPL-2.0 AND GPL-3.0-only AND MIT AND Unlicense
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms