API reference

CLI

Run MQL from the shell, against a local directory or a server.

llms.txt

mentedb runs MQL from the shell, the way psql does for Postgres. It queries a local data directory directly (opened in-process, like sqlite3) or a running server over HTTP, one-shot or as a REPL. Install with cargo install mentedb-cli.

No flags required: it defaults to a local ./mentedb-data(the server's default directory), so run it where you ran the server. Point it elsewhere without repeating flags via MENTEDB_URL + MENTEDB_ADMIN_KEY or MENTEDB_DATA_DIR; explicit flags always win.

Terminal
# local: defaults to ./mentedb-data in the current directory
mentedb query 'RECALL memories WHERE type = semantic LIMIT 10'

# a specific directory (must not be open by a running server)
mentedb query --data-dir ./data 'RECALL memories LIMIT 5'

# a running server (or export the vars once)
export MENTEDB_URL=http://localhost:6677 MENTEDB_ADMIN_KEY="$KEY"
mentedb query 'RECALL memories WHERE content CONTAINS "espresso"'

# interactive REPL; output as --format table | json | csv
mentedb repl

Remote mode uses the admin-key-gated POST /v1/admin/mqlendpoint, the same one behind the console's query box.