Alopex CLI
Alopex CLI provides access to embedded and server-backed Alopex DB features. It supports SQL, KV, Vector, and Columnar workflows with streaming output and an optional TUI preview for SELECT queries.
Quick start
Local (embedded) SQL:
Server profile (HTTPS required):
Output formats
Use --output to control formatting:
table(default)jsoncsvtsv
Streaming flags
For SELECT queries, streaming output supports:
--fetch-size <n>: server batch size--max-rows <n>: stop after N rows--deadline <duration>: timeout (examples:60s,5m,1h)
Example:
TUI preview
Launch the TUI for SELECT results:
Keybindings (TUI):
q/Esc: quit?: help/: searchn/N: next/previous matchhjklor arrow keys: move selectiong/G: jump top/bottomCtrl+d/Ctrl+u: page down/upEnter: toggle detail panelJ/K: scroll detail panel
Note: --tui requires a TTY. When running in non-interactive mode, the CLI
falls back to batch output and preserves --output formatting.
Profiles and server connections
Profiles are stored in ~/.alopex/config (TOML). Example with a local profile:
[]
= "local"
[]
= "/var/lib/alopex"
Server profile with fallback to local data directory:
[]
= "server"
[]
= "https://db.example.com"
# Optional local fallback when the server is unavailable
[]
= "/var/lib/alopex"
Set a default profile:
= "prod"
Authentication
Token
[]
= "server"
[]
= "https://db.example.com"
= "token"
= "YOUR_TOKEN"
Basic (password_command)
[]
= "server"
[]
= "https://db.example.com"
= "basic"
= "alice"
= "security find-generic-password -w -s alopex"
mTLS
[]
= "server"
[]
= "https://db.example.com"
= "mtls"
= "/etc/alopex/client.pem"
= "/etc/alopex/client-key.pem"
Server management commands
All server commands require a server profile. Commands:
Examples
SQL streaming to CSV:
KV get:
Vector search: