# AI use cases for Jevgrep (nassim-arifette/jevgrep)

Repo: [nassim-arifette/jevgrep](https://github.com/nassim-arifette/jevgrep) | Use cases: 4 | Page: https://dedupedai.com/use-cases/nassim-arifette-jevgrep/

JevGrep is a TypeScript tool that finds code by behavior, sending eligible source fragments to a configured AI provider for scoring and returning exact excerpts with paths and line numbers, via a CLI or a local MCP server.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Find where a behavior lives in an unfamiliar repo: https://dedupedai.com/use-cases/nassim-arifette-jevgrep/find-behavior-in-unfamiliar-repo/
- Give Claude Code or Codex a semantic search tool: https://dedupedai.com/use-cases/nassim-arifette-jevgrep/give-coding-agent-semantic-search-tool/
- Review what leaves the machine before a first search: https://dedupedai.com/use-cases/nassim-arifette-jevgrep/review-what-gets-sent-before-searching/
- Run scoped searches that return JSON for scripts: https://dedupedai.com/use-cases/nassim-arifette-jevgrep/scoped-json-search-for-automation/

## How to find where a behavior lives in an unfamiliar repo with Jevgrep

Repo: [nassim-arifette/jevgrep](https://github.com/nassim-arifette/jevgrep) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Ask a plain question about behavior and get exact code excerpts with line numbers.

**Who it is for:** A developer who has been asked to change a feature in a codebase they do not know and does not know the file or function names.

**The problem:** Keyword search needs an exact identifier, and reading many files to guess where logic lives costs time and context.

**The outcome:** A ranked set of original source excerpts with paths and line numbers that point to the code handling the behavior.

### Steps

1. Run `npm install -g @nassim-arifette/jevgrep`
2. Run `jevgrep init --global`
3. Run `cd path/to/my-project` and then `jevgrep init`, answering `y` only after you have reviewed the scope
4. Run `jevgrep inspect` to confirm which files are eligible and what is excluded
5. Run `jevgrep search --query "Where is session expiry handled?"`

### Prompt to paste into your agent

```text
Using the JevGrep CLI in the repository at <repo path>, run `jevgrep search --query "<behavior question>"` and list each returned excerpt with its path and line range. Verify that the result reports complete coverage before treating an empty or short result as meaningful.
```

### Caveat

Eligible source fragments are sent to the configured provider, and the search is not a substitute for exact tools such as rg when you already know the symbol.

Risk, credentials: The provider key is stored globally for the OS user, so do not place it in a repository or in shared configuration files.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nassim-arifette-jevgrep/find-behavior-in-unfamiliar-repo/

## How to give Claude Code or Codex a semantic search tool with Jevgrep

Repo: [nassim-arifette/jevgrep](https://github.com/nassim-arifette/jevgrep) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Connect an agent to one authorized repository through the semantic_search_code MCP tool.

**Who it is for:** A developer using Claude Code or Codex who wants the agent to locate relevant code without loading broad exploration into its main context.

**The problem:** Agents waste context on repeated file listing and reading when they do not know where a behavior is implemented.

**The outcome:** The agent calls semantic_search_code against one authorized repository and reads only the returned excerpts it needs.

### Steps

1. Run `npm install -g @nassim-arifette/jevgrep`
2. Run `jevgrep init --global` and then, inside the repository, run `jevgrep init`
3. Copy the absolute profile path printed by `jevgrep init`
4. Run `claude mcp add --transport stdio jevgrep -- jevgrep mcp --config "/absolute/path/to/config.json"` for Claude Code, replacing the example path with the profile path
5. For Codex, add the `[mcp_servers.jevgrep]` entry from the README to `config.toml` with the same profile path, then run `claude mcp get jevgrep` or check `/mcp` in Claude Code to confirm the server is listed

### Prompt to paste into your agent

```text
Confirm that the jevgrep MCP server for the repository at <repo path> lists the semantic_search_code tool, then call it with the question "<behavior question>" and report the returned excerpts with their paths and line numbers. Verify that the tool call completes and that any partial or incomplete coverage is stated in your report.
```

### Caveat

The README says these client examples have not yet been qualified with real Codex and Claude Code sessions, so confirm the tool appears and a search completes before relying on it.

Risk, credentials: Do not commit provider keys in MCP configuration, and remember that stored credentials are available to any client running as the same OS user.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nassim-arifette-jevgrep/give-coding-agent-semantic-search-tool/

## How to review what leaves the machine before a first search with Jevgrep

Repo: [nassim-arifette/jevgrep](https://github.com/nassim-arifette/jevgrep) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Check the eligible scope, limits and provider setup without any network request.

**Who it is for:** A security-minded developer or team lead who must approve sending source code from a repository to an external AI provider.

**The problem:** Without a clear review, it is unclear which files and fragments would be disclosed to a remote provider and how much work a search would do.

**The outcome:** A written review of eligible files, excluded files, search cost and provider settings that can be approved before the first live search.

### Steps

1. Run `npm install -g @nassim-arifette/jevgrep`
2. Run `jevgrep init --global` and then `jevgrep init` from the repository root, leaving remote evaluation disabled if approval is pending
3. Run `jevgrep doctor` to check the provider, credential state, authorized root, limits and cache without a network request
4. Run `jevgrep inspect` to list eligible files, fragments and exclusions
5. Add repository-specific exclusions to `.jevgrepignore` where needed, then run `jevgrep inspect` again

### Prompt to paste into your agent

```text
In the repository at <repo path>, run `jevgrep doctor` and `jevgrep inspect` and summarize the eligible file count, the exclusions and the provider in use. Verify that no search command has been run and that remote evaluation is disabled until a person approves it.
```

### Caveat

The README notes that credential filters cannot detect every secret, so the inspect review does not guarantee that no sensitive content is eligible.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nassim-arifette-jevgrep/review-what-gets-sent-before-searching/

## How to run scoped searches that return JSON for scripts with Jevgrep

Repo: [nassim-arifette/jevgrep](https://github.com/nassim-arifette/jevgrep) | Difficulty: Advanced | Time: 30 minutes | Basis: From the README

Limit a search to chosen folders and read a validated JSON result with exit codes.

**Who it is for:** A developer or CI-minded engineer who wants a script or pipeline to run a behavior search over selected directories and act on the result.

**The problem:** Pipelines need machine-readable output and a reliable way to tell a complete result from a partial one.

**The outcome:** A validated JSON response limited to the chosen directories, with coverage information and an exit code that shows whether the result is complete.

### Steps

1. Run `npm install -g @nassim-arifette/jevgrep` and complete `jevgrep init --global` and `jevgrep init` for the repository
2. Run `jevgrep inspect` to confirm the eligible scope
3. Run `jevgrep search --query "How are permissions checked?" --scope src --scope tests --json` (inferred, check the README)
4. Read the exit code: `0` means complete, `3` means partial, and `2` or `4` mean a problem to handle
5. Only add `--allow-partial` if a partial deterministic scan is acceptable for your workflow

### Prompt to paste into your agent

```text
Run `jevgrep search --query "<behavior question>" --scope <folder> --json` in the repository at <repo path> and parse the JSON output. Verify that you check the exit code and report whether the result is complete or partial before drawing any conclusion.
```

### Caveat

Results are scored by a remote provider, so a complete JSON result still depends on that provider's scoring and an empty result is not proof that code does not exist.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nassim-arifette-jevgrep/scoped-json-search-for-automation/
