Skip to content

Command Reference

Vaylix commands are parsed by the shared command crate before being encoded into transport requests. The client keeps help, exit, and quit local; server-recognized commands go over the framed binary transport.

auth <username> <password>

Authenticates the current connection when auth is enabled.

Example:

auth vaylix vaylix
ping [message]

Returns PONG or the supplied message.

Example:

ping healthcheck
info

Returns deterministic key/value fields with section prefixes such as server.*, transport.*, persistence.*, security.*, runtime.*, and metrics.*.

metrics
metrics prom

metrics returns OTel-aligned key/value metrics like vaylix.server.request.count. metrics prom returns the same contract in Prometheus text exposition form.

Example:

metrics prom

Keys are UTF-8 strings. Values are opaque bytes. CLI examples below use text input, which is sent as UTF-8, but the transport and SDK also support arbitrary binary payloads.

get <key>

Reads a value. Missing keys return NOT_FOUND.

Example:

get app:mode
set <key> <value> [nx|xx] [if version <version>] [ex <seconds>|px <millis>] [keepttl] [get]

Writes a value with optional existence conditions, version-based compare-and-set, expiration, TTL preservation, and previous-value return.

Example:

set app:mode production ex 60
set profile:blob updated if version 7
setnx <key> <value>

Writes only when the key does not already exist.

getdel <key>

Reads and deletes a key atomically.

getex <key> [ex <seconds>|px <millis>|persist]

Reads a key and updates or clears its expiration.

mget <key> [key ...]

Reads multiple keys in one request.

Example:

mget app:mode app:region
mset <key> <value> [key value ...]

Writes multiple key/value pairs in one request.

del <key> [key ...]
delete <key> [key ...]

Deletes one or more keys and returns the deleted count.

exists <key>

Returns whether the key exists.

Numeric commands interpret the stored value as a signed integer encoded in UTF-8 text.

incr <key>

Increments a numeric string and returns the new value.

decr <key>

Decrements a numeric string and returns the new value.

If the current value is not parseable as an integer, the server returns a structured error.

expire <key> <seconds>

Sets a TTL in whole seconds.

ttl <key>

Returns the remaining TTL using the current integer TTL convention.

persist <key>

Removes a key expiration if present.

Expired keys are purged on normal command paths, during background sweeps, and during snapshotting.

rename <source> <destination>

Renames a key, replacing the destination if needed.

renamenx <source> <destination>

Renames a key only when the destination does not exist.

scan <cursor> [match <pattern>] [count <n>]

Returns a cursor page of keys in deterministic sorted order.

Example:

scan 0 match app:* count 10
dbsize
count

Both return the live key count.

list

Returns live key/value entries.

clear
flushdb

Clears the current keyspace. When auth/RBAC is enabled, this requires the clear permission.

save
snapshot

Write a physical encrypted snapshot, seal the active WAL segment, open a new active segment, and prune retained sealed segments according to runtime policy.

backup
backup to <path>
backup verify <logical-dump-json>
backup verify from <path>

Logical backup commands operate on JSON dumps rather than physical storage files.

  • backup returns the logical dump inline
  • backup to <path> writes a server-local dump under the configured backup directory
  • backup verify ... validates dump structure and, for file-backed dumps, verifies the manifest sidecar

Example:

backup to nightly.json
restore <logical-dump-json>
restore from <path>
restore check <logical-dump-json>
restore check from <path>

Restore commands replace the current keyspace with the live entries from a validated logical backup. restore check ... performs validation without mutating engine state or WAL.

Example:

restore check from nightly.json
multi

Starts queueing commands for the current connection.

exec

Applies the queued commands as one single-node atomic WAL-backed batch if every queued command succeeds.

discard

Drops the queued transaction.

Current boundaries:

  • transactions are single-node only
  • transaction lifetimes are bounded by a server-side timeout
  • sequence-tagged or pipelined requests are rejected while a transaction is active
  • maintenance mode rejects transaction entry and commit
maintenance on
maintenance off
maintenance status

Maintenance mode is a persisted read-only admin mode. It survives restart through a sentinel file under the data directory.

While maintenance mode is enabled:

  • reads, info, metrics, metrics prom, backup verification flows, show *, whoami, and maintenance status remain available
  • mutating writes, restore flows, and transaction commands are rejected
health

Returns machine-readable readiness and role state as key/value fields.

show cluster

Returns cluster state such as local role, term, leader ID, quorum size, member count, sync policy, commit sequence, and local applied sequence.

show replication

Returns replication diagnostics such as role, node ID, group ID, leader hint, commit sequence, retention floor, paused state, and health reason.

cluster join <node-id> <host:port>
cluster remove <node-id>

Updates cluster membership from the leader. The <node-id> must be stable across restarts, and <host:port> must be reachable by peer replication traffic.

promote follower
pause replication
resume replication

These are administrative controls for exceptional operational workflows. Normal failover uses leader election; application writes should target the current leader.

These commands are server-side administrative commands. The engine remains unaware of users and roles.

create user <username> password <password>
alter user <username> password <password>
drop user <username>
create role <role>
drop role <role>

Example:

create user jane password SecurePass123

Password policy currently requires at least 12 characters with at least one ASCII letter and one ASCII digit.

grant role <role> to <username>
revoke role <role> from <username>

Example:

grant role readonly to jane
grant permission <permission> [on <pattern>] to <role>
revoke permission <permission> [on <pattern>] from <role>

The on <pattern> clause is optional. When omitted, the pattern defaults to *.

Example:

grant permission read on app:* to readonly
show users
show roles
show grants
show grants for user <username>
show grants for role <role>
whoami

Use show grants for the current authenticated user, or the for user / for role forms for administrative inspection.

help
exit
quit

These commands are handled by the client REPL and are never sent to the server.