Skip to content

Reference

Configuration

Environment variables, the `config` and `quaid_config` tables in memory.db, and the ~/.quaid/ filesystem layout.

Quaid reads mutable runtime defaults from three places, in order of precedence: command-line flags, environment variables, and the config table inside memory.db. Anything that fixes the database identity (most notably the embedding model and schema generation) is also recorded in the immutable quaid_config table at init time.

User-facing variables. Internal/test-only flags are intentionally omitted.

VariableUsed byDefaultNotes
QUAID_DBevery command~/.quaid/memory.dbPath to the memory database file.
QUAID_MODELevery commandsmallEmbedding model alias (small/base/large/m3) or any Hugging Face model ID. On the airgapped build, non-default values produce a warning and are ignored.
QUAID_CHANNELinstall scriptairgappedSelects which release channel the shell installer downloads. Set to online for the smaller binary that pulls model assets at first use.
QUAID_WATCH_DEBOUNCE_MSwatcher / vault sync1500Debounce window before the file watcher flushes a batch of changes. Higher values reduce churn during noisy edits.
QUAID_QUARANTINE_TTL_DAYSquarantine GC30Auto-discard threshold for clean quarantined pages with no remaining DB-only state.
QUAID_RAW_IMPORTS_KEEPraw-import GC10Per-page cap on retained raw_imports history rows.
QUAID_RAW_IMPORTS_TTL_DAYSraw-import GC90Time-to-live for inactive raw_imports rows.
QUAID_RAW_IMPORTS_KEEP_ALLraw-import GCunsetSet to 1 to disable raw-import GC entirely.
QUAID_FULL_HASH_AUDIT_DAYScollection audit7Interval after which the full-hash audit pass re-hashes a file.
QUAID_HF_BASE_URLonline-model fetchhttps://huggingface.coOverride the Hugging Face origin (e.g. for an internal mirror).
QUAID_MODEL_CACHE_DIRonline-model fetch~/.quaid/models/Cache directory for downloaded model weights.

The --db and --model CLI flags are global and override the corresponding env vars on a per-invocation basis.

Quaid owns one directory under your home folder:

~/.quaid/
├── skills/ # Skill overrides; run `quaid skills extract` to populate
│ ├── ingest/SKILL.md
│ ├── query/SKILL.md
│ └── …
└── models/ # Cached model weights (online build only)
└── BAAI__bge-base-en-v1.5/

Custom skills resolve in this order: working-directory SKILL.md~/.quaid/skills/<name>/SKILL.md → embedded default. Run quaid skills doctor to see what is shadowing what.

The runtime default memory path is ~/.quaid/memory.db. If Quaid cannot resolve a home directory, it falls back to memory.db in the current working directory. SQLite WAL sidecars (memory.db-wal, memory.db-shm) are created at runtime and folded back in by quaid compact.

The config table inside memory.db holds runtime defaults editable via quaid config:

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

Recognized keys (with seeded defaults):

KeyDefaultEffect
version10Schema version mirror, kept in sync with quaid_config.schema_version. Don’t edit by hand.
embedding_modelBAAI/bge-small-en-v1.5Mirror of the active model from quaid_config. Read-only; managed by init.
embedding_dimensions384Mirror of the active model’s vector width.
chunk_strategysectionHow pages are split before embedding.
search_merge_strategyset-unionHow FTS5 and vector results are fused.
default_token_budget4000Used by query --depth auto.
graph_depth0Hops walked during hybrid_search graph expansion (0 disables it). The --hops N CLI flag overrides this per-invocation.
graph_distance_decay0.5Multiplied per hop into expanded-candidate scores.
graph_expansion_max50Per-query cap on newly added graph candidates.
edge_weight_frontmatter1.0Default weight on derived frontmatter link rows.
edge_weight_entity_pattern0.7Reserved for the entity-pattern edge follow-on; not yet used as a links source.
edge_weight_wikilink0.5Default weight on derived wiki_link link rows.

quaid_config holds metadata that cannot change after init without rebuilding the database:

KeyExampleNotes
model_idBAAI/bge-small-en-v1.5Full Hugging Face model ID.
model_aliassmallThe alias passed to init.
embedding_dim384Vector width. Determines which page_embeddings_vec_* table is used.
schema_version10Validated on every open.

On open, quaid verifies the requested model matches the recorded one. A mismatch errors out before any command runs. To switch models, initialize a new memory and import into it.

FeatureEffect
embedded-model (default)Airgapped build. Embeds BGE-small (~180 MB) directly into the binary. Non-default model selection is a warning-only no-op.
online-modelSmaller binary (~90 MB). Downloads and caches the selected model on first semantic use.
Terminal window
# Default (airgapped)
cargo build --release
# Online build
cargo build --release --no-default-features --features bundled,online-model

See Airgapped vs online for guidance on which channel to use, and Embedding models for the design.