v0.7.0

CLI Reference

Last updated


This page summarizes every command accepted by Exec and the bundled REPL, with the shared parsing rules and REPL controls.

Parsing Rules


  • Input is split on whitespace; command names are case-insensitive.
  • Multi-token values are joined back with single spaces, so repeated spaces collapse.
  • A wrong argument count returns usage: ...; an unknown command returns unknown: <CMD>.
  • List results print as numbered lines (1) item), or (empty list).

Command Summary


CommandSyntaxSuccess response
GETGET <key>raw value, or (nil)
SETSET <key> <value> [NX|XX] [seconds] [VECTOR]OK
EXISTEXIST <key>(integer) 1 or (integer) 0
TYPETYPE <key>json string int float bool date, or (nil)
DELDEL <key> [key2] ...(integer) n, or OK for a field
INCRINCR <key> [delta]new number
TTLTTL <key>(integer) n, or (nil)
EXPIREEXPIRE <key> <seconds>OK
EXPIREATEXPIREAT <key> <timestamp>OK
PERSISTPERSIST <key>OK
KEYSKEYS <pattern>key list
FINDFIND <op> <value> [LIMIT <n>]key list
QUERYQUERY <expression> [LIMIT <n>]key: value list
VSEARCHVSEARCH <text> [MATCH <pattern>] [LIMIT <n>]key list
VSIMVSIM <key1> <key2>(float) score
VGETVGET <key>JSON array
SELECTSELECT <db>OK

Keys with . on GET, EXIST, TYPE, SET, INCR, and single-argument DEL address JSON fields; see JSON Documents and Writing JSON Fields.

REPL Control


cmd/test/main.go opens ./temp. quit and exit are handled by the REPL, not Exec. Empty lines are ignored. EOF, SIGINT, and SIGTERM close the store before exit.

中文