v2.0 · OPEN SOURCE · 100% OFFLINE

Stop grepping.
Give your agent the whole feature.

One MCP call hands Claude Code, Cursor or VS Code the page, API, route, data model, auth checks and tests behind any feature.

$ npx codebase-trainer setup
READ THE DOCS →
84% right file in the top 5
3.7× fewer tokens than grep
83% of a feature in one call
50 ms search on 10,000 files

One call. Every layer.

Your agent asks once. It gets back every file the change touches, in order, with proof.

01 · YOU ASK

“Change how API keys are revoked.”

02 · AGENT CALLS feature_slice({ feature: "api key revocation" })
03 · GETS BACK
6layers
14files
88 mswarm
RESPONSE 4,820 / 6,000 tokens
  1. UIapp/settings/keys/page.tsx:24calls revokeKey
  2. CLIENTlib/api/keys.ts:41DELETE /api/keys/:id
  3. ROUTEapp/api/keys/[id]/route.ts:12handles the request
  4. AUTHlib/auth/scopes.ts:8requireScope('keys:delete')
  5. DATAprisma/schema.prisma:57model ApiKey
  6. TESTStests/keys.test.tsnpx vitest run

Illustrative example. Links come from real call sites, requests and ORM calls, each with file:line.

Built for the moments agents get lost

feature_slice

The whole feature

Every file a change touches, by layer, with why.

trace_flow

How it runs

Entry point to database, with evidence.

impact

What breaks

Dependents and the exact tests to run.

review_diff

Check before commit

Secrets, broken imports, drift. SARIF ready.

api_map

Who can call it

Auth, scopes and roles for every route.

search

Code first

Ranked snippets. Optional local neural model.

Ask once.
Get the map.

The same tools your agent calls over MCP, from your terminal.

zsh
$ cb-trainer slice "article comments"
🧩 Feature slice: "article comments" (16 files, ~5,334 / 6,000 tokens)

[server]
  src/app/routes/article/article.controller.ts  — search match
  src/app/routes/article/article.service.ts     — search match
  src/app/routes/article/comment.model.ts       — search match
  src/app/routes/profile/profile.utils.ts       — favoriteArticle uses profileMapper
[data]
  src/prisma/schema.prisma                      — search match

Flows:
  routes.ts → articlesController → addComment → HttpException

Against grep, on real apps

Right file in the top 5
84%
grep 66%
Tokens read to reach it
1,062
grep 3,974
Failing tests found for a change
24 / 24
grep 5
CLAUDE CODECURSORVS CODEWINDSURFNEXT.JSEXPRESSNESTJStRPCPRISMADRIZZLETYPEORM CLAUDE CODECURSORVS CODEWINDSURFNEXT.JSEXPRESSNESTJStRPCPRISMADRIZZLETYPEORM

Two minutes to set up.

Runs on your machine. No API keys. MIT licensed.

$ npx codebase-trainer setup
QUICK START →