Reference
CLI reference
Every subcommand and flag of the streamql binary.
streamql#
Running streamql with no subcommand starts the gateway. These flags are global and apply to every subcommand:
| Flag | Environment | Meaning |
|---|---|---|
-c, --config <file> | STREAMQL_CONFIG | TOML configuration file |
--upstream <url> | Upstream server, for example postgres://app:secret@db:5432/orders | |
--listen <addr> | Client listen address | |
--admin-listen <addr> | Admin API and console address | |
--no-admin | Disable the admin API and console (pool-only) | |
--pool-mode <mode> | session, transaction or statement | |
--pool-size <n> | Default maximum server connections per pool | |
--workers <n> | Worker threads (0 is one per CPU) | |
--log-level <filter> | Log level or filter, for example streamql_proxy=debug | |
--upgrade | STREAMQL_UPGRADE | Take over the listen sockets of the running process through runtime.handoff_socket; that process then drains and exits |
zero-config start
streamql --upstream postgres://app:secret@db:5432/app --pool-mode transaction --pool-size 20streamql config#
| Command | Meaning |
|---|---|
streamql config validate | Validate the configuration and exit non-zero on errors |
streamql config show | Print the effective configuration as TOML |
streamql import pgbouncer#
Converts a pgbouncer.ini into StreamQL TOML and reports keys it cannot map.
import
streamql import pgbouncer /etc/pgbouncer/pgbouncer.ini > streamql.tomlstreamql scram-verifier#
Prints a SCRAM-SHA-256 verifier for a password, for auth files. The password is prompted for or read from standard input when omitted; an argument is visible to other users in the process list.
verifier
streamql scram-verifier < password.txtstreamql worker#
Joins a primary as a worker, or manages join tokens.
| Flag | Environment | Meaning |
|---|---|---|
--join <url> | STREAMQL_WORKER_JOIN | Control plane of the primary, for example https://primary:9931 |
--token <token> | STREAMQL_WORKER_TOKEN | One-time join token; needed only for the first start |
--token-file <file> | STREAMQL_WORKER_TOKEN_FILE | Read the token from a file |
--name <name> | STREAMQL_WORKER_NAME | Name shown in the console (default: host name) |
--group <group> | STREAMQL_WORKER_GROUP | Worker group |
--zone <zone> | STREAMQL_WORKER_ZONE | Zone for zone affinity |
--advertise <host:port> | STREAMQL_WORKER_ADVERTISE | Address clients use to reach this worker |
--admin-advertise <host:port> | STREAMQL_WORKER_ADMIN_ADVERTISE | Address of this worker's admin API for health checks |
--state-dir <dir> | STREAMQL_WORKER_STATE_DIR | Identity, certificates and last-known configuration (default /var/lib/streamql/worker) |
streamql worker token create#
| Flag | Environment | Meaning |
|---|---|---|
--admin <url> | STREAMQL_ADMIN_URL | Admin API of the primary (default http://127.0.0.1:9930) |
--admin-token <token> | STREAMQL_ADMIN__TOKEN | Admin bearer token |
--ttl <seconds> | Token lifetime | |
--uses <n> | Number of workers that may join with it | |
--group, --zone, --note | Attach a group, a zone or a note |
streamql mcp#
Bridges MCP over stdio to a node's /mcp endpoint. The token is read from STREAMQL_MCP_TOKEN.
| Flag | Environment | Meaning |
|---|---|---|
--url <url> | STREAMQL_MCP_URL | Endpoint of a node with mcp.enabled = true (default http://127.0.0.1:9930/mcp) |
streamql probe#
Exits 0 when an HTTP endpoint answers 2xx, for container health checks.
probe
streamql probe http://127.0.0.1:9930/readyz