Skip to content

The danube CLI

One binary does everything: danube starts nodes, sends messages, manages topics and runs the cluster. Learn its shape once and every command feels familiar.

Terminal window
danube # overview of every command, plus a quick start
danube up # the three node modes, with examples
danube topic --help # any command or subcommand
danube produce -h # short summary instead of full help

Running danube alone only prints the overview. It never starts a server; that is always danube up <mode>.

Server

  • danube up standalone|cluster|edge: start a node
  • danube mcp: MCP server for AI agents (stdio, or --http ADDR)
  • danube console: web console backend (REST + /mcp)

Messaging

  • danube produce <TOPIC> -m MSG: publish messages
  • danube consume <TOPIC> -s SUB: stream messages

Resources

  • danube topic: create, describe, peek, branch, subscriptions, schemas, DLQ
  • danube namespace: namespaces and their policies
  • danube schema: schema registry subjects

Cluster operations

  • danube cluster: membership, storage, WAL, load manager
  • danube broker: list, unload, rebalance brokers
  • danube auth: roles, bindings, tokens
  • danube apply -f FILE: reconcile a desired-state manifest

Utilities

  • danube context: saved connection profiles
  • danube completions <shell>: shell completion scripts
  • danube version: print the version

Deep dives: Messaging, Resources, Cluster operations, MCP server.

Every client command (everything except up, context, completions and version) talks to a broker at http://127.0.0.1:6650 by default. Point it elsewhere with the shared connection flags:

  • --endpoint URL: broker address. https:// turns on TLS.
  • --context NAME: use a saved profile.
  • --token JWT: bearer token for secured clusters.
  • --tls: force TLS.
  • --tls-ca FILE: CA certificate used to verify the broker.
  • --tls-cert FILE, --tls-key FILE: client certificate and key for mTLS.
  • --tls-domain NAME: server name to verify (default localhost).
Terminal window
danube topic list --namespace default --endpoint https://danube.example.com:6650 --tls-ca ./ca.pem

Each flag has a matching environment variable: DANUBE_ENDPOINT, DANUBE_CONTEXT, DANUBE_TOKEN, DANUBE_TLS, DANUBE_TLS_CA, DANUBE_TLS_CERT, DANUBE_TLS_KEY, DANUBE_TLS_DOMAIN.

Typing endpoints and certificates gets old fast. Save them once:

Terminal window
# Save two profiles and make "local" the current one
danube context add local --endpoint http://127.0.0.1:6650 --use
danube context add prod --endpoint https://danube.example.com:6650 --tls-ca ./ca.pem --token "$TOKEN"
danube context list # * marks the current context
danube context use prod # switch
danube context show # settings of the current context, token masked
danube topic list --namespace default --context local # one-off override

Contexts live in ~/.config/danube/contexts.toml (or $DANUBE_CONFIG_DIR/contexts.toml). They are client-side only; the server never reads them. Also available: danube context current and danube context delete <NAME>.

Configure nodes with environment variables

Section titled “Configure nodes with environment variables”

danube up reads a few environment variables, handy in containers: DANUBE_DATA_DIR, DANUBE_LISTEN, DANUBE_ADVERTISED_ADDR, DANUBE_SEED_NODES, DANUBE_AUTH, DANUBE_JWT_SECRET, and for edge nodes DANUBE_EDGE_NAME, DANUBE_CLOUD_ENDPOINT, DANUBE_CLOUD_TOKEN. See Broker configuration for every flag.

--dry-run shows what would happen and changes nothing:

Terminal window
danube up cluster --data-dir /var/lib/danube --single-node --dry-run # print the resolved node config
danube apply -f desired_state.yaml --dry-run # print the reconcile plan
danube broker rebalance --dry-run # preview topic moves
Terminal window
danube completions bash > /etc/bash_completion.d/danube

PowerShell and Elvish are supported too: danube completions powershell, danube completions elvish.

Terminal window
danube version # or: danube -V