Skip to content

The dispatched CLI

For Azure Service Bus · Version 0.1.0 · macOS, Windows and Linux

dispatched is the command-line side of Dispatched. It shares saved connections and the activity log with the desktop app, asks for the same confirmations before changing anything, and prints JSON with --format json for scripts.

Install

Every release on GitHub has a CLI archive per platform, each with a .sha256 checksum next to it:

  • macOS (Apple silicon and Intel, signed and notarized): dispatched-cli_0.1.0_macos-universal.zip
  • Windows: dispatched-cli_0.1.0_windows-x64.zip or _windows-arm64.zip
  • Linux: dispatched-cli_0.1.0_linux-x86_64.tar.gz or _linux-aarch64.tar.gz

Unpack it and put the binary on your path, for example on macOS or Linux:

shasum -a 256 -c dispatched-cli_0.1.0_macos-universal.zip.sha256
unzip dispatched-cli_0.1.0_macos-universal.zip -d dispatched-cli
sudo mv dispatched-cli/dispatched /usr/local/bin/
dispatched --version

On Windows, unzip dispatched.exe into a folder on your PATH.

Connect

Sign in with Microsoft Entra ID and list the namespaces you can reach:

dispatched login            # add --device-code over SSH
dispatched namespaces
dispatched --namespace my-namespace ls --topics

Or save a connection string as a profile, read from standard input so it never lands in your shell history, and mark it as production:

dispatched profile add prod-weu --connection-string-stdin --production
dispatched profile default prod-weu

For a one-off, set DISPATCHED_CONNECTION_STRING instead. Connection strings are kept in the system keychain, never in files.

Everyday commands

dispatched ls --topics                           # entities with message counts
dispatched peek orders --top 20                   # read without locking or removing
dispatched peek orders --dlq --filter "sys.DeliveryCount > 5"
dispatched dlq summary orders                     # dead letters grouped by reason
dispatched dlq resubmit orders --all --remove-original
dispatched purge orders --scope dlq
dispatched listen orders --format json            # one JSON object per new message

Filters work the same way in every command: --filter for properties (sys.* and user.*), and --body-contains, --body-regex or --body-json with --body-json-eq for the body.

Confirmations and production

A command that changes something first counts what it will touch and states it in one sentence, then asks. In scripts, --yes confirms without a prompt. On a production profile, --yes is not enough: name every entity the command touches with --confirm-prod:

dispatched --profile prod-weu purge orders --yes --confirm-prod orders

Every change, from the CLI or the app, is written to the local activity log: dispatched activity ls shows it.

Related