# keyval/cmd Queue a command on a client and return a Future; `[await ...]` for the reply. Commands pipeline over one multiplexed connection and are matched FIFO, so blocking commands (`BLPOP`, `WAIT`, `XREAD BLOCK`) stay pending without stalling other calls. ## Syntax
[keyval/cmd $client "SET" "k" "v" ...]
## Parameters - `$client` — client from `keyval/connect` - `$cmd` — command name (string or keyword) - args — strings/keywords sent verbatim, numbers as decimal, booleans as `"true"`/`"false"`, `nil` as an empty bulk string ## Examples
[await [keyval/cmd $rds "SET" "k" "v"]]          # → "OK"
[await [keyval/cmd $rds "GET" "k"]]              # → "v"
[await [keyval/cmd $rds "HGETALL" "h"]]          # → %{:name "bob" :age 9}
set fut [keyval/cmd $rds "BLPOP" "q" "5"]        # blocking# other calls proceed
[await $fut]
## Returns Future resolving to the decoded reply: strings, numbers, booleans, `nil`, vectors (arrays), maps (string keys become keywords), sets. Error replies resolve to `%Err{:message}`. Unencodable arguments (nested collections, functions, resources) and a closed client return `%Err` immediately. SUBSCRIBE-family replies arrive as pushes — see `keyval/on-message`. ## See Also `keyval/connect`, `keyval/on-message`, `keyval/info`