
knip
✂️ Find unused files, dependencies and exports in your JavaScript and TypeScript projects. Knip it before you ship it!
The Lens
Knip finds the dead weight in your JavaScript and TypeScript projects: files nothing imports, dependencies you installed and forgot, exports nothing else uses. Run it and it tells you exactly what you can delete. It is free and open source under the permissive ISC license, installed as a single npm package. There is a VS Code extension and an MCP server too, so your AI assistant can flag dead code as you write.
Running it is one command. The work is in the config. Knip reads simple projects automatically, but monorepos, custom frameworks, and build setups usually need a config file and the right plugins so it stops flagging things that are actually used. It ships plugins for most major tools (Next.js, Jest, Storybook, and dozens more), so tuning is mostly picking the right ones, not writing rules from scratch.
This is the tool for shrinking a codebase before a refactor or a dependency audit. Solo or small team: install it, run it in CI, done. Big monorepo: budget an afternoon to dial in the config, then it earns its keep every release by catching cruft before it ships.
The catch is false positives. On a complex setup, knip flags things that look unused but get loaded dynamically or by a tool it has no plugin for. Read the report, do not pipe it straight into fix mode. Once it is tuned it is accurate, but the first run on a messy repo is a conversation, not a verdict.
Free vs Self-Hosted vs Paid
fully freeFree tier: Everything. Knip is fully open source under the ISC license. Unused files, dependencies, exports, types, enum and class members, duplicate exports, the autofix mode, the VS Code extension, the language server, and the MCP server are all free.
Self-hosted: Not applicable in the server sense. Knip is a dev dependency you add to a project and run from the CLI or in CI. No infrastructure to run, nothing to host.
Paid: None. There is no paid tier. The project is funded by sponsors. If it saves your team time, sponsor it at knip.dev/sponsors.
Free and open source, every feature, no paid tier. Funded by sponsors.
Get tools like this every Wednesday
One featured tool, three on the radar. No fluff.
Similar Tools
About
- Owner
- webpro-nl (Organization)
- Stars
- 11,431
- Forks
- 419
Explore Further
More tools in the directory
openclaw
Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞
377.9k ★everything-claude-code
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
212.9k ★claw-code
The repo is finally unlocked. enjoy the party! The fastest repo in history to surpass 100K stars ⭐. Join Discord: https://discord.gg/5TUQKqFWd Built in Rust using oh-my-codex.
193.6k ★
