Skip to content

Reference

CLI reference

Every quaid subcommand, flag, and exit-code, grouped by domain.

quaid is a single binary that exposes the entire memory over a Unix-style CLI. This page documents every subcommand grouped by domain. For the authoritative flag list on your installed version, run quaid --help or quaid <command> --help.

These flags apply to every subcommand and may appear before or after the command name.

FlagDescription
--db <PATH>Database path. Env: QUAID_DB. Default: ./memory.db.
--model <ALIAS|HF_ID>Embedding model. Env: QUAID_MODEL. Default: small. Recognized aliases: small, base, large, m3. Any other value is treated as a Hugging Face model ID (online build only).
--jsonEmit JSON instead of human-readable text. Most commands honor this.
--help, -hPrint help. Works at root or per-command.
--version, -VPrint version and exit.

Create a new memory database. Records the active embedding model in quaid_config so subsequent opens validate against it.

Terminal window
quaid init ~/memory.db
quaid init ~/memory-large.db --model large # online build only

Read a page by slug. Slugs may be collection-qualified (<collection>::<slug>) when more than one collection is attached.

Terminal window
quaid get people/alice
quaid get research::people/alice

Write or update a page from stdin. For updates, supply --expected-version to enable optimistic concurrency (OCC). On a conflict the call fails and you must re-fetch before retrying.

Terminal window
cat updated.md | quaid put people/alice --expected-version 7
FlagTypeDefaultNotes
--expected-version <N>i64noneRequired for safe updates; absent means “create only”.

List pages with optional filters.

FlagTypeDefault
--wing <NAME>stringnone
--type <TYPE>stringnone
--limit <N>u3250

FTS5 full-text search. By default the input is sanitized so natural-language queries with ?, !, etc. work without escaping. Pass --raw to send the query verbatim and use FTS5 expert syntax (quoted phrases, boolean operators, prefix wildcards).

FlagTypeDefault
--wing <NAME>stringnone
--limit <N>u3210
--rawflagfalse
Terminal window
quaid search "river ai"
quaid search '"local-first" AND (sqlite OR fts5)' --raw

Hybrid retrieval: FTS5 + vector similarity, fused via set-union. Use --depth auto to enable progressive expansion — the engine grows the context window until the token budget is exhausted.

FlagTypeDefault
--depth <auto|''>stringauto
--limit <N>u3210
--token-budget <N>u324000
--wing <NAME>stringnone
Terminal window
quaid query "who is interested in offline-first knowledge systems?"

Single-file ingestion with SHA-256 idempotency. Re-running on the same file is a no-op unless --force is set.

FlagTypeDefault
--forceflagfalse

There is no import command. To bring in a markdown directory, attach it as a collection (quaid collection add <name> <path>, then quaid collection sync <name>); page types are inferred from a PARA-style folder layout (project(s)/, area(s)/, resource(s)/, archive(s)/) after stripping numeric prefixes such as 1-projects/.

Export every page to a markdown directory.

FlagTypeDefault
--rawflagfalse
--import-id <ID>stringnone

--raw writes byte-for-byte the original ingested content (preserves frontmatter ordering and whitespace); without it, the export is the canonicalized form.

Generate or refresh embeddings.

FlagTypeDefault
--allflagfalse
--staleflagfalse
--batch-size <N>usize32
Terminal window
quaid embed people/alice # one page
quaid embed --stale # only re-embed pages whose chunks changed
quaid embed --all # scan every page; skip current chunks
quaid embed --all --batch-size 16 # scan pages in smaller batches

Manage SLM-based conversation extraction.

Terminal window
quaid extraction enable # enable extraction and eagerly cache the configured model
quaid extraction disable # disable extraction; cached model files are kept
quaid extraction status # show extraction configuration and cache state

Re-enqueue manual extraction for one or more conversation sessions.

FlagTypeNotes
--allflagRe-extract every known session; conflicts with SESSION_ID
--since <DATE>YYYY-MM-DDRestrict --all to day-files dated on or after the date
--forceflagReset conversation cursors to turn 0 first; requires SESSION_ID

Manage cached local models.

Terminal window
quaid model pull <alias> # download an extraction SLM into the model cache
quaid model status [alias] # cache status; --verbose, --verify
quaid model clean [alias] # remove stale/invalid entries; --list, --all, --force

Create a typed temporal cross-reference. Both ends must exist as pages.

FlagTypeDefault
--relationship <NAME>stringrelated
--valid-from <DATE>ISO-8601none (open-start)
--valid-until <DATE>ISO-8601none (open-end)

