Install GitHub

Configuration

On this page

.greplm/config.toml is created by greplm init or on the first greplm index. It controls the walk and indexing:

include = []                       # glob whitelist (empty = all text files)
exclude = ["**/.git/**", "**/node_modules/**", "**/target/**", "**/.greplm/**"]
max_file_size = 4194304            # skip files larger than this (bytes); 0 = no limit
respect_gitignore = true
index_hidden = false
index_binary = false               # index NUL-containing (binary) files, like grep -a
index_empty = false                # index zero-byte files
backend = "auto"                   # auto | rayon (see note below)
merge_threshold = 16               # auto-compact once segments exceed this

backend selects the ingest read backend. Only the portable rayon backend exists today (a pool of buffered reads across worker threads), so auto and rayon are equivalent; the key is kept so config.toml stays forward-compatible if another backend is added. greplm status reports the backend actually in use.

A batched-submission backend (io_uring on Linux) was considered and dropped in 0.5.0: with a warm page cache, reads are ~5.6% of per-file indexing CPU against ~92% for tree-sitter parsing, and reads already overlap parsing across the worker pool. See the roadmap for the measurement.

A config.toml from before 0.5.0 may still say backend = "io-uring". That keeps working — it resolves to the portable backend and logs a warning — so nothing breaks; set it to "auto" to silence the warning.

Environment overrides

These GREPLM_* variables override the file for one-off runs (no need to edit config.toml):

VariableEffect
GREPLM_MAX_FILE_SIZEOverride max_file_size (bytes)
GREPLM_RESPECT_GITIGNORE1/true or 0/false
GREPLM_INDEX_HIDDEN1/true or 0/false
GREPLM_INDEX_BINARY1/true or 0/false
GREPLM_INDEX_EMPTY1/true or 0/false
GREPLM_LOGLog level (debug, info, warn, …)
GREPLM_NO_SAVINGS1 to disable token-savings recording
GREPLM_FRESHNESSMCP query freshness: strict for read-after-write (reindex before answering), else lazy (default)
GREPLM_SEMANTIC_MODELPath to a Model2Vec model directory (semantic search)
GREPLM_DAEMON_TIMEOUT_MSClient read timeout for daemon queries, in milliseconds (default 30000); on timeout the query falls back to in-process

The greplm index flags --index-binary, --index-empty, and --max-file-size set the corresponding env vars for that run.

Semantic search ranking (advanced)

Only relevant to greplm semantic-search, which requires a build with --features semantic. Semantic results fuse a BM25 retriever and an embedding retriever with weighted reciprocal-rank fusion; these knobs exist so the weights can be swept offline against a corpus. The defaults were chosen for robustness across dissimilar repositories, so you should not need to change them — they are documented because they exist, not because they are tuning advice.

VariableDefaultEffect
GREPLM_SEM_WBM251.0BM25 weight for natural-language queries
GREPLM_SEM_WEMB2.5Embedding weight for natural-language queries
GREPLM_SEM_WBM25_SYM1.0BM25 weight when the query looks like a symbol
GREPLM_SEM_WEMB_SYM0.35Embedding weight when the query looks like a symbol
GREPLM_SEM_PATHW0.012Rerank nudge for a query term matching the file path
GREPLM_SEM_NAMEW0.004Rerank nudge for a query term matching the symbol name
GREPLM_SEM_DEDUP_FILE1.0Above 0, keep only the best-scoring chunk per file