How can1357/jegrep works
jegrep is a live-tree semantic search CLI: a user asks a natural-language question, a selected exploration strategy discovers and ranks candidate paths, then the search judges file content and reports relevant line ranges. The main internal layers are the shared search context/tree, composable prompt builders, and the Jev HTTP client. Documented capabilities include multiple exploration strategies, lexical candidate rescue, secret withholding, calibrated scores, live progress, and JSON/compact/tree output. The excerpts establish the main dispatch and reporting flow; strategy-to-helper links are included only where documented or directly supported.
Main entry points: ctx.rs Search context · mod.rs Strategy selection · main.rs CLI entry · jev.rs Jev client
Components 21
CLI and output
- CLI entry
src/main.rs - Result reporting
src/report.rs - Progress UI
src/ui.rs
Search orchestration
- Search context
src/ctx.rs - Live search tree
src/tree.rs - Lexical scan
src/grep.rs
Exploration strategies
- Strategy selection
src/strategies/mod.rs - Cascade search
src/strategies/cascade.rs - Beam search
src/strategies/beam.rs - Deep search
src/strategies/deep.rs - Window search
src/strategies/window.rs - Other strategies
src/strategies
Judgment and safety
- Prompt builders
src/questions.rs - Secret screening
src/secrets.rs - Jev client
src/jev.rs
Runtime support
- Filesystem walker
src/walker/mod.rs - Scan cache
src/walker/cache.rs - Request pool
src/pool.rs - Provider configuration
src/env.rs
Other components
- Search user
- Jev providers
Connections 26
- Search user → CLI entry: asks query
README.md - CLI entry → Search context: creates context
src/main.rs - CLI entry → Strategy selection: selects strategy
src/strategies/mod.rs - Strategy selection → Cascade search: constructs
src/strategies/mod.rs - Strategy selection → Beam search: constructs
src/strategies/mod.rs - Strategy selection → Deep search: constructs
src/strategies/mod.rs - Strategy selection → Window search: constructs
src/strategies/mod.rs - Strategy selection → Other strategies: registers
src/strategies/mod.rs - CLI entry → Result reporting: prints results
src/main.rs - CLI entry → Progress UI: configures progress
src/main.rs - Search context → Live search tree: holds state
src/ctx.rs - Search context → Request pool: holds pool
src/ctx.rs - Cascade search → Search context: drives search
src/strategies/cascade.rs - Beam search → Search context: drives search
src/strategies/beam.rs - Deep search → Search context: drives search
src/strategies/deep.rs - Window search → Search context: drives search
src/strategies/window.rs - Other strategies → Search context: drives search
src/strategies/mod.rs - Strategy selection → Prompt builders: uses builders
src/strategies/mod.rs - Prompt builders → Secret screening: screens content
src/questions.rs - Request pool → Jev client: submits requests
- Jev client → Jev providers: sends judgments
README.md - Provider configuration → Jev client: configures providers
src/jev.rs - Lexical scan → Filesystem walker: discovers candidates
src/grep.rs - Filesystem walker → Scan cache: checks scan cache
src/walker/mod.rs - Result reporting → Search context: reads results
src/report.rs - Progress UI → Live search tree: renders exploration
src/ui.rs