PUB(1)

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

✨ PUB(1) ✨

okay so bestie, welcome to pub β€” the manual page, the moment, the whole vibe πŸ’… she lives in section 1 of the manual, she publishes messages, she's iconic. let's get into it.


🌸 NAME 🌸

pub β€” publishes a message to an MQTT topic. that's it. that's the job. she does one thing and she does it flawlessly πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

pub [OPTIONS]

no positional args, no chaos, just vibes and options. we love a clean signature 🫢


✨ DESCRIPTION ✨

so here's the tea: pub connects to the MQTT broker you tell her about, and then she takes whatever you're piping into stdin and publishes it to the topic you specified. that's the whole plot. main character behavior, honestly πŸ‘‘

and like, plot twist β€” all the options can be passed either as command-line arguments OR written in a simple config file. your choice, no judgment, we support both paths here 🌈


πŸ’… OPTIONS πŸ’…

here's the full roster, bestie. every single one. no skips, no skimming, we're reading the whole menu πŸŽ€

  • -auto-reconnect β€” she'll automatically reconnect when the connection gets lost. ghosting is not on the table, she comes back 😀
  • -broker URL β€” the broker address. should be in the form of a URL, so like, do it properly bestie πŸ¦‹
  • -ca-root FILE β€” path to a FILE containing CA certificates. it's optional, so no pressure ✨
  • -cert-file FILE β€” authenticate with a certificate. very official of you πŸ”
  • -clean β€” discard any pending messages from the broker. default true, so she's already doing this unless you say otherwise 🧹
  • -client-id STRING β€” a unique identifier for this client. if you don't give her one, it defaults to a semi-random string β€” she'll make something up, she's resourceful πŸ’«
  • -connect-retry β€” automatically retry the initial connection to the broker. persistence!! we stan πŸ”₯
  • -connect-retry-interval DURATION β€” how long to wait DURATION between initial connection attempts. default 30s ⏳
  • -config FILE β€” path to a FILE containing configuration values. optional! πŸ™ˆ
  • -header KEY=VALUE β€” set an HTTP header, in KEY=VALUE form. can be specified multiple times β€” stack 'em up πŸ₯ž
  • -key-file FILE β€” authenticate with a private key. keep it secret, keep it safe πŸ”‘
  • -password STRING β€” authenticate with a password 🀫
  • -qos INTEGER β€” quality of service for messages. an INTEGER, she's precise like that πŸ“Š
  • -retained β€” retain the message on the broker. she leaves a lil mark, she stays remembered 🌟
  • -tls-alpn STRING β€” ALPN value to include in the TLS handshake. can be specified multiple times ✨
  • -topic STRING β€” the topic to publish or subscribe to. can be specified multiple times β€” yes queen, multiple topics, she contains multitudes πŸ‘‘
  • -username STRING β€” authenticate with a username πŸͺͺ
  • -verbose β€” increase output. she gets chatty. we love a yapper πŸ’¬
  • -version β€” print version. just so you know what you're working with 🏷️

πŸŽ€ CONFIGURATION πŸŽ€

ngl this part is lowkey the best part. any option may be specified as a value in a configuration file instead of β€” or in addition to β€” a command-line option. mix and match, it's giving flexibility πŸ’–

important bestie: values present on the command-line take precedent over values in the configration file. so if they disagree, the command line wins. periodt. πŸ‘‘

which means it's super easy to make yourself a base configration file and then just augment it at run time. like a little starter pack you can customize on the fly 🌈

the config file is in a simple space-separated "option value" format β€” for example:

broker tcp://test.mosquitto.org:1883

see? no curly braces, no yaml indentation nightmare, just vibes 🧚


🌈 EXAMPLES 🌈

publish a message to a topic anonymously. so casual, so anonymous, so free πŸ¦‹

echo "hello" | pub -broker tcp://test.mosquitto.org:1883 -topic mqttcli/pubtest

πŸ’œ AUTHOR πŸ’œ

Link Dupont <link@sub-pop.net>

  • Author. that's the credit, give her her flowers πŸ’

and that's the whole page, bestie!! this was PUB(1), dated 08/22/2026, from your friends in section 1 of the manual πŸ’– go forth and publish, you've got this 🫢✨

πŸ“¦ 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