RepoPilot

prisma / prisma-cli

Search prisma/prisma-cli

GitHub

Code

How prisma/prisma-cli is laid out, and where to start for common changes.

C
Architecture grade
score 68/100
8+
Import cycles
lower is better
334
Files mapped
908 imports between them
94%
Layering
of imports point one way

From the map of which files import which, built when the code was last read in full. It shows what depends on what, not a reading order.

Module map

Shade by
Standalonecli167 files · 100+ commitscli-engine61 files · 66 commitscli-conformance9 files · 30 commitscli-telemetry7 files · 27 commitscompute4 files · 25 commitsprisma4 files · 66 commits

6 modules, 0 links. A link means one module imports another; thicker lines mean more imports. Select a module to trace it: blue lines go to what it uses, orange lines come from what uses it.

cli16700100+Standalone
cli-engine610066Standalone
cli-conformance90030Standalone
cli-telemetry70027Standalone
compute40025Standalone
prisma40066Standalone

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Likely public API
  5. Likely start-up file
  6. Likely start-up file
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a new CLI command

  • Define command metadata in the command registry
  • Create command handler under commands/ with execution logic
  • Register command in command tree for routing
  • Add telemetry tracking for the command

Add authentication flow to a command

  • Import auth guard and session validation utilities
  • Add credential requirement check in command handler
  • Fetch active token via credential manager for API calls
  • Handle token refresh on 401 errors from API

Add a new API controller for platform resource

  • Create controller class with resource operations
  • Inject app-provider for authenticated API client access
  • Implement state management and error handling patterns
  • Expose controller methods in command handlers

Add environment configuration support

  • Add config schema fields for new settings
  • Implement .env file reading or writing if needed
  • Add environment variable expansion logic
  • Update config loader to merge new settings

Change the public API

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.

Code quality and hotspots

Largest source files

  • Branch points72 per file on average
  • Code issues0 errors, 31 warnings
  • Largest file1,135 lines
  • Hotspot load5 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions8 workflows
  • Tests193 test filesJest/Vitest · 0.70 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Test folders: packages/cli-engine/tests · packages/cli-conformance/tests · packages/cli-engine/tests/fixtures/config/named

Hotspots

Files that change often and branch heavily, highest first. Complexity is 0–100 from branch and nesting counts.