Close an open temporal link interval by setting valid_until.

FlagType
--valid-until <DATE> (required)ISO-8601

List outbound links from a page, with link IDs.

FlagTypeDefault
--temporal <current|all>stringcurrent

Remove a cross-reference entirely. With --relationship, only that edge is removed.

FlagTypeDefault
--relationship <NAME>stringnone (remove all)

List inbound links to a page.

FlagTypeDefault
--temporal <current|all>stringcurrent

N-hop neighbourhood graph from a page (BFS over links, with temporal filtering).

FlagTypeDefault
--depth <N>u322
--temporal <current|all>stringcurrent

Manage tags. Both --add and --remove are repeatable.

Terminal window
quaid tags people/alice # list
quaid tags people/alice --add infra --add ops # add two tags
quaid tags people/alice --remove ops # remove one

Show timeline entries for a page.

FlagTypeDefault
--limit <N>u3220

Append a structured timeline entry. --date and --summary are required.

FlagTypeRequired
--date <DATE>ISO-8601yes
--summary <TEXT>stringyes
--source <REF>stringno
--detail <TEXT>stringno

Run contradiction detection on a single page or, with --all, every page. Heuristic; backed by the assertions table.

FlagType
--allflag
--type <TYPE>string

List unresolved knowledge gaps. By default only unresolved gaps are returned.

FlagTypeDefault
--limit <N>u3220
--resolvedflagfalse

Memory integrity checks. With no flags, all checks run.

FlagType
--allflag
--linksflag
--assertionsflag
--embeddingsflag

Checkpoint the SQLite WAL into a single file. Safe to run while no writers are active.

Memory statistics: page count, link count, gap count, active embedding model.

Terminal window
quaid stats
quaid stats --json

collection groups all vault-sync subcommands. See Manage collections for end-to-end guidance.

Terminal window
quaid collection add notes ~/Documents/Obsidian --writable
quaid collection list
quaid collection info notes
quaid collection sync notes
quaid collection ignore add notes "_attachments/**"
quaid collection quarantine list notes

Subcommands: add · list · info · sync · restore · restore-reset · reconcile-reset · ignore add|remove|list|clear · quarantine list|export|discard|restore.

Manage isolated memory scopes within the same database. Pages written with a namespace are invisible to queries that don’t specify it.

Terminal window
quaid namespace create project-alpha --ttl 720 # optional TTL in hours
quaid namespace list
quaid namespace destroy project-alpha # removes the namespace and all its pages

Read or write runtime config keys.

Terminal window
quaid config get default_token_budget
quaid config set default_token_budget 6000
quaid config reset default_token_budget

Subcommands: get <KEY> · set <KEY> <VALUE> · reset <KEY>.

See Configuration for the full key list.

Start the MCP stdio server. Connects any MCP client to this memory.

Terminal window
QUAID_DB=~/memory.db quaid serve

serve ships on macOS and Linux today; Windows parity is on the roadmap.

Flags (all require --http): --port <N> (default 3112) · --bind <ADDR> (loopback only in v1) · --token-file <PATH> · --trust-loopback.

daemon <run|install|uninstall|start|stop|restart|status|logs>

Section titled “daemon <run|install|uninstall|start|stop|restart|status|logs>”

Background-daemon lifecycle. install writes a platform-native service unit (launchd on macOS, systemd on Linux) pointing at the active database, then starts it; run runs the daemon in the foreground (this is what the service unit invokes). run and install accept the same HTTP/SSE flags as serve.

Terminal window
quaid daemon install # install + start the background daemon
quaid daemon install --http --port 3112 --trust-loopback
quaid daemon status
quaid daemon logs

Process-level status: whether the daemon is installed/running, active MCP transports, and recent runtime activity. Distinct from quaid stats, which reports content-level statistics.

FlagType
--jsonflag

Skills are agent-shaped markdown files embedded in the binary, extractable to ~/.quaid/skills/, and overridable from the working directory.

Terminal window
quaid skills list # show resolution order
quaid skills doctor # verify hashes; report shadowing

Subcommands: list · doctor.

Invoke a raw MCP tool from the CLI. Useful for debugging and for shell scripts.

Terminal window
quaid call memory_search '{"query":"alice","limit":3}'

JSONL streaming mode. Reads one JSON request object per line on stdin, writes one response per line on stdout. Designed for shell pipelines and lightweight harnesses.

Print the version and the memory’s schema-version state.

CodeMeaning
0Success
1General failure (validation, IO, business-rule violation)
2Argument or flag parsing error

When --json is set, errors are also emitted as a JSON object with an error field on stderr.