CLI Flags
Basic Usage
sgrep [FLAGS] <query> <paths...>
Flags
| Flag | Default | Description |
|---|---|---|
--threshold | 0.5 | Minimum similarity score (0.0–1.0) |
--top-k | 10 | Maximum results to show |
--model | auto | Embedding model alias |
--hybrid | off | Enable BM25 + semantic hybrid search |
--alpha | 0.7 | Hybrid blend (0.0 = pure BM25, 1.0 = pure semantic) |
--json | off | JSON output for piping |
--color | auto | Color mode: auto, always, never |
-e, --classify | — | Zero-shot classification labels (comma-separated) |
-C, --context | — | Show N lines of context before and after |
-B, --before-context | — | Show N lines before each result |
-A, --after-context | — | Show N lines after each result |
--chunk-size | — | Lines per chunk (overrides —granularity) |
--granularity | line | Chunking: line or paragraph |
-r, --recursive | off | Recursive directory search |
-l, --filenames-only | off | Show filenames only |
-c, --count | off | Count matches per file |
--no-score | off | Hide similarity scores |
--no-filter | off | Disable junk line filtering |
--no-ignore | off | Disable .gitignore filtering |
--hidden | off | Include hidden files |
--files | off | Search file paths instead of contents |
--verbose | off | Show backend, model, and timing info |
Was this page helpful?