knip README

The project's README from github.com/webpro-nl/knip. As one markdown file: README.md.


Knip

NPM Version NPM Downloads GitHub Repo stars

Knip finds and fixes unused dependencies, exports and files in your JavaScript and TypeScript projects. Less code and dependencies lead to improved performance, less maintenance and easier refactorings.

Getting started

Install Knip and run it to lint your project:

npm init @knip/config
npm run knip

See Getting Started for more package managers and installation options.

Coding agents

Let your coding agent configure Knip using the Knip MCP Server:

Install the Knip MCP Server (@knip/mcp) and use it to configure Knip in this
project.

You may need to restart your agent session after installing the server.

Contributors

Special thanks to the wonderful people who have contributed to Knip!

Knip

/'knɪp/ means "(to) cut" and is pronounced with a hard "K" 🇳🇱

License

Knip is free and open-source software licensed under the ISC License.

Parts of Knip have been inspired by and/or partially copy code from the following projects:

knip (webpro-nl/knip)

Searching Database…

12.7K ·GitHub
What is this?Knip is a free and open-source tool that finds unused files, dependencies and exports in your JavaScript and TypeScript projects, so you can cut them before you ship.
Is it a command-line tool, a library, or an editor extension?Primarily a CLI: the main knip npm package scans your project from the terminal, with companion packages around it — including an official VS Code extension and an MCP package.
How do I run it on my project?Knip is an npm package: add it to your JavaScript or TypeScript project and run it over the codebase, and it reports what is unused. Full setup docs live at knip.dev.
Does it need anything besides Node to run?No — being an npm package, it runs in a plain Node.js environment against your repo; there is no server, account or API key involved.
Will it work on projects in other languages, like Python or Go?No — Knip is built specifically for JavaScript and TypeScript codebases; for anything else you would need a different tool.
Is there an editor integration, or is it terminal-only?There is an official Knip extension on the VS Code Marketplace (also on Open VSX), built on the @knip/language-server package, alongside the CLI.
Why bother removing unused dependencies and exports at all?That is the README's whole pitch: less code and fewer dependencies lead to improved performance, less maintenance and easier refactorings.
What does the name Knip mean?It is Dutch for '(to) cut' — hence the scissors in the logo — and is pronounced with a hard 'K'.
Does Knip work with AI coding agents?Yes — @knip/mcp is an official companion package for hooking Knip into coding agents over MCP (Model Context Protocol).
What is @knip/create-config for?It is the official helper for generating a Knip configuration file, so you do not have to write one from scratch when your project needs custom settings.
Creator
webpro-nl
Size
34 MB
Stars
12.7K
Age
4y
Commits · 90 Days