Open-source project
webpro-nl/knip avatar
webpro-nl/knip

Knip: a dead code cutter for JavaScript and TypeScript whose repo page points you elsewhere

✂️ Find unused files, dependencies and exports in your JavaScript and TypeScript projects. Knip it before you ship it!

12,675 stars554 forksTypeScriptISC

At a glance

What is it?
Knip finds and fixes unused files, exports and dependencies in JavaScript and TypeScript projects. The project ships fast and spreads across four npm packages and two editor extensions, but almost none of its usage lives on the GitHub page.
Who is it for?
Knip suits JavaScript and TypeScript teams who want a dedicated pass for unused files, exports and dependencies, kept separate from their linter, and who are comfortable reading knip.dev rather than the GitHub page for every option. Teams that need a frozen tool or a written Node floor for the CLI itself should check packages/knip/package.json and pin an exact 6.x release before adding it to CI, because version 6 shipped three releases between October 24 and October 31, 2026.
Can I use it commercially?
Yes. ISC is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • webpro-nl/knip12,675 ★ · +347
Star history
Repository2026-09-222026-11-15
webpro-nl/knip12.3k12.7k

347 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Knip cuts three kinds of dead weight: files, exports and dependencies

Knip targets three specific things in a JavaScript or TypeScript project: files nothing imports, exports nothing consumes, and dependencies the code no longer uses. The project states its own case plainly: less code and fewer dependencies lead to improved performance, less maintenance and easier refactorings. It also claims to fix what it finds, not only report it, which puts it a step beyond a pure audit tool.

The name is Dutch. /'knɪp/ means "(to) cut" and is pronounced with a hard K, which explains the tagline "Knip it before you ship it!". That answers the common search for what a knip is: the word is a verb for cutting, and the tool is named after the act of trimming unused code. Lars Kappert, who publishes as webpro, is listed as the author in the repository's root package.json.

Four npm packages and two editor extensions, with no install line on the repo page

Knip is not one package. The official npm packages are knip, @knip/create-config, @knip/language-server and @knip/mcp. The names point at the split: the main tool, a create-config package for setting up configuration, a language server for editors, and an MCP package. Editor users get a VS Code extension published as webpro.vscode-knip on the VS Code Marketplace, and the same extension on the Open VSX Registry for editors that pull from there.

The GitHub README lists all of these as links, yet it carries no install command and no first run example. Anyone landing on github.com/webpro-nl/knip from a search like "Npx knip" or "Bun knip" finds package names and nothing to paste into a terminal. The consequence is a mandatory detour to knip.dev before the first run, and readers who want to compare the four packages have to open each npm page separately, because the repo page gives no description of what @knip/mcp or @knip/language-server actually expose.

Configuration and ignore rules live on knip.dev, not on GitHub

Searches such as "Knip JSON" and "Knip ignore" show that people go looking for the configuration file format and for ways to silence false positives. The repository proves a JSON config exists, because a knip.json sits at the root and the project runs its own tool against itself. But the README on GitHub stops at links: it names no config keys, no ignore patterns and no command line flags.

The documentation source is in the monorepo. The root remark script points at packages/docs/src/content/docs, where the Markdown and MDX pages for knip.dev are kept. That directory is the place to read when the website is unreachable or when you want to see how a doc page changed between releases. The practical cost is that any setup decision, from which files count as entry points to how to exclude a folder, has to be checked against the site or that folder. Nothing on the README page will answer it, and a team that only skims the repo before adopting Knip will miss every option it ships with.

A pnpm monorepo that runs Knip on itself

The repository is a pnpm workspace with every package under packages/, declared through the workspaces field and a pnpm-workspace.yaml file. The root package, @knip/root, is private and exists only to orchestrate scripts. The test script delegates to the Knip package and the docs script starts the documentation site:

code
pnpm run --dir packages/knip test
pnpm run --dir packages/docs dev

The CI script chains oxlint, an oxfmt format check, installed-check with --ignore-dev and a line ending check script. Linting runs through oxlint with an oxlint.config.ts at the root, and formatting runs through oxfmt with a .oxfmtrc.json file. Contributors also find AGENTS.md, CLAUDE.md and AI_POLICY.md at the top level, so the project has written down rules for AI assisted contributions, and a Contributing Guide lives under .github. Releases go through release-it, configured in .release-it.json and wrapped by ./scripts/release.sh.

The published CLI has its own Node version requirements

The root package.json sets engines to node >=22.0.0 and pins pnpm 11.28.8 through the packageManager field. Those values bind anyone who clones the repository to run tests or build the docs. The published knip package has its own package.json under packages/knip. Its current manifest specifies Node `^20.19.0 || >=22.12.0`; check the engine requirement for the version you install.

The consequence for adopters: do not read the root engines field as the runtime requirement for npx or a CI job. If your pipeline runs an older Node release, check the engines entry inside the published knip package before wiring it in. For contributors the requirement is firm. A machine on Node 20 or an older pnpm will not match what the root package.json declares, and the packageManager entry carries a sha512 hash, so the exact pnpm build is fixed for everyone working in the repository.

Version 6 shipped three releases in eight days

The release history shows a project moving quickly. [email protected] landed on October 24, 2026, [email protected] followed on October 29, and [email protected] on October 31, 2026. The last push to the main branch was also on October 31, 2026, and the repository is not archived. Renovate is configured through renovate.json, so dependency updates flow in automatically as well.

This pace is a benefit when you hit a bug, since fixes reach npm within days. It is also a cost for anyone using a caret range in CI. Knip reports problems in your code, so a new minor release that changes what counts as unused can turn a passing pipeline red without any change on your side. Pin an exact version, such as 6.44.1, and upgrade on purpose, reading the release notes for each step. The "Knip v6" search reflects that the major version matters: configuration written for an earlier major is not something the README promises will carry forward.

Borrowed code from npm, pnpm and cacheable brings MIT terms along

Knip itself is free and open source under the ISC License. Parts of it are inspired by or partially copy code from four other projects, and not all of them share that license. @npmcli/package-json is ISC. @pnpm/deps.graph-sequencer, file-entry-cache from the cacheable repository, and json-parse-even-better-errors are all MIT.

For most users this changes nothing, since both licenses are permissive. It matters for organizations that run license audits on their dependency tree or redistribute tooling inside a product. Such an audit has to record the MIT notices for the copied portions, not just the top level ISC grant, and a scanner that only reads the license field in package.json will miss them. Keep the four project names and their licenses in your notice file: @npmcli/package-json (ISC), @pnpm/deps.graph-sequencer (MIT), file-entry-cache (MIT) and json-parse-even-better-errors (MIT).

Editorial conclusion

Knip suits JavaScript and TypeScript teams who want a dedicated pass for unused files, exports and dependencies, kept separate from their linter, and who are comfortable reading knip.dev rather than the GitHub page for every option. Teams that need a frozen tool or a written Node floor for the CLI itself should check packages/knip/package.json and pin an exact 6.x release before adding it to CI, because version 6 shipped three releases between October 24 and October 31, 2026.

Frequently asked questions

What is the knip package?

knip is the main npm package of Knip, a tool that finds and fixes unused dependencies, exports and files in JavaScript and TypeScript projects. It is released under the ISC License.

What is a knip?

Knip is a Dutch word, /'knɪp/, meaning "(to) cut", pronounced with a hard K. The tool is named after cutting unused code before you ship it.

Is there a Knip extension for VS Code?

Yes. Knip is published as webpro.vscode-knip on the VS Code Marketplace and on the Open VSX Registry, and a separate @knip/language-server package exists on npm.

Which npm packages make up Knip?

The official packages are knip, @knip/create-config, @knip/language-server and @knip/mcp, all maintained in the webpro-nl/knip monorepo under packages/.

Official sources

  1. License: ISC
  2. Project website
  3. README
  4. Releases
  5. webpro-nl/knip on GitHub
Community

Where developers are discussing it

Posts on Hacker News, dev.to and Lobsters that link to this repository, found by our scan of those communities. 1 in the last 30 days; newest first.

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/webpro-nl-knip.svg)](https://hysenlabs.com/projects/webpro-nl-knip)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/webpro-nl-knip.svg)](https://hysenlabs.com/projects/webpro-nl-knip)

Was this useful?