CLI Reference
Use this reference for the commands accepted by Store.Exec and the bundled REPL.
Command Summary
| Command | Syntax | Purpose |
|---|---|---|
GET |
GET <key> |
Read a key or dotted JSON field |
SET |
SET <key> <value> [NX|XX] [seconds] [VECTOR] |
Write a value with optional condition, TTL, and embedding |
EXIST |
EXIST <key> |
Test whether a key or field exists |
TYPE |
TYPE <key> |
Return the detected value type |
DEL |
DEL <key> [key2] ... |
Delete keys or one dotted field |
INCR |
INCR <key> [delta] |
Increment a numeric key or field |
TTL |
TTL <key> |
Return remaining lifetime |
EXPIRE |
EXPIRE <key> <seconds> |
Set a relative expiration |
EXPIREAT |
EXPIREAT <key> <timestamp> |
Set an absolute Unix expiration |
PERSIST |
PERSIST <key> |
Remove expiration |
KEYS |
KEYS <pattern> |
List keys matching a glob |
FIND |
FIND <op> <value> [LIMIT <n>] |
Compare complete stored values |
QUERY |
QUERY <expression> [LIMIT <n>] |
Filter JSON documents |
VSEARCH |
VSEARCH <text> [MATCH <pattern>] [LIMIT <n>] |
Search vectorized keys |
VSIM |
VSIM <key1> <key2> |
Compute vector similarity |
VGET |
VGET <key> |
Return a stored vector |
SELECT |
SELECT <db> |
Switch active database from 0 to 15 |
Key and Field Commands
GET
GET <key>
A dotted key reads a nested JSON field. Missing keys and fields return (nil).
SET
SET <key> <value> [NX|XX] [seconds] [VECTOR]
NX requires the top-level key to be absent; XX requires it to exist. A positive trailing integer sets TTL in seconds. VECTOR is accepted only for top-level writes and starts asynchronous embedding attachment.
The command joins remaining value tokens with spaces after removing recognized trailing options.
EXIST and TYPE
EXIST <key>
TYPE <key>
EXIST returns (integer) 1 or (integer) 0. TYPE returns json, string, int, float, bool, date, or (nil).
DEL
DEL <key> [key2] ...
One dotted key deletes a JSON field and returns OK. Otherwise, DEL removes top-level keys and returns the number deleted.
INCR
INCR <key> [delta]
The default delta is 1. The target must already be numeric. Dot notation increments a numeric JSON field.
Expiration Commands
TTL <key>
EXPIRE <key> <seconds>
EXPIREAT <key> <timestamp>
PERSIST <key>
TTL returns (integer) -1 when the key has no expiration and (nil) when it is missing or expired. Successful expiration mutations return OK; invalid or absent targets return an error or (nil) according to the command path.
Scan and Query Commands
KEYS
KEYS <pattern>
Uses Go path.Match against top-level keys and returns lexicographically sorted results.
FIND
FIND <op> <value> [LIMIT <n>]
Operators: eq, ne, gt, gte/ge, lt, lte/le, and like. Results are ordered newest first.
QUERY
QUERY <expression> [LIMIT <n>]
Supports JSON field conditions, AND, OR, NOT, and parentheses. Comparison aliases include =, !=, >, >=, <, and <=.
List-producing commands render numbered lines such as 1) key; no matches return (empty list).
Vector Commands
VSEARCH
VSEARCH <text> [MATCH <pattern>] [LIMIT <n>]
MATCH and LIMIT may appear in either order at the end. The default limit is 10. The command requires an initialized embedder.
VSIM
VSIM <key1> <key2>
Returns (float) <score>, (nil) for missing vectors, or an error for dimension mismatch.
VGET
VGET <key>
Returns the embedding as a JSON array, or (nil) when unavailable.
Database Selection
SELECT <db>
The index must be an integer from 0 through 15. Selection is local to the current Store or Session handle.
REPL Control
The bundled client accepts quit and exit locally; these are not Exec commands. Empty lines are ignored. SIGINT and SIGTERM close the store before exit.