vx impact

vx impact tells you the blast radius of a change before you write a single line. Given a file, it returns every file in the repo that would be affected if that file changed — including files that consume it transitively through re-exports.

Command

Terminal

vx impact <file>

Pass the file path relative to your repository root.

Terminal

vx impact src/components/Button.tsx

Output

impact: src/components/Button.tsx

12 file(s) affected:
  src/app/page.tsx:14
  src/components/Header.tsx:8
  src/components/Footer.tsx:22
  ...

Why run vx impact before a change

Knowing the blast radius before editing prevents surprises. A file that looks isolated may be re-exported through a barrel file and consumed by dozens of callers across the repo — including in test directories or monorepo packages you wouldn't think to check.

Real example: In Excalidraw, grep found 10 callers of app_constants.ts. vx impact found 15 — including a test file in packages/excalidraw/tests/ that grep missed entirely because it was outside the search directory. A dev relying on grep would have shipped a change that broke a test they didn't know existed.

TypeScript Re-Export Chains

vx impact follows re-export chains in TypeScript. If you change a file that is re-exported through a barrel index.ts, you'll see all downstream consumers — not just the barrel file itself.

impact: packages/element/src/align.ts

165 file(s) affected:
  excalidraw-app/App.tsx:45
  ...

This is powered by the nyx engine, which tracks export * from and export { foo } from statements as first-class edges in the dependency graph.

Staleness Warning

If files have changed since the last snapshot was built, vx impact will print a warning:

warning: snapshot is stale (3 file(s) changed) — run 'vx init' to rebuild

Results are still returned, but rebuilding with vx init ensures full accuracy.

Supported Languages

  • Go — resolves via go.mod module name
  • TypeScript / TSX — resolves relative imports, path aliases, and re-export chains
  • Python — resolves relative imports

Was this page helpful?