Skip to main content

CLI Operations

The yedmq binary starts the broker and provides a small set of operational commands for local diagnostics and automation.

Start the broker

./target/release/yedmq start -c yedmq.toml

Running ./target/release/yedmq with no subcommand remains supported and starts the broker with the default configuration search path. Use start -c <path> when the config file is not named yedmq.toml or is not in the current working directory.

Version

./target/release/yedmq version

This command does not require a config file or a running broker.

Config check

./target/release/yedmq config check -c yedmq.toml

config check loads and validates the config without starting plugins, opening listener ports, or creating a broker app. It reports OK, WARN, and ERROR checks.

Warnings do not fail the command by default. Use --strict to make warnings return a non-zero exit code:

./target/release/yedmq config check -c yedmq.toml --strict

Common warnings include an empty [listener.api.auth].users list, missing TLS certificate files, a missing plugin directory, or an Admin API listener exposed on a non-loopback address.

Status commands

Status commands call the REST management API. The default Admin API URL is http://127.0.0.1:3456.

export YEDMQ_API_USER=admin
export YEDMQ_API_PASSWORD=replace_me

./target/release/yedmq node status
./target/release/yedmq cluster status
./target/release/yedmq broker stats

You can override the API URL:

./target/release/yedmq cluster status \
--admin http://127.0.0.1:3456 \
--user admin \
--password-stdin

For scripts, pipe the password through stdin:

printf '%s' 'replace_me' | \
./target/release/yedmq node status --user admin --password-stdin

All status commands support JSON output:

./target/release/yedmq broker stats --output json

Authentication

Status commands use HTTP Basic Authentication against the Admin API. Add at least one user before running them:

[listener.api.auth]
users = [{ username = "admin", password = "replace_me" }]

The CLI reads credentials in this order:

  • username: --user, then YEDMQ_API_USER
  • password: --password, then --password-stdin, then YEDMQ_API_PASSWORD

--password is convenient for local development. For shared scripts, prefer YEDMQ_API_PASSWORD or --password-stdin.

Exit codes

CodeMeaning
0Success
1General error
2CLI argument error
3Configuration error
4Admin API connection, timeout, or authentication error
5Broker reachable but unhealthy, not ready, or returned an unusable response