Getting Started
The nyxsql CLI
Connect to a node with nyxsql, run one-shot and streaming queries, and split the terminal to watch multiple queries.
nyxsql is the interactive terminal client — a multi-pane TUI for running
queries and following streaming results live.
Install & connect
cd drivers/cli
npm install
npm start -- --host 127.0.0.1 --port 7777
# or, after `npm link`:
nyxsql --host 127.0.0.1 --port 7777Use the port your server is listening on (the Docker image defaults to 7777;
local dev builds in the docs use 7510).
Running queries
- A one-shot query (
SELECT …) runs and returns a result grid. - A streaming query —
SELECT STREAM …— opens a live subscription: the snapshot loads, then new rows update the grid in place until you stop it.
SELECT STREAM symbol, payload, amount
FROM events
WHERE tenant_id = 42 AND active = true;Server timing
Results report dual timing, proton-style:
3 rows · server 28µs · 2ms round-trip- server — measured on the server (prepare + execute).
- round-trip — client-side wall time including the network hop.
Keybindings
| Key | Action |
|---|---|
Enter | Run the focused pane's query |
Ctrl+N / Ctrl+X | New / close pane |
Tab / Shift+Tab | Focus next / previous pane |
Up / Down | Move across input lines, then query history |
Ctrl+S | Toggle split layout (side-by-side / stacked) |
Ctrl+O | Toggle pane between table and changelog mode |
Ctrl+L | Clear the focused pane |
Ctrl+C | Stop the running query; press again within 2s to quit |
The changelog mode (Ctrl+O) shows the raw stream of insert/update/remove
operations behind a streaming result, rather than the reconciled grid.