# AI use cases for Benzi (oooscoos/Benzi)

Repo: [oooscoos/Benzi](https://github.com/oooscoos/Benzi) | Use cases: 4 | Page: https://dedupedai.com/use-cases/oooscoos-benzi/

Benzi is a compiler that parses a codebase into a queryable map of calls, data flow, control flow and class hierarchy, which coding agents then use to read, explain, run, edit and verify code.

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

- Answer questions about a repo inside Claude Code: https://dedupedai.com/use-cases/oooscoos-benzi/explain-repo-in-claude-code/
- Trace a wrong value back to where it came from: https://dedupedai.com/use-cases/oooscoos-benzi/trace-bad-value-to-origin/
- Run a headless Benzi fix on a failing test: https://dedupedai.com/use-cases/oooscoos-benzi/headless-fix-in-ci/
- Build a new app from scratch in one VS Code session: https://dedupedai.com/use-cases/oooscoos-benzi/build-app-in-vs-code-session/

## How to answer questions about a repo inside Claude Code with Benzi

Repo: [oooscoos/Benzi](https://github.com/oooscoos/Benzi) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Give Claude Code a compiled map of your repo so it answers callers, hierarchy and definition questions from the index.

**Who it is for:** A developer who has just joined or inherited a codebase and uses Claude Code or Cursor daily, and needs accurate answers about who calls what.

**The problem:** Grep and glob return text matches, so the agent guesses at which function, caller or subclass really matters.

**The outcome:** The agent answers structural questions by querying the compiled index through Benzi tools such as get_callers, get_hierarchy and get_definition.

### Steps

1. Run `pip install benzi`.
2. Run `benzi-login --login you@example.com`, then type the one-time code emailed to you.
3. Run `claude mcp add --scope user benzi -- benzi-mcp` to register the server with Claude Code.
4. Open Claude Code in your repo folder and ask it who calls a function you name, for example which call sites reach a given function.

### Prompt to paste into your agent

```text
Using the Benzi MCP tools on the repo at <repo path>, list every call site that reaches the function <function name> and the resolved base classes of <class name>. Expected output: a list of caller locations and a hierarchy list. Verify that each listed location exists in the file it names.
```

### Caveat

The MCP server gives the map only, so answer quality depends on the agent you use, and the agent features such as the runtime tracer are not included.

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/oooscoos-benzi/explain-repo-in-claude-code/

## How to trace a wrong value back to where it came from with Benzi

Repo: [oooscoos/Benzi](https://github.com/oooscoos/Benzi) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Use Benzi's backflow and trace_path tools to find the origin of a bad value without opening every caller.

**Who it is for:** A developer debugging a failing test or wrong output in a Python project who needs to know which path delivered the bad value.

**The problem:** Tracing a wrong value by hand means opening every caller and following arguments through several files.

**The outcome:** The headless agent reports where the bad value originated and the call chain that carried it, with the runtime evidence it gathered.

### Steps

1. Run `pip install benzi`.
2. Run `benzi-login --login you@example.com`, then type the one-time code emailed to you.
3. Run `benzi-login --model deepseek`.
4. Run `benzi-login --nonanthropic-key YOUR_KEY` with your own key, or use `benzi-login --anthropic-key YOUR_KEY` for Claude models.
5. Run `benzi-headless . "find where the wrong value in <symptom> comes from"` from the repo root. (inferred, check the README)

### Prompt to paste into your agent

```text
In the repo at <repo path>, use Benzi to trace where the wrong value in <symptom or variable name> originates. Expected output: the origin file and line plus the call chain that carried the value. Verify the origin by checking that the cited line produces the value when the repro runs.
```

### Caveat

The runtime tracer is temporarily broken as of October 14, 2026, and misses calls inside comprehensions, lambdas and generator expressions, so some traces may be incomplete.

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/oooscoos-benzi/trace-bad-value-to-origin/

## How to run a headless Benzi fix on a failing test with Benzi

Repo: [oooscoos/Benzi](https://github.com/oooscoos/Benzi) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Run benzi-headless from a terminal or CI job to attempt a fix, with syntax-checked edits and one-step rollback.

**Who it is for:** A developer or DevOps engineer who wants an agent to attempt a fix from a script or CI pipeline when a test fails.

**The problem:** Failing tests in scripts and CI need a triage pass, and manual triage takes time away from other work.

**The outcome:** Benzi attempts the fix on the repo, every write is syntax-checked and rolled back if it breaks the code, and you review the resulting changes.

### Steps

1. Run `pip install benzi`.
2. Run `benzi-login --login you@example.com`, then type the one-time code emailed to you.
3. Run `benzi-login --model deepseek` and `benzi-login --nonanthropic-key YOUR_KEY`.
4. Run `benzi-headless . "fix the failing test in parser.py"` from the repo root.
5. Review the diff and run your test suite yourself before merging.

### Prompt to paste into your agent

```text
Run `benzi-headless . "fix the failing test in <test file>"` in the repo at <repo path>. Expected output: edited files plus a summary of the change. Verify by running the test suite and confirming the target test passes and no other test newly fails.
```

### Caveat

The README measures Benzi's coding results on SWE-bench Verified with DeepSeek V4.1-Flash, but it does not promise a fix for any specific test, so always review the diff.

Risk, credentials: The headless setup stores your model API key in the benzi-login config, so keep that config out of shared repos and CI logs.

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/oooscoos-benzi/headless-fix-in-ci/

## How to build a new app from scratch in one VS Code session with Benzi

Repo: [oooscoos/Benzi](https://github.com/oooscoos/Benzi) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Use the Benzi VS Code extension to greenfield a project through a single chat session.

**Who it is for:** A developer or founder who wants a working multi-file app built by an agent from a plain-language brief.

**The problem:** Starting a new project from an empty folder takes days of scaffolding before any real feature exists.

**The outcome:** Benzi writes the frontend, backend and prompts of a new project in one chat session, with every write checked against the index.

### Steps

1. Install Benzi from the VS Code Marketplace.
2. Click the Benzi icon in the left activity bar to open the Benzi: Settings panel.
3. Pick your model, paste your API key, enter your email and press Send, then type the one-time code.
4. Press Save model & keys, then Run Benzi.
5. Describe the app you want in the chat and review each file it writes.

### Prompt to paste into your agent

```text
In VS Code with Benzi running on an empty folder at <project path>, ask Benzi to build <short app description>. Expected output: a project with frontend, backend and any prompt files. Verify by running the app locally and checking that the main flow works end to end.
```

### Caveat

The README's greenfield example is a single demo app, and results on other briefs will vary, so run and check the output yourself.

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/oooscoos-benzi/build-app-in-vs-code-session/
