Loading...
Loading...
Finds unused dependencies, files, and exports in JS/TS projects. Use when cleaning up dead code, removing stale packages from package.json, or identifying unreferenced exports.
npx skill4agent add knoopx/pi knipbunx knip # Analyze project
bunx knip --production # Production only (no tests, devDeps)
bunx knip --strict # Direct dependencies only
bunx knip --fix # Auto-remove unused (use cautiously)
bunx knip --include files # Only unused files
bunx knip --include exports # Only unused exports
bunx knip --include dependencies # Only unused depsbunx knip --reporter compact # Compact output
bunx knip --reporter json # JSON for tooling
bunx knip --reporter github-actions # CI annotationsbunx knip --workspace packages/client # Specific workspace
bunx knip --exclude "test/**/*" # Exclude patternsbunx knip --debug # Debug output
bunx knip --trace-file src/utils.ts # Trace file
bunx knip --trace-export myFunction # Trace export.knip.jsonknip.config.js