On this page
Overview
Knip is a CLI for finding unused files, dependencies, exports, and related issues in JavaScript and TypeScript projects. It analyzes entrypoints and tool configuration to trace reachable code, reports unused or unlisted dependencies, supports monorepos, and can auto-fix selected issue types.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Report unused files, dependencies, exports, and related issues together
Knip analyzes source and project configuration to report unused files, dependencies, unlisted dependencies, exports, and multiple other issue categories in one run.
Best fit
Before adoption
Do not treat every reported item as an automatic deletion instruction
The official guide recommends checking reachability and configuration when a result looks wrong instead of immediately ignoring or deleting it. Confirm why an item is reported before removing code.
Sources: [4]
Official sources
- [1]webpro-nl/knip repository(2026-09-30)
- [2]Knip README(2026-09-30)
- [3]Knip getting started guide(2026-09-30)
- [4]Knip first cleanup guide(2026-09-30)
- [5]Knip CLI reference(2026-09-30)
- [6]Knip 6.38.0 package metadata(2026-09-30)
- [7]Knip 6.38.0 release(2026-09-30)
- [8]Knip ISC license(2026-09-30)
Supplemental curator note
Knip is valuable because it understands many tool-driven entrypoints that simple import scans miss. Its report should still be treated as analysis rather than a deletion command, with reachability and plugin configuration checked before cleanup.
Try it in 3 steps
- 1
Create a Knip configuration
Run the recommended setup to add Knip and initial project configuration. Knip v6 requires Node.js 20.19.0 or newer.
npm init @knip/config - 2
Limit the first report
Start with a small report and inspect why unused files, dependencies, or exports are being reported before changing code.
npm run knip -- --max-show-issues 5 - 3
Auto-fix only unused exports
Keep the automatic fix scope limited to unused exports. Review the diff afterward and confirm findings are not caused by missing entrypoints or configuration.
npm run knip -- --fix --exports
Growth
Growth trends · Last 30 days
12,379 Stars
Trend data is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- deadcode
- dependency-analysis
- dependency-management
- javascript
- lint
- linter
- maintenance
- typescript
- unused-code
- unused-exports
- Stars
- 12,379
- Forks
- 506
- Watchers
- 16
- Open issues
- 18
- Owner type
- Organization
- Primary language
- TypeScript
- License
- ISC
- Repository last updated
- Sep 29, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- ESLint27,525 Stars
3 shared tag(s) · 1 shared category(s)
Use AST analysis and pluggable rules to turn JavaScript quality checks into repository policy through flat config
JavaScript - Biome25,880 Stars
3 shared tag(s) · 1 shared category(s)
combine formatting, linting, fixes, and editor diagnostics in one fast tool
Rust - Auth.js28,372 Stars
3 shared tag(s) · Same language
Compose OAuth/OIDC, passwordless, WebAuthn, and stateless or database-backed sessions from packages built around standard Web APIs
TypeScript - Mermaid90,482 Stars
2 shared tag(s) · 2 shared category(s) · Same language
Generate flowcharts, sequences, classes, ER diagrams, Gantt charts, and more from text syntax
TypeScript - Tolgee4,117 Stars
2 shared tag(s) · 2 shared category(s) · Same language
Bring real application context into translation management, AI, and MCP workflows
TypeScript - Storybook91,178 Stars
2 shared tag(s) · 1 shared category(s) · Same language
capture UI states once and reuse them across docs, interaction tests, and agent tooling
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.