HTTP key/value store backed by LMDB with JaQ queries over JSON.
- Stores JSON values (encoded as CBOR in LMDB).
- Query over a key prefix or full DB using JaQ filters.
- Streaming JSON array responses.
- Metadata fields added to query inputs:
_key(string),_at(unix seconds).
All responses are JSON. Errors return {"error":"...","code":"..."}.
Fetch a single value by key.
Run a query over all keys. q defaults to .. from is unix seconds (float).
Run a query over keys with the given prefix. The prefix must end with /.
Upsert a JSON value at the key. Returns 204 on change, 304 if unchanged.
Run a query with a JSON body:
{
"prefixes": ["logs/", "users/"],
"query": ".field",
"from": 0
}from is optional (defaults to 0).
Delete a key. Returns 204.
- If the query does not contain
inputs, the server runsinputs | <query>. - Each input is a JSON object with
_keyand_atadded.
STORE_PORT(default:3000)STORE_DB_PATH(default:cache)STORE_MAX_BODY_BYTES(default:1048576)STORE_API_KEY(optional; when set, all requests require auth)
The server binds to 127.0.0.1:<PORT>.
If STORE_API_KEY is set, every request must provide it via one of:
Authorization: Bearer <key>Authorization: <key>X-API-Key: <key>
cargo build
cargo run
The server binds to 127.0.0.1, so port publishing will not expose it outside the container.
Use host networking or change the bind address in code.
docker build -t jqkv .
docker run --rm --network host \
-e STORE_DB_PATH=/data \
-v $(pwd)/cache:/data \
jqkv