Skip to content

Features

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 remove deterministic unused package declarations and add missing package declarations with a reviewable "*" placeholder version.
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.
InitUse sadrazam init to create a sadrazam.json config interactively or from piped answers.
JSDoc tagsTag exports with @sadrazam-ignore or @sadrazam-keep to suppress unused export findings.
Memory usageUse --memory for peak heap and RSS insight.
MonoreposPackage workspaces, pnpm-workspace.yaml, Lerna, and Rush workspace configs are first-class and can be filtered with --workspace.
Namespace membersReport unused TypeScript namespace export members when reachable local imports only use specific members.
Noise controlUse --max-show-issues <count> to limit displayed items while preserving full scan counts and exit behavior.
OXC parser and resolverJavaScript and TypeScript sources use OXC-backed parsing and local resolution, with fallback for unsupported source forms.
PerformanceUse --performance for workspace and total timing insights.
PluginsBuilt-in plugin analysis covers Astro, Azure Pipelines, Babel, Biome, Bitbucket Pipelines, Changesets, CircleCI, Commitlint, Cypress, Docker, ESLint, GitHub Actions, GitLab CI, Husky, Jest, Lefthook, Lerna, lint-staged, MSW, Next, Nx, Playwright, pnpm workspace, PostCSS, Prettier, Prisma, release-it, Rollup, Rush, semantic-release, Storybook, Stylelint, SvelteKit, Tailwind, TypeDoc, Turbo, TypeScript, UnoCSS, Vite, Vitest, and webpack.
Plugins: inputsAdd entry files and package usage through config inputs.
Plugins: CLI argumentsParse common tool arguments such as --config, -c, --plugin, and --parser to enrich analysis.
Plugins: overridesForce-enable, disable, or override plugin config and entry files with plugins.<name>.
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, compact-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.
ExplainUse --explain <type> to add deterministic explanation details for one finding type.
TypeScript pathsResolve compilerOptions.paths aliases so local aliased imports are not reported as missing packages.
VS Code extensionThe extensions/vscode scaffold runs compact JSON scans, supports manual/open/save triggers, and publishes findings to the Problems panel.
Watch modeUse --watch for live updates of unused files, exports, and dependency findings.
WorkspaceUse --workspace to filter workspaces in a monorepo.

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

  • unused file detection
  • unused export detection
  • duplicate export alias detection
  • missing package declarations
  • unresolved local import detection
  • OXC-backed import/export parsing and local package import resolution
  • package and export trace output
  • registry-based plugin discovery for common frontend and test tools
  • finding explanations with --explain
  • AI-powered summaries for OpenAI, Anthropic, and Gemini
  • safe package.json cleanup with optional formatting
PluginActivationConfig files and entry signals
Astroastro package or scriptastro.config.*, src/pages/**/*.astro, src/content/**/*.{md,mdx}
Azure Pipelinesazure-pipelines.yml, .yaml, or .azure-pipelines/*.{yml,yaml}script, bash, pwsh, workingDirectory
Babel@babel/* package, babel script, package config, or Babel config filebabel.config.*, .babelrc*, plugins, presets
Bitbucket Pipelinesbitbucket-pipelines.yml or .yamlnested script command blocks
CircleCI.circleci/config.yml or .yamljob run commands, job and step working_directory
Commitlint@commitlint/cli package, commitlint script, package config, or Commitlint config filecommitlint.config.*, .commitlintrc*, extends, parserPreset, plugins
Cypresscypress package or scriptcypress.config.*, cypress/**
DockerDockerfile, Dockerfile.*, docker-compose.yml, compose.yaml, or Docker scriptDockerfile WORKDIR, RUN, CMD, ENTRYPOINT; Compose build.context, working_dir, command, entrypoint
Biome@biomejs/biome package or biome scriptbiome.json, biome.jsonc, --config, -c
Changesets@changesets/cli package, changeset / changesets script, or .changeset/config.json.changeset/config.json, .changeset/*.md
ESLinteslint package or script.eslintrc*, eslint.config.*, --parser, --plugin, extends, plugins
GitHub Actions.github/workflows/*.yml or .yamlworkflow run commands, step working-directory, local action.yml node entries
GitLab CI.gitlab-ci.yml or .yamlbefore_script, script, and after_script command blocks
Huskyhusky package, husky script, or .husky/* hookhook command blocks
Jestjest package or scriptjest.config.*, package.json, --config, -c
Lefthooklefthook package, lefthook script, or lefthook.yml / .lefthook.ymlhook run and script command blocks
Lernalerna package or script, or lerna.jsonlerna.json config entry
lint-stagedlint-staged package, script, package config, or lint-staged config filestaged-file command blocks
MSWmsw package, msw script, or package.json#mswworkerDirectory service worker file
Nextnext package or scriptnext.config.*, pages/**, app/**, src/pages/**, src/app/**
Nxnx package or scriptnx.json, workspace.json, project.json, plugins package entries
Playwright@playwright/test or playwright package/scriptplaywright.config.*, tests/**, e2e/**
pnpm workspacepnpm-workspace.yamlworkspace config entry
PostCSSpostcss package, postcss script, or PostCSS config filepostcss.config.*, .postcssrc*, plugins
Prettierprettier package or script.prettierrc*, prettier.config.*, package.json#prettier, --plugin, --config
Prismaprisma package or scriptprisma/schema.prisma
release-itrelease-it package or script.release-it*, release-it.config.*
Rolluprollup package or scriptrollup.config.*, --config, -c
Rushrush package or script, or rush.jsonrush.json config entry
semantic-releasesemantic-release package or script.releaserc*, release.config.*
Storybookstorybook package or script.storybook/main.*, .storybook/preview.*, stories globs
Stylelintstylelint package or script.stylelintrc*, stylelint.config.*, extends, plugins, customSyntax, --custom-syntax
SvelteKit@sveltejs/kit package or svelte-kit scriptsvelte.config.*, vite.config.*, src/routes/**, src/hooks.*
Tailwindtailwindcss package or scripttailwind.config.*, postcss.config.*, -c
TypeDoctypedoc package or scripttypedoc.json, typedoc.config.*, plugin, --plugin
Turboturbo package or scriptturbo.json, turbo.jsonc
TypeScripttypescript package or tsc scripttsconfig*.json, extends, references, compilerOptions.plugins
UnoCSSunocss package or scriptuno.config.*, unocss.config.*
Vitevite package or scriptvite.config.*, --config, -c
Vitestvitest package or scriptvitest.config.*, --config, -c
webpackwebpack package or scriptwebpack.config.*, --config, -c