Skip to main content
Home: Florian Bruniaux Engineering & AI Contact

Florian Bruniaux / Explore

Search the site

Search in English or French, or jump to a section.

↑ ↓ to navigateEnter to openEsc to close

EN
Colour theme

Project · Creator

dep-scope

Symbol-level dependency analyzer for TypeScript/JavaScript. Tells you which symbols you actually use and whether a native alternative exists.

You need to find unused package surface, duplicates, or native alternatives.

TypeScript CLI AST

Knip and Depcheck can report that “lodash is used.” dep-scope identifies the symbols, their frequency and file count, then indicates whether a native alternative can replace the dependency.

Package-level reports hide usage detail

Existing tools give a binary answer. dep-scope answers the real question:

lodash v4.17.21 — RECODE_NATIVE
  Symbols: get (45x), debounce (12x), cloneDeep (3x)
  → get : optional chaining (?.)
  → cloneDeep : structuredClone()
  → debounce : native setTimeout pattern

Key Features

  • Symbol-level analysis: not just “package used” but which exports, how many times, in how many files
  • 6 actionable verdicts: KEEP, REMOVE, RECODE_NATIVE, CONSOLIDATE, PEER_DEP, INVESTIGATE
  • 195 native alternatives: 169 e18e micro-utilities + 26 hand-curated libraries (lodash, moment, axios, uuid…)
  • 220+ well-known patterns: auto-KEEP on common stacks (NestJS, Fastify, Stripe, Algolia, Sentry, Auth0, Prisma, Supabase, AWS SDK…) to eliminate false positives
  • Transitive analysis (--check-transitive): BFS across the full dependency graph, not just package.json; supports npm, pnpm strict, Bun
  • Monorepo support (--each-workspace): detects pnpm-workspace.yaml, workspaces, Turborepo, Lerna; per-package scan + aggregated summary
  • LLM migration prompts (dep-scope migrate): generates one markdown file per dependency to migrate, context-aware (TypeScript target, detected framework, exact file paths); pipeable directly into Claude Code
  • Knip integration: auto-detects Knip if present to reduce false positives
  • CI integration: differentiated exit codes (0 = OK, 1 = actionable issues, 2 = error); --no-exit-code for reporting mode

Architecture

src/
├── analyzers/   # import-analyzer (AST), usage-analyzer, transitive-analyzer
├── config/      # Zod schema, multi-format loader, presets, defaults
├── migration/   # LLM prompt generator + templates (lodash, moment, axios)
├── reporters/   # console, markdown
├── rules/       # native-alternatives, e18e-data (169 packages), duplicate-categories
├── utils/       # workspace-detector, path-alias-detector, tsconfig-resolver
└── cli/         # Commander.js entry point

Commands

dep-scope scan                       # full report
dep-scope scan --check-transitive    # + transitive graph
dep-scope scan --each-workspace      # monorepo mode
dep-scope analyze lodash             # deep-dive a single package
dep-scope migrate                    # generate migration prompts
dep-scope duplicates                 # detect duplicate categories

Stack

TypeScript (ES2022, NodeNext) · @typescript-eslint/parser · Commander.js · fast-glob · Zod · jiti · picocolors · Vitest

Numbers

  • 371 automated tests, 18 suites
  • 195 packages with referenced native alternatives
  • 220+ well-known patterns (auto KEEP/IGNORE)
  • ~1s on 1500 transitive packages (pnpm strict)
  • 45 TypeScript source files
Back to tools & projects