repomap

v1.9.0
io.github.SylphxAI/repomap Checked 15 hours ago Published 1 month ago

A map of your codebase for AI agents: code graph, search, call paths and change impact.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

map Map the codebase

Start here. A map of the repository: modules (communities of files that depend on each other), the most central files (PageRank), the most used symbols, and entry points. Pass `focus` (a directory) to zoom in and get an outline of its files and symbols with line numbers.

ParameterTypeDescription
focusstringDirectory to zoom into, e.g. src/server.
formatstringtext (default, compact, file:line cited) or json.
limitintegerItems per section (default 12).
rootstringRepository root. Defaults to the client's workspace root or the server's working directory.
tokensintegerToken budget (estimated at 4 characters per token). Fills the map with the highest-ranked modules, files and symbols up to the budget and says what was omitted. Default: no budget.

context 360° view of a symbol or file

Everything about one symbol or file: its code, who calls it (with call-site lines), what it calls, subtypes, members, imports, importers and the tests that touch it. Large fixture trees are skipped until targeted (target one, or pass --include-fixtures). Target forms: `path/to/file.ts`, `file.ts:42`, `Class.method`, `Class::method`, or a bare name.

ParameterTypeDescription
target *string
code_linesintegerLines of source to include for a symbol (default 60, 0 for none).
formatstringtext (default, compact, file:line cited) or json.
rootstringRepository root. Defaults to the client's workspace root or the server's working directory.

trace Trace call paths

With `from` and `to`: the shortest call path between two symbols or files, each hop cited file:line (falls back to the file dependency path). With only `from`: the call tree below it (direction callees) or above it (direction callers).

ParameterTypeDescription
from *string
depthintegerTree depth (default 3).
directionstring
formatstringtext (default, compact, file:line cited) or json.
rootstringRepository root. Defaults to the client's workspace root or the server's working directory.
tostring

impact Change impact (blast radius)

What breaks if this changes. Give `target` (symbol or file, or a list) or `changed: true` to analyse the current git diff. Returns a risk level, direct and indirect callers with call sites, importing files, modules touched, and the tests to run. Fixture files in deferred trees are not analysed unless targeted; the result says so.

ParameterTypeDescription
basestringGit ref for `changed` (default HEAD).
changedbooleanUse the working-tree git diff (against `base`).
depthintegerCaller depth (default 3).
formatstringtext (default, compact, file:line cited) or json.
rootstringRepository root. Defaults to the client's workspace root or the server's working directory.
target

db Database map

Map the database: tables, columns, primary and foreign keys, indexes, and the code that queries each table (file:line). By default it reads schema sources in the repo: SQL migrations, Prisma, Drizzle, SQLAlchemy, Diesel and Django models. To inspect a live Postgres, MySQL or SQLite database, pass `url_env` (the NAME of an environment variable holding the connection string). The connection is strictly read-only and the string is never stored or shown. Pass `table` for one table's full detail.

ParameterTypeDescription
formatstringtext (default, compact, file:line cited) or json.
rootstringRepository root. Defaults to the client's workspace root or the server's working directory.
tablestringFocus on one table: columns, indexes, who references it, and where the code queries it.
urlstringConnection string (prefer url_env so secrets stay out of transcripts).
url_envstringName of an env var with the connection string, e.g. DATABASE_URL.