Skip to main content

BizMap

Who reads and writes this column — across all your services — and what triggers it?

BizMap is a static, deterministic data-lineage map for application code. Point it at one or more repos and it answers, for every table and column:

  • who writes it and who reads it (function, file, line)
  • what triggers that code: HTTP route, scheduled job, queue consumer, DB trigger, Firestore event
  • which other service calls in: front-end → API → internal service, matched across repos
  • why, in the words already sitting in the code (the comment or docstring above the function)

No LLM, no tokens, no account, no server. It runs locally, and the same input always produces the same graph.

pipx install bizmap        # or: pip install bizmap   (Python 3.11+)
bizmap --version

Typical questions it answers:

  • Can I drop or rename orders.status? — every reader and writer, in every repo.
  • Which endpoints touch users.email? — useful for LGPD/GDPR data mapping.
  • What happens to the database when the front-end calls placeOrder()?

A 30-second demo

examples/checkout is three services sharing one Postgres: web (TypeScript + axios) → api (Go + Echo + pgx) → billing (Python + FastAPI), and billing calls the api back when a payment is confirmed.

git clone https://github.com/lucas-simao/bizmap && cd bizmap
bizmap scan examples/checkout --mermaid
bizmap why orders.status

The diagram that --mermaid writes (entrypoint → table rollup plus cross-service calls; reads edges omitted here for readability):

flowchart LR
  subgraph web
    placeOrder["placeOrder()"]
    pollOrder["pollOrder()"]
  end
  subgraph api
    POST_orders["POST /api/orders"]
    GET_order["GET /api/orders/:id"]
    POST_paid["POST /api/orders/:id/paid"]
    job_expire["job ExpireJob.Run"]
    CreateInvoice["Billing.CreateInvoice"]
    orders[("orders")]
  end
  subgraph billing
    POST_invoices["POST /invoices"]
    POST_webhook["POST /webhooks/payment"]
    invoices[("invoices")]
  end
  placeOrder -->|calls_http| POST_orders
  pollOrder -->|calls_http| GET_order
  CreateInvoice -->|calls_http| POST_invoices
  POST_webhook -->|calls_http| POST_paid
  POST_orders -->|writes| orders
  POST_paid -->|writes| orders
  job_expire -->|writes| orders
  POST_invoices -->|writes| invoices
  POST_webhook -->|writes| invoices

And bizmap why orders.status (trimmed):

column: orders.status (TEXT)

writers:
  [exact] api/main.Repo.ExpirePending  (repo.go:54) — ExpirePending releases orders that were never paid.
      triggered by api/scheduled job main.ExpireJob.Run — Run expires unpaid orders every minute so abandoned carts free their slot.
  [exact] api/main.Repo.InsertOrder  (repo.go:35) — InsertOrder stores a new pending order.
      triggered by api/HTTP POST /api/orders — CreateOrder records a checkout as pending and asks billing for an invoice.
      invoked via HTTP from web/src.checkout.placeOrder
  [exact] api/main.Repo.MarkPaid  (repo.go:48) — MarkPaid settles an order after billing confirms payment.
      triggered by api/HTTP POST /api/orders/:id/paid — MarkPaid is called by billing once the payment provider confirms the charge.
      invoked via HTTP from billing/app.payment_webhook

readers:
  [exact] api/main.Repo.GetOrder  (repo.go:42) — GetOrder loads one order by id.
      triggered by api/HTTP GET /api/orders/:id — GetOrder returns the order status for the confirmation page.
      invoked via HTTP from web/src.checkout.pollOrder

Three languages, four cross-service hops, every line backed by file:line.

Quickstart

Python 3.11+:

pipx install bizmap                  # or: pip install bizmap
bizmap scan path/to/repo --mermaid   # writes bizmap.graph.json (+ .mmd)
bizmap why orders.status             # writers, readers, triggers, callers
bizmap report path/to/repo           # how much of the code BizMap understood

Several services at once (one joint graph, cross-repo HTTP links matched):

bizmap scan ./web ./api ./billing --out merged.json
bizmap registry merge web.json api.json billing.json --out merged.json   # same result

A whole work folder full of clones and worktrees: --discover finds the git repos, keeps one copy of each (main checkout, default branch, latest commit) and scans them together. --list shows the choice and why (docs/discover.md):

bizmap scan --discover ~/work --list
bizmap scan --discover ~/work --out work.json

A bizmap.yaml per repo (or one at the parent) is optional and only fills gaps:

name: api
database: checkout            # repos with the same database share table ids
services:                     # which env var / host points at which service
  billing: { url: http://billing.internal, env: BILLING_URL }
  api: { env: VITE_API_URL, prefix: /api/v1 }   # the env value already ends in /api/v1
  backend: { env: BACKEND_URL, repo: core-api }  # key ≠ repo name: point at the repo
exclude: [cmd/seed, demo/]
scan:                         # what is left out by default, and how to bring it back
  include: ["*_test.go", .yarn]   # skip_generated: false brings everything back
overrides:                    # anything static analysis cannot see
  columns:
    orders.status:
      why: "Lifecycle: pending → paid | expired"

A services: key (or its repo:) is the name of a scanned repo — with --discover, the name --list shows. The short form billing: http://billing.internal is a URL alone; url/base/host, env (one or a list), hostname, repo and prefix are the long form's keys. It works in each repo's bizmap.yaml and in the one at the workspace or --discover root. When every call that already matched through an env key goes to one repo, the key's other calls are linked to that repo too (via: env_inferred); bizmap scan prints the rest as a ready-to-paste services: hint.

Dependency and build folders (node_modules, vendor, dist, build, .venv) are never scanned unless listed in scan: include. Left out by default (skip_generated: true, gitignore: true): build caches (.next, .yarn, .turbo…, and out/ / coverage/ next to a project manifest), minified or bundled JS, .gitignored paths, and in Go *_test.go, testdata/, mocks/, *.pb.go, *_mock.go and files headed // Code generated … DO NOT EDIT. — except generated data-access code (sqlc, or anything that runs .Exec( / .Query…(), which is always scanned. bizmap scan names what it skipped; scan: include: brings paths back, skip_generated: false and gitignore: false turn the defaults off.

Coverage report

bizmap report tells you how much of a codebase BizMap understood: entrypoints that reach a table, HTTP links matched vs. unresolved (by reason, with a hint for each), how links were derived, and confidence.

entrypoints: 6  reaching a table/collection: 6 (100.0%)
http links: 4  (cross-repo 4)
unresolved http: 0
edges by confidence: exact 31, inferred 23

--redact replaces every name, route, table, URL, env key, and file with a salted hash, so a report from a private codebase can be shared without sharing code:

bizmap report ./svc-a ./svc-b --redact --salt-file ~/.bizmap-salt --json

Only counts, edge types, entrypoint kinds and reasons stay readable. Without a salt each run uses a random one (hashes differ between runs); --salt-file creates a private salt once and reuses it so runs can be compared.

PR impact comment

bizmap impact maps a diff onto the graph: each changed function → the entrypoints that reach it (across services in a joint scan) and the tables/columns it, or anything it calls, reads or writes. It prints Markdown with a Mermaid diagram.

bizmap scan examples/checkout --out /tmp/g.json
git diff --unified=0 origin/main... | bizmap impact --graph /tmp/g.json --prefix examples/checkout

As a GitHub Action (one comment per PR, updated on each push):

on: pull_request            # not pull_request_target: never run PR code with a write token
permissions:
  contents: read
  pull-requests: write
concurrency:                # two quick pushes must not race to create two comments
  group: bizmap-impact-${{ github.event.pull_request.number }}
  cancel-in-progress: true
jobs:
  bizmap:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4   # the base commit is fetched if missing; fetch-depth: 0 also works
      - uses: lucas-simao/bizmap@v0.4.3
        with:
          path: .            # or the workspace dir holding bizmap.yaml with `repos:`

The comment lists at most max-rows functions (default 50, ranked by how many routes and tables they reach) and stays under GitHub's size limit; the workflow run summary has the full list. PRs from forks get a read-only token, so they only get the summary. If the scan fails, the comment says so and links the log. Only comments by comment-author (default github-actions[bot]) are updated; if the comments can't be listed, nothing is posted (no duplicates). The check is advisory: a BizMap failure is reported in the comment and as a warning, and fails the job only with fail-on-error: "true". With ref: <head sha> checkouts the diff starts at the merge base, so base-branch drift is not reported.

Lines outside any function (imports, migrations, docs) are listed as unmapped and don't produce impact.

MCP server (for coding agents)

Requires bizmap 0.4.0+.

bizmap mcp lets Claude Code, Cursor, Claude Desktop or any MCP client ask the graph what writes orders.status?, which routes reach markPaid? or what does this diff touch? instead of grepping. It is read-only and offline (reads the JSON from bizmap scan, reloads it when you rescan), deterministic, and needs no extra dependency.

bizmap scan . --out bizmap.graph.json
claude mcp add bizmap -- bizmap mcp --graph "$PWD/bizmap.graph.json"   # Claude Code

Cursor (.cursor/mcp.json):

{ "mcpServers": { "bizmap": { "command": "bizmap", "args": ["mcp", "--graph", "${workspaceFolder}/bizmap.graph.json"] } } }

Claude Desktop (claude_desktop_config.json, absolute paths):

{ "mcpServers": { "bizmap": { "command": "/home/you/.local/bin/bizmap", "args": ["mcp", "--graph", "/home/you/code/shop/bizmap.graph.json"] } } }
Tool Answers
search functions, routes, tables, columns by name / path / doc comment → ids
call_graph callers (and the routes/jobs that reach a function) and callees, across services
function_data tables/columns a function or route reads and writes (transitive through callees)
table_usage functions and routes that read/write a table or one column
impact a unified diff → changed functions, routes and data (same as bizmap impact)
why_column the bizmap why report for table.column

Every item carries evidence (file:line) and, when it comes from an edge, a confidence; lists are capped (limit, default 20) with totals. Setup per client, the full input/output contract and troubleshooting: docs/mcp.md.

What it understands

Routes / triggers Data access Outbound HTTP
Go Echo (groups, const paths, wrappers), ticker/cron jobs pgx, database/sql, sqlx net/http (env/const/Sprintf URLs)
Python FastAPI, Flask (routers, blueprints, factories), Celery, RQ, Cloud Tasks, Pub/Sub, Firebase Functions, while True workers SQLAlchemy Core/ORM, raw SQL, SQL dicts/constants, Firestore, Supabase httpx, requests, aiohttp
JS / TS Express, Fastify, Hono (chains, mounts), Supabase Edge Functions pg/postgres, Supabase fetch, axios, ky, ofetch, got (instances, factories, tsconfig paths)
SQL CREATE TRIGGER schema replayed from schema.sql / migrations / Alembic, views, RLS policies —

When a client or executor cannot be traced through every layer, BizMap falls back to evidence it can still see — an API path literal in a front-end function (via: route_literal), or the SQL constant a handler names (via: sql_reference) — and marks those links inferred. Details: docs/how-it-works.md.

How it decides

  • Evidence over vibes. Every edge stores {file, line, symbol}.
  • Confidence on every edge. exact (static SQL / resolved handler), inferred (call-graph propagation, SELECT *, interface dispatch, fallbacks above), unknown (dynamic SQL like "UPDATE " + table).
  • Say when you do not know. Dynamic SQL is table:unknown, ambiguous handlers list candidates, unmatched HTTP calls are kept as unresolved_http with a reason (target_not_scanned, base_unknown, path_dynamic, client_unknown).
  • Deterministic. Byte-identical output for identical input, checked in CI across hash seeds; every bundled example has a golden snapshot.
  • Static means static. SQL rewritten at runtime (sql.replace(...), .format() with runtime values) is read as written in the source.
  • JS/TS import resolution follows relative paths, index barrels, export … from, tsconfig paths and Vite resolve.alias; Webpack aliases are not read. Same-named local helpers in two sibling anonymous callbacks share one id (only one is kept).
  • No AI in the core, ever. Models are welcome as clients of the graph (MCP is on the roadmap), not as its authors.

How it compares

  • Code search / call graphs (Sourcegraph, CodeQL, tree-sitter code-graph MCP servers) know functions and calls, but not which table and column a function touches, nor which route in another repo an HTTP client hits.
  • Data-pipeline lineage (dbt, OpenLineage, warehouse catalogs) starts at the warehouse or at runtime; it does not see the application code that writes the data.
  • Commercial code-level lineage (Gable, Foundational) does this for data teams as a hosted platform. BizMap is the open-source, local, developer-first take on it.

Roadmap

  • Shipped in v0.3.3 — bizmap impact + GitHub Action that comments on each PR with the routes, functions, tables and columns it impacts (and a Mermaid diagram).
  • Shipped in v0.4.0 — bizmap mcp, a read-only MCP server so coding agents can ask why orders.status instead of grepping; bizmap scan --discover for work folders full of clones and worktrees.
  • Static graph page (GitHub Pages).

Full history: CHANGELOG.md. Graph format: docs/graph-schema.md. Detector rules: docs/detector-rules.md.

Releasing

Bump the version (pyproject.toml, src/bizmap/__init__.py, graph version, docs/graph-schema.md, README @vX.Y.Z), date the CHANGELOG section, merge, then push a tag on that commit:

git tag -a vX.Y.Z <commit> -m "vX.Y.Z" && git push origin vX.Y.Z

.github/workflows/release.yml checks that the tag is on main and matches the version and the CHANGELOG, runs the tests, builds, publishes to PyPI with Trusted Publishing (no token) and creates the GitHub release with that CHANGELOG section. One-time setup is described at the top of the workflow. Tags on commits older than the workflow (v0.3.3–v0.3.5) are published with Actions → Release → Run workflow (from main) and the tag name. Limit the pypi environment to main and v* tags (Deployment branches and tags) so no other branch can publish.

Development

From a clone of the repository:

pip install -e ".[dev]"
ruff check src tests
pytest -q

tests/test_snapshots.py keeps a golden, line-per-link summary of every example in tests/snapshots/*.txt and checks that each example scans to byte-identical JSON under several PYTHONHASHSEED values. When a detector change is intended, refresh with BIZMAP_UPDATE_SNAPSHOTS=1 pytest tests/test_snapshots.py and review the +/- diff in the PR.

Fixtures are synthetic (orders, users, invoices, …); no proprietary code is included. MIT licensed. Contributions that add detector rules for new frameworks are especially welcome — please include a minimal example and let the snapshot diff show what changed.

Metadata

Release files for bizmap 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bizmap 0.4.3
File Size Uploaded Provenance Actions
bizmap-0.4.3.tar.gz 2.7 MB With provenance Details for bizmap-0.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bizmap 0.4.3
File Interpreter ABI Platform Actions
bizmap-0.4.3-py3-none-any.whl Python 3 none any Details for bizmap-0.4.3-py3-none-any.whl

Total release size: 3.0 MB

Release files / bizmap-0.4.3.tar.gz

Download URL bizmap-0.4.3.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
390b5b68d45df1d2cf8ca75722bd781405536496d2436e53fd6dc5980193d516
BLAKE2b-256 checksum
How to use checksums
fd523303639c1e8ca45a3d75bcb4f34f7134c3663d84fb2843e5872ea271de04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / bizmap-0.4.3-py3-none-any.whl

Download URL bizmap-0.4.3-py3-none-any.whl
Size 253.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
074da03c0232ec54aee4d4a8b9556406618e0f0cf6661888faf145ac868c3aec
BLAKE2b-256 checksum
How to use checksums
155e33d7e9c0de6c650310629d9322e5b0224255be2b23f52fa885d18a25036b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for bizmap 0.4.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bizmap-0.4.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page