A high-performance, local code indexing engine designed for LLM coding agents. Flashgrep provides index-first text and structural search for fast repeated queries, deterministic outputs, and automation-friendly workflows.
If you just want to get running fast:
- Download the latest binary from the latest release (or build from source).
- Open your repository and initialize the local index:
flashgrep index- Start the indexer/watcher in the background so the index stays fresh:
flashgrep start -b- Configure your MCP client to launch Flashgrep over stdio:
{
"mcpServers": {
"flashgrep": {
"type": "local",
"command": ["flashgrep", "mcp-stdio"],
"enabled": true
}
}
}- Run the MCP init/bootstrap command from your client (any alias works):
bootstrap_skillflashgrep-initflashgrep_initfgrep-bootfgrep_boot
This injects policy/tool guidance for the session and prepares Flashgrep-first routing.
- Language Agnostic: Works with any programming language using regex-based heuristics
- Index-First Performance: Fast repeated queries after indexing, with incremental updates for changed files
- Resource Efficient: Built for low-overhead local operation on medium and large repositories
- Local Index, Optional Remote LLM: Core indexing/search stays local; optional neural reranking uses your configured provider API key
- Token Efficient: Returns exact code slices, not full files
- Single Binary CLI: Distributed as a single executable with local index data in
.flashgrep/ - MCP Compatible: JSON-RPC server for integration with coding agents
- Lexical Retrieval: Deterministic indexed search with smart/literal/regex query modes
- Optional Neural Navigation: Knowledge-graph-first natural-language navigation using bounded candidate context and provider-assisted reranking
- Neural-First Option: For discovery intents, you can run neural retrieval first with deterministic lexical fallback behavior
# Clone the repository
git clone https://github.com/nnlgsakib/flashgrep
cd flashgrep
# Build release binary
cargo build --release
# Install to PATH
cp target/release/flashgrep /usr/local/bin/Download pre-built binaries from the latest release (or browse all releases).
# Navigate to your project
cd /path/to/your/project
# Create initial index
flashgrep index
# Run fast indexed CLI search (grep-like)
flashgrep query "main" --limit 10
# Ask a natural-language question with ranked evidence
flashgrep ask "where is MCP query handled?" --retrieval-mode neural --include "src/**/*.rs" --limit 8
# Start watcher in background (optional)
flashgrep start -bIndex a repository for searching. If PATH is not provided, indexes the current directory.
# Index current directory
flashgrep index
# Index specific directory
flashgrep index /path/to/projectFeatures:
- Incremental indexing: Only re-indexes changed files
- Fast: Indexes 1,500+ files in under 3 seconds
- Smart filtering: Ignores
target/,node_modules/,.git/, etc. - Neural setup prompt: On first interactive index, prompts for:
- enable/disable neural navigation
- provider (
openrouter/openai/custom) - model
- base URL
- API key env var name
- API key (optional inline)
Start the daemon with file watcher and MCP server.
# Start daemon for current directory
flashgrep start
# Start with specific directory
flashgrep start /path/to/projectThe daemon:
- Watches files for changes and auto-updates index
- Runs MCP server on
localhost:7777 - Supports graceful shutdown (Ctrl+C)
Run indexed search with neural-first intent routing when enabled, with deterministic lexical fallback.
# Find top matches
flashgrep query "fn main" --limit 20
# Script-friendly JSON output
flashgrep query "TODO:" --output json
# Regex mode + path scope + context
flashgrep query "fn\\s+main" --mode regex --include "src/**/*.rs" --context 2
# Literal mode + case-insensitive
flashgrep query "a+b" --mode literal --ignore-case
# Force lexical retrieval
flashgrep query "find authentication middleware" --retrieval-mode lexical --limit 20
# Optional neural-assisted mode (must be enabled/configured)
flashgrep query "find code that sorts names" --retrieval-mode neural --limit 20
# Natural-language function lookup (neural mode)
flashgrep query "find this function \"tokenize\"" --retrieval-mode neural --limit 10
# Force lexical mode explicitly
flashgrep query "tokenize" --retrieval-mode lexical --limit 20Answer a natural-language question by retrieving likely code locations and printing a concise answer with evidence snippets.
# Natural-language code discovery (neural-first)
flashgrep ask "where is MCP query handled?" --retrieval-mode neural --include "src/**/*.rs" --limit 8
# Force lexical retrieval for deterministic exact-term discovery
flashgrep ask "where is McpServer defined" --retrieval-mode lexical --include "src/**/*.rs" --limit 8
# JSON output for automation
flashgrep ask "how is policy_denied returned" --output json --limit 6Ask behavior:
- Returns a short natural-language answer and ranked evidence snippets.
- Uses the same indexed retrieval engine as
query; no hallucinated files are invented. --retrieval-mode neuralprefers neural reranking when configured; falls back deterministically when unavailable.- Returns no-match with a clear hint when evidence is insufficient.
Neural query behavior:
- Uses knowledge-graph/index-first candidate retrieval, then provider-assisted reranking on bounded snippets.
- Recommended discovery order: neural first, then lexical fallback if neural is unavailable or returns no relevant matches.
- Returns
0 result(s)when no relevant intent match is found (instead of unrelated guesses). - If provider/API fails, falls back deterministically to lexical retrieval.
- No local model download step is required.
flashgrep index --forceWhen prompted, choose provider/model/base URL and set key inline or via env var.
OpenRouter:
# PowerShell
$env:OPENROUTER_API_KEY="your_key_here"
flashgrep query "find vector encoding logic" --retrieval-mode neural --limit 10OpenAI:
# PowerShell
$env:OPENAI_API_KEY="your_key_here"
flashgrep query "find auth middleware" --retrieval-mode neural --limit 10Flashgrep neural routing uses an OpenAI-compatible chat completions SDK/client path. Any provider with OpenAI-compatible endpoints can be configured via:
neural.provider.base_urlneural.provider.modelneural.provider.api_key_envorneural.provider.api_key
Default profile:
- provider:
openrouter - base_url:
https://openrouter.ai/api/v1 - model:
arcee-ai/trinity-large-preview:free - api_key_env:
OPENROUTER_API_KEY
You can switch to any free/low-cost OpenAI-compatible provider by changing provider/model/base URL and key settings.
List indexed files quickly (glob-like exploration without filesystem scans).
# List indexed files
flashgrep files --limit 100
# Filter file paths
flashgrep files --filter mcp --output json
# Glob-style filtering with deterministic sorting
flashgrep files --pattern "src/**/*.rs" --exclude "**/target/**" --sort-by path --sort-order asc
# Stable pagination window
flashgrep files --pattern "**/*" --offset 200 --limit 100Run filesystem operations with deterministic behavior for automation scripts.
# Create file and directory
flashgrep fs create notes/todo.txt --parents
flashgrep fs create build/output --dir --parents
# List and stat with machine-readable JSON
flashgrep fs list src --sort-by path --sort-order asc --offset 0 --limit 50 --output json
flashgrep fs stat src/main.rs --output json
# Copy/move/remove with safety controls
flashgrep fs copy src/main.rs backup/main.rs --overwrite
flashgrep fs move backup/main.rs archive/main.rs --dry-run
flashgrep fs remove archive --recursive --forceFind symbol entries from indexed metadata.
flashgrep symbol McpServer --limit 10
flashgrep symbol main --output jsonExtract an exact code range from a file.
flashgrep slice src/mcp/mod.rs 1 60
flashgrep slice src/search/mod.rs 35 70 --output jsonShow active background watcher processes.
flashgrep watchersFlashgrep is designed to replace repeated grep + filesystem glob workflows with deterministic, index-aware operations.
grep "TODO:" -R src->flashgrep query "TODO:" --include "src/**/*.rs" --limit 200grep -i "auth" -R .->flashgrep query "auth" --ignore-case --limit 200grep -E "fn\s+main" -R src->flashgrep query "fn\\s+main" --mode regex --include "src/**/*.rs"grep -F "a+b" -R src->flashgrep query "a+b" --mode literal --include "src/**/*"grep -n -C 2 "panic" src/main.rs->flashgrep query "panic" --include "src/main.rs" --context 2
glob("src/**/*.rs")->flashgrep files --pattern "src/**/*.rs" --sort-by path --sort-order ascglob + exclude build dirs->flashgrep files --pattern "**/*" --exclude "**/target/**" --exclude "**/node_modules/**"glob with extension filter->flashgrep files --pattern "**/*" --ext rs --ext tomlglob pagination/window->flashgrep files --pattern "**/*" --sort-by path --offset 200 --limit 200
- Deterministic output: use explicit
--sort-by,--sort-order,--offset,--limit. - Bounded responses: always set
--limitfor scripts/agents. - Fresh index: run
flashgrep indexfirst; run watcher (flashgrep start -b) for incremental freshness. - Validation errors: invalid parameter combinations return structured errors (CLI config error or MCP
invalid_params). - Large MCP reads/writes: prefer chunked workflows and continuation fields over single oversized payloads.
- Missing paths: path-aware MCP tools return typed not-found diagnostics with
error=not_found,reason_code,target_kind, andtarget_path. - Cross-platform behavior: path filters normalize
/and\separators for deterministic include/exclude matching. - Filesystem safety: mutating
flashgrep fsoperations support--dry-run, and overwrite/delete paths require explicit flags.
Use stdio transport for MCP clients that launch local tools as child processes.
- Build and install
flashgrep. - Index the repository you want to search:
flashgrep index. - Configure your MCP client with the Flashgrep server entry.
- Start your client and verify Flashgrep tools are available (
ask,query,glob,get_slice,read_code,write_code,batch_write_code,fs_create,fs_read,fs_write,fs_list,fs_stat,fs_copy,fs_move,fs_remove,get_symbol,list_files,stats,bootstrap_skill,flashgrep-init,fgrep-boot). - Bootstrap is injected automatically during
initializeusing embedded policy guidance. - Optionally call
bootstrap_skill(or alias) to inspect/refresh session policy metadata.
Example MCP config:
{
"mcpServers": {
"flashgrep": {
"type": "local",
"command": ["flashgrep", "mcp-stdio"],
"enabled": true,
"environment": {
"RUST_LOG": "info"
}
}
}
}Notes:
RUST_LOG=infois optional and mainly useful for troubleshooting.- If your client cannot connect, run
flashgrep indexagain and verifyflashgrep statsworks in the same repository. - For policy routing/debug issues, see
docs/bootstrap-policy-troubleshooting.md.
Bootstrap example (tools/call):
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "flashgrep_init",
"arguments": {
"compact": true
}
},
"id": 100
}Bootstrap behavior:
- First call returns
status: injected - Repeated call in same server session returns
status: already_injected - Embedded payload is default (
payload_source: embedded) and does not require local skill files - Optional repository override is opt-in (
allow_repo_override: true) and falls back deterministically when unreadable - Policy guidance in response recommends Flashgrep-first tools (
query,glob,files,symbol,read_code,write_code,batch_write_code) over generic grep/glob fallbacks - Search routing defaults to neural-first discovery when enabled, with deterministic lexical fallback when neural routing is unavailable or non-relevant
- AI controls are explicit per request (
ai_mode,retrieval_mode,budget_profile,prompt_version) - Query payloads expose prompt governance fields (
prompt_id,prompt_version,prompt_hash,policy_rule_hits) - Query payloads expose budget telemetry fields (
budget_total,tokens_used,reduction_applied,continuation_id)
Bootstrap policy metadata:
policy_metadata.policy_strength: enforcement mode (default:strict)policy_metadata.enforcement_mode: strict policy mode for clientspolicy_metadata.payload_source: payload origin (embeddedorrepo_override)policy_metadata.bootstrap_state: current session state (injectedoralready_injected)policy_metadata.preferred_tool_families: explicit native Flashgrep routing familiespolicy_metadata.preferred_tools: Flashgrep-first tool routing groupspolicy_metadata.search_routing: neural-first search order and fallback reason contractspolicy_metadata.fallback_rules: allowed fallback gates with typedreason_codepolicy_metadata.compliance_checks: client-side compliance expectationspolicy_metadata.prohibited_native_tools: native/host tools to avoid unless fallback gate is active
Fallback gate defaults:
neural_mode_disabledneural_provider_failureneural_no_relevant_matchesexact_match_requiredquery_parse_constraintsflashgrep_index_unavailableflashgrep_operation_not_supportedflashgrep_tool_runtime_failurerepo_override_unavailable
Policy enforcement response for ungated fallback routes:
{
"ok": false,
"error": "policy_denied",
"reason_code": "fallback_gate_required",
"recovery_hint": "Provide fallback_reason_code and fallback_gate, or route via native Flashgrep tools"
}Native-tool routing expectations:
- Agents should avoid host-native
Read/Write/Glob/Grepand shellgrep/cat/ad-hoc globbing unless a declared fallback gate is active. - Preferred Flashgrep routes remain
query,files/glob,symbol/get_symbol,read_code,write_code,batch_write_code. - Fallback tooling (
search,search-in-directory,search-with-context,search-by-regex) requires explicitfallback_gateandfallback_reason_code.
AI governance and budget metadata on query responses:
- Route fields:
route_state,reason_code,fallback_gate_id,ai_scope,budget_profile. - Prompt fields:
prompt_governance.prompt_id,prompt_governance.prompt_version,prompt_governance.prompt_hash,prompt_governance.policy_rule_hits. - Budget fields:
prompt_budget.budget_total,prompt_budget.tokens_used,prompt_budget.reduction_applied,prompt_budget.continuation_id.
Compatibility and rollback notes:
- Legacy bootstrap fields (
status,canonical_trigger,skill_hash,skill_version,policy) remain available. - If a client cannot consume strict metadata, continue reading legacy fields while treating
policy_metadataas additive.
Flashgrep provides skill documentation that can be used by any coding agent:
- Primary runtime source: embedded
skills/SKILL.mdpayload compiled into the binary - Canonical editable source:
skills/SKILL.md - Optional OpenCode-managed path:
.opencode/skills/flashgrep-mcp/SKILL.md
skills/SKILL.md now uses a compact structured directive language (DSL) to reduce token usage while preserving the same policy behavior.
Example structured directives:
TASK edit_file
FILE src/auth.rs
FIND fn login
REPLACE add rate_limit check
Use skills/SKILL.md as the canonical authoring source. Runtime bootstrap guidance is embedded at build time, so missing local skill files do not block injection.
The MCP server exposes JSON-RPC methods for coding agents. See MCP Setup (Stdio) and Skill Files for setup and discovery guidance.
Available Methods:
Bootstrap Flashgrep skill guidance into the current MCP session.
Accepted trigger aliases: bootstrap_skill, flashgrep-init, flashgrep_init, fgrep-boot, fgrep_boot.
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "bootstrap_skill",
"arguments": {
"trigger": "flashgrep-init",
"compact": true
}
},
"id": 0
}Advanced glob file discovery with composable filters and deterministic sorting.
Supported options include:
pattern,pathinclude,excludeextensionsmax_depth,recursive,include_hidden,follow_symlinkscase_sensitivesort_by(path|name|modified|size),sort_order(asc|desc)limit
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "glob",
"arguments": {
"path": "src",
"pattern": "**/*.rs",
"exclude": ["**/target/**", "**/.git/**"],
"extensions": [".rs"],
"max_depth": 4,
"sort_by": "name",
"sort_order": "asc",
"limit": 200
}
},
"id": 8
}If the provided root path does not exist, glob returns typed not-found diagnostics:
{
"error": "not_found",
"reason_code": "directory_not_found",
"target_kind": "directory",
"target_path": "..."
}MCP filesystem lifecycle tools for deterministic automation-safe operations.
- Mutations (
fs_write,fs_copy,fs_move,fs_remove) supportdry_run. - Conflict-sensitive operations support
overwrite. - Directory removal supports
recursiveandforce. - List/stat responses include stable metadata fields (
path,file_type,size,modified_unix,readonly). - Missing paths use typed not-found diagnostics (
file_not_found,directory_not_found,path_not_found).
Search for text in the indexed codebase.
{
"jsonrpc": "2.0",
"method": "query",
"params": {
"text": "function main",
"limit": 10
},
"id": 1
}Natural-language, neural-first codebase Q&A with deterministic lexical fallback.
{
"jsonrpc": "2.0",
"method": "ask",
"params": {
"question": "where is rpc query handled?",
"retrieval_mode": "neural",
"include": ["src/**/*.rs"],
"limit": 8
},
"id": 11
}Response includes:
question,answer, andevidencesnippetsroute_state+ typed reason metadata- prompt governance + budget telemetry fields (
prompt_hash,policy_rule_hits,tokens_used,reduction_applied)
Retrieve specific lines from a file.
{
"jsonrpc": "2.0",
"method": "get_slice",
"params": {
"file_path": "src/main.rs",
"start_line": 1,
"end_line": 50
},
"id": 2
}Token-efficient code read for agent workflows. Supports two mutually exclusive modes:
- Slice mode:
file_path(+ optionalstart_line,end_line,continuation_start_line) - Symbol mode:
symbol_name(+ optionalsymbol_context_lines)
Optional budgets: max_lines, max_bytes, max_tokens.
Optional metadata profile: metadata_level (minimal or standard).
{
"jsonrpc": "2.0",
"method": "read_code",
"params": {
"file_path": "src/mcp/stdio.rs",
"start_line": 1,
"max_lines": 80,
"metadata_level": "minimal"
},
"id": 6
}Response includes deterministic truncation markers and continuation:
truncated: whether output was cut by limitscontinuation_start_line: next line to continue fromapplied_limits: consumed + configured budgets
Large-IO safety notes:
- Flashgrep enforces MCP payload safety caps to prevent transport disconnects.
- If a request or response is too large, tools return structured
invalid_paramsorpayload_too_largeerrors. - For large files, use chunked reads (
max_lines,max_bytes,continuation_start_line). - For full retrieval, loop until
continuation.completed=true(orcontinuation_start_lineis null).
Minimal-diff write that replaces only a target line range. Supports optional optimistic preconditions:
expected_file_hashexpected_start_line_textexpected_end_line_text
On mismatch, returns structured conflict details with ok: false and error: precondition_failed.
Large-IO safety notes:
- Oversized replacements are rejected with structured
payload_too_largemetadata. - Retry with smaller replacement chunks to keep the MCP session stable.
- For very large writes, use continuation fields:
continuation_id,chunk_index, andis_final_chunk.
{
"jsonrpc": "2.0",
"method": "write_code",
"params": {
"file_path": "src/example.rs",
"start_line": 10,
"end_line": 12,
"replacement": "updated text",
"precondition": {
"expected_start_line_text": "old text"
}
},
"id": 7
}Apply deterministic ordered line-range edits in a single request. Supports two explicit modes:
atomic: all edits succeed or all edits are rolled backbest_effort: valid edits apply while failed/conflicting edits are reported
Each operation requires: id, file_path, start_line, end_line, replacement.
Optional per-op preconditions are supported (expected_file_hash, line text guards).
{
"jsonrpc": "2.0",
"method": "batch_write_code",
"params": {
"mode": "atomic",
"operations": [
{
"id": "op1",
"file_path": "src/example.rs",
"start_line": 10,
"end_line": 10,
"replacement": "let x = 42;"
}
]
},
"id": 8
}Response includes per-operation status (applied|failed|conflict|skipped),
typed reason_code, and summary counters.
Find all occurrences of a symbol.
{
"jsonrpc": "2.0",
"method": "get_symbol",
"params": {
"symbol_name": "main"
},
"id": 3
}List all indexed files.
{
"jsonrpc": "2.0",
"method": "list_files",
"params": {},
"id": 4
}Get index statistics.
{
"jsonrpc": "2.0",
"method": "stats",
"params": {},
"id": 5
}Create a .flashgrepignore file in your project root to exclude files/directories from indexing. Uses gitignore-style patterns:
# Ignore all log files
*.log
# Ignore build directories
build/
dist/
# Ignore specific files
config.local.json
# Re-include specific files
!important.log
The config is stored in .flashgrep/config.json:
{
"version": "0.1.0",
"mcp_port": 7777,
"use_unix_socket": false,
"socket_path": ".flashgrep/mcp.sock",
"max_file_size": 2097152,
"max_chunk_lines": 300,
"extensions": ["rs", "js", "ts", "py", "go", "json", "md", "yaml", "toml"],
"ignored_dirs": [".git", "node_modules", "target", "dist", "build", "vendor"],
"debounce_ms": 500,
"enable_initial_index": true,
"progress_interval": 1000,
"index_state_path": "index-state.json",
"neural": {
"enabled": false,
"initialized": false,
"provider": {
"provider": "openrouter",
"base_url": "https://openrouter.ai/api/v1",
"model": "arcee-ai/trinity-large-preview:free",
"api_key_env": "OPENROUTER_API_KEY",
"api_key": null,
"timeout_ms": 5000,
"max_candidates": 24
}
}
}Neural mode efficiency rules:
- candidate retrieval stays local knowledge-graph/index-first
- provider calls receive bounded snippet context only
- lexical fallback remains deterministic on provider failures/timeouts
Neural config field notes:
neural.enabled: enable neural retrieval pathneural.initialized: whether setup prompt has already been completedneural.provider.provider: provider id (openrouter,openai, or custom)neural.provider.base_url: OpenAI-compatible API base URL (for OpenRouter usehttps://openrouter.ai/api/v1)neural.provider.model: chat model idneural.provider.api_key_env: env var name for key resolutionneural.provider.api_key: optional inline key in config (use carefully)neural.provider.timeout_ms: provider request timeoutneural.provider.max_candidates: cap on candidate snippets sent for reranking
- File Scanner: Recursively finds indexable files, respects
.flashgrepignore - Chunker: Splits files into logical chunks (max 300 lines, preserves bracket balance)
- Symbol Detector: Regex-based detection of functions, classes, imports, etc.
- Knowledge Graph Builder: Builds file/chunk/symbol relationship artifacts for neural candidate routing
- Tantivy Index: Full-text search engine with custom ranking
- SQLite Store: Metadata storage with connection pooling and batch inserts
- File Watcher: Incremental re-indexing with debouncing
- MCP Server: JSON-RPC over TCP for agent integration
Flashgrep is often faster than traditional grep/glob workflows for active development sessions because it is index-first:
- One-time indexing, many fast reads: Flashgrep scans/chunks once, then serves queries from Tantivy + SQLite metadata.
- No full tree scan per query: traditional grep often re-walks directories and re-reads files every run.
- Structured metadata paths: symbol lookup and file listing use indexed tables instead of regex over raw files.
- Watcher-assisted freshness: background watcher updates changed files incrementally, avoiding full rebuilds.
- Deterministic bounded output: command limits are enforced before render for stable, script-friendly responses.
Use grep for tiny one-off folders or ad-hoc exact scans; use Flashgrep when you run many searches per session and want index-backed speed, structure, and deterministic pagination.
- Scanner discovers indexable files and applies ignore rules.
- Chunker splits files into bounded line ranges and computes content hashes.
- Symbol Detector extracts structural entries (function/class/import/etc.).
- Knowledge Graph Builder creates relationship artifacts used for neural candidate expansion.
- Tantivy stores searchable text chunks and ranking fields.
- SQLite stores files/chunks/symbol/graph metadata for lookup/list/stat operations.
- CLI/MCP layers query these stores in read mode and render text/JSON outputs.
.flashgrep/
├── text_index/ # Tantivy full-text index
├── metadata.db # SQLite database (chunks, symbols, file metadata)
├── config.json # Configuration
└── vectors/ # Runtime neural/graph auxiliary artifacts
Example measurements on a typical codebase (1,576 files, ~50k lines). Actual numbers vary by hardware, storage, and repository shape:
- Initial indexing: ~2.6 seconds
- Incremental indexing: ~0.35 seconds (only changed files)
- Query response: <50ms
- Memory usage: ~150MB
- Index size: ~50MB
- Rust (
.rs) - JavaScript/TypeScript (
.js,.ts) - Python (
.py) - Go (
.go) - Solidity (
.sol) - JSON (
.json) - Markdown (
.md) - YAML (
.yaml,.yml) - TOML (
.toml)
.gitnode_modulestargetdistbuildvendor.flashgrep
# Debug build
cargo build
# Release build (optimized)
cargo build --release
# Run tests
cargo test
# Run with logging
RUST_LOG=info cargo run -- indexBefore release, verify docs match shipped CLI/MCP behavior:
# Ensure grep/glob replacement guidance exists
rg "Grep/Glob Replacement Guide" README.md
# Ensure query parity options are documented
rg "--mode regex|--mode literal|--ignore-case|--context" README.md
# Ensure structured skill directives exist and reference primary routes
rg "FORMAT|TOOL_ORDER|WORKFLOW|query|glob|read_code|write_code" skills/SKILL.mdUse these pass/fail checks before release:
flashgrep statsreturns non-zero indexed file/chunk counts for the target repo.flashgrep querywith parity flags (--mode,--include/--exclude,--context,--limit) returns deterministic output shape and no parameter errors.flashgrep fileswith deterministic windowing (--sort-by path --sort-order asc --offset --limit) returns stable pagination windows.- MCP
query/globcalls return structured payloads; invalid combinations returninvalid_params.
src/
├── main.rs # Entry point
├── lib.rs # Library root
├── cli/ # Command-line interface
├── config/ # Configuration management
├── db/ # SQLite database layer
├── index/ # File scanning and indexing
├── chunking/ # File chunking logic
├── symbols/ # Symbol detection
├── search/ # Search engine
├── watcher/ # File system watcher
└── mcp/ # MCP server
Use the release build:
cargo build --release
./target/release/flashgrep indexReduce cache size in config.json:
{
"max_file_size": 1048576
}Delete the index and re-index:
rm -rf .flashgrep
flashgrep indexApache License 2.0 - See LICENSE file for details
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
- Plugin-based language parsers
- Team shared index
- Visual graph UI
- Call graph engine
- Refactor impact analysis