Overview
Sadrazam scans JavaScript and TypeScript projects for dependency and code-hygiene issues with a low-noise, deterministic output contract.
It finds unused packages, missing package declarations, unresolved local imports, unused source files, unused reachable exports, and duplicate export aliases. AI summaries are optional and sit on top of the real scan findings.
Quick Start
Section titled “Quick Start”npx sadrazam .npx sadrazam . --reporter jsonnpx sadrazam . --reporter toonnpx sadrazam . --trace typescriptnpx sadrazam . --explain unused-filesAI_PROVIDER=openai AI_TOKEN=your_token npx sadrazam . --aiWhat You Get
Section titled “What You Get”- unused
dependenciesanddevDependencies - missing package declarations
- unresolved local imports
- unused source files
- unused reachable exports
- duplicate export aliases
- workspace and monorepo-aware scanning
- package usage tracing with
--trace - finding explanations with
--explain - config-based allowlists, catalogs, and preprocessors
- cache, performance, memory, and watch modes
- production-only and strict scan modes
- safe
--fixand--fix --formatcleanup - TypeScript path alias resolution
- optional AI summaries on top of scan findings
Why It Exists
Section titled “Why It Exists”JavaScript projects collect dependencies over time. Some stop being used. Some stay in the wrong dependency bucket. Some stay around simply because nobody has enough visibility to remove them with confidence.
Sadrazam is built to make that visible quickly, with output that is useful both in local development and in CI.
Common Flows
Section titled “Common Flows”Scan the current project
Section titled “Scan the current project”sadrazam .Inspect one workspace
Section titled “Inspect one workspace”sadrazam . --workspace packages/webExport machine-readable output
Section titled “Export machine-readable output”sadrazam . --reporter jsonsadrazam . --reporter toonAdd AI summaries
Section titled “Add AI summaries”AI_PROVIDER=openai AI_TOKEN=your_token sadrazam . --ai