Skip to content

Overview

Sadrazam covers a broad dependency and code-hygiene surface. This page summarizes the current feature set in the same practical way users evaluate CLI tools: what exists and how it is used.

NameDescription or example
Auto-fixUse --fix to safely remove deterministic unused package declarations from package.json.
CacheUse --cache to speed up consecutive runs when inputs are unchanged.
CatalogReuse config entries with catalog.packages and catalog.entryFiles, and get hints for unused catalog entries.
CommonJSrequire, require.resolve, and hybrid import patterns are supported.
CompilersSupport for .astro, .mdx, .svelte, and .vue source scanning, with room for deeper framework-aware analysis.
Configuration hintsDisplay hints for stale allowlists, ignored entries, and unused catalog references.
DebugUse --debug for troubleshooting resolved config and rule state.
FiltersUse --include and --exclude to focus on specific finding groups.
FormatUse --format with --fix to normalize modified package.json files.
JSDoc tagsTag exports with @sadrazam-ignore or @sadrazam-keep to suppress unused export findings.
Memory usageUse --memory for peak heap and RSS insight.
MonoreposWorkspaces are first-class and can be filtered with --workspace.
PerformanceUse --performance for workspace and total timing insights.
PluginsBuilt-in plugin analysis exists for common tools, even though this is not a large external plugin ecosystem yet.
Plugins: inputsAdd entry files and package usage through config inputs.
Plugins: CLI argumentsParse common tool arguments such as --config, --plugin, and --parser to enrich analysis.
PreprocessorsPreprocess findings before reporting them through package, file, and export patterns.
Production modeUse --production to lint only production code paths.
ReportersUse built-in text, json, toon, markdown, and sarif reporters for human and machine-readable output.
RulesExclude or focus on specific issue types with ignore and allowlist rules.
Script parserShell scripts and package.json scripts contribute entry paths and package dependencies.
Source mappingMap dist files back to src files through sourcemaps and heuristics.
Strict modeUse --strict to flag production usage of devDependencies.
TraceTrace packages and exports to find where they are used.
Watch modeUse --watch for live updates of unused files, exports, and dependency findings.
WorkspaceUse --workspace to filter workspaces in a monorepo.

Extra capabilities

Sadrazam also includes capabilities that are not captured cleanly by the original checklist format:

  • unused file detection
  • unused export detection
  • missing package declarations
  • package and export trace output
  • AI-powered summaries for OpenAI, Anthropic, and Gemini
  • safe package.json cleanup with optional formatting

Released under the MIT License.