Commands
Audit declared dependencies against actual usage, per workspace package.
Compares declared dependencies with imports, npm scripts and tool configuration, per workspace package (npm/yarn workspaces, pnpm-workspace.yaml).
broom depsbroom deps --verbosebroom deps --json broom deps 11 declared dependencies, 8 files analyzed. Confirmed Missing (imported but not declared) axios app/page.tsx:3 In both dependencies and devDependencies zod 3.23.8 / 3.23.8 Potential (static analysis cannot prove these; review before acting) Possibly unused left-pad devDependencies lodash dependencies Used only in config files or scripts: eslint Loaded implicitly: @types/react, eslint-config-next, react, react-dom, typescript 2 confirmed issues, 2 potential issues. Broom never uninstalls packages; remove them with your package manager after review.Backed by direct evidence:
@types/<pkg> is declared)dependencies and devDependenciesReview before acting:
devDependencies imported from runtime code of a publishable (non-private) packagePackages used only in config files or scripts, packages loaded implicitly (@types/*, typescript, react-dom, the JSX runtime, ESLint/Prettier/Babel plugins, PostCSS/Tailwind, sass, …), npm: aliases, and direct dependencies installed in several versions according to package-lock.json, yarn.lock or pnpm-lock.yaml.
import/require/import() (including import type), scripts (binaries resolved through installed packages' bin fields), config files (*.config.*, .eslintrc*, .babelrc, tsconfig.json, …, including ESLint/Babel/Prettier shorthand names) and non-dependency fields of package.json.
Broom never installs or uninstalls packages.
Found a problem in these docs? Open an issue on GitHub.