Interactive Commands
Launch interactive mode with kalam (no --command or --file). Type SQL directly or use backslash meta-commands. --command also accepts meta-commands for one-shot cluster and admin operations.
Core shell and inspection
| Command | Description |
|---|---|
\help, \? | Show help. |
\quit, \q | Exit CLI. |
\info, \session | Session, server URL, health, version, cluster, config. |
\sessions | Active PostgreSQL gRPC bridge sessions from system.sessions. |
\history, \h | Open command history menu. |
\health | Unauthenticated public health probes. |
\stats, \metrics | Query system stats metrics. |
\health uses /health and /v1/api/healthcheck without authenticated SQL. On remote deployments those endpoints may be localhost-only.
\sessions runs:
For active transactions across pg_kalam and /v1/api/sql:
See system views for columns and patterns.
Namespace, schema, impersonation
| Command | Description |
|---|---|
\dt, \tables | List tables. |
\d <table>, \describe <table> | Describe columns. |
\as <user_id> <SQL> | Wrapper for EXECUTE AS '<user_id>'. |
\format table|json|csv | Change output format. |
\refresh-tables, \refresh | Refresh autocomplete metadata. |
\flush shortcuts STORAGE FLUSH:
\flushor\flush all—STORAGE FLUSH ALLin current namespace\flush table messages—STORAGE FLUSH TABLE chat.messageswhen namespace ischat\flush table billing.invoices— preserves explicit namespace
See impersonation for delegation rules.
Table transfer
| Command | Description |
|---|---|
\export <namespace.table> [--user-id <id>] [--output <file.zip>] | Export table to local ZIP. |
\import <namespace.table> <file.zip> [--user-id <id>] | Import ZIP into target table. |
- Runs async server jobs with progress polling
- User tables require
--user-idwhen applicable <namespace.table>is required; unqualified names are rejected
Credentials
| Command | Description |
|---|---|
\show-credentials, \credentials | Show stored credentials for current instance. |
\update-credentials <user> <pass> | Update credentials. |
\delete-credentials | Delete credentials for current instance. |
Live queries
| Command | Description |
|---|---|
\live <SQL>, \subscribe <SQL> | Start live subscription. |
See Live Subscriptions.
Topic consumer
| Command | Description |
|---|---|
\consume <topic> [--group NAME] [--from earliest|latest|OFFSET] [--limit N] [--timeout SECONDS] | Consume topic messages. |
See Topic Consumers.
Cluster and ingest
| Command | Description |
|---|---|
\flush [all|table <table>] | STORAGE FLUSH in current namespace context. |
\cluster snapshot | Trigger cluster snapshot. |
\cluster purge --upto <index> | Purge Raft logs up to index. |
\cluster trigger-election | Trigger elections across groups. |
\cluster transfer-leader <node_id> | Request leader transfer. |
\cluster rebalance | Rebalance data-group leaders. |
\cluster stepdown | Request leader stepdown. |
\cluster clear | Clear older snapshot files. |
\cluster list, \cluster ls | Node overview from system.cluster. |
\cluster list groups | Raft group details. |
\cluster join <node_id> <rpc_addr> <api_addr> | Add a node at runtime. |
One-shot examples:
Cluster routing details: SQL Workflows.
Last updated on