CLI Flags

Basic Usage

sgrep [FLAGS] <query> <paths...>

Flags

FlagDefaultDescription
--threshold0.5Minimum similarity score (0.0–1.0)
--top-k10Maximum results to show
--modelautoEmbedding model alias
--hybridoffEnable BM25 + semantic hybrid search
--alpha0.7Hybrid blend (0.0 = pure BM25, 1.0 = pure semantic)
--jsonoffJSON output for piping
--colorautoColor mode: auto, always, never
-e, --classifyZero-shot classification labels (comma-separated)
-C, --contextShow N lines of context before and after
-B, --before-contextShow N lines before each result
-A, --after-contextShow N lines after each result
--chunk-sizeLines per chunk (overrides —granularity)
--granularitylineChunking: line or paragraph
-r, --recursiveoffRecursive directory search
-l, --filenames-onlyoffShow filenames only
-c, --countoffCount matches per file
--no-scoreoffHide similarity scores
--no-filteroffDisable junk line filtering
--no-ignoreoffDisable .gitignore filtering
--hiddenoffInclude hidden files
--filesoffSearch file paths instead of contents
--verboseoffShow backend, model, and timing info

Was this page helpful?