Knip
Find and fix unused dependencies, exports and files in TypeScript/JavaScript projects.
Linting and formatting npm ISC
Used in agent projects
150
1.2% of 12,697 public repos built with AI coding agents
Rank in linting and formatting
#5 of 40
by use in those projects
Downloads
17.5M
npm, last 7 days, knip
GitHub stars
12.4K
last push Oct 9, 2026
How Knip is used
Knip is a dependency in 150 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (1.2%), #5 of 40 in linting and formatting. The most used alternative there is ESLint. Projects that use it most often also use Vitest (62.7%), Playwright (JavaScript) (46.7%), TypeScript (91.3%). It is more common in projects set up for OpenAI Codex (8.0%) than for GitHub Copilot (2.3%).
Often used with Knip
| Vitest | 62.7% of Knip projects · 5.1× more than average |
|---|---|
| Playwright (JavaScript) | 46.7% of Knip projects · 5.3× more than average |
| TypeScript | 91.3% of Knip projects · 1.6× more than average |
| Husky | 32.7% of Knip projects · 5.2× more than average |
| Testing Library | 32.0% of Knip projects · 4.4× more than average |
| lint-staged | 30.0% of Knip projects · 6.4× more than average |
| jsdom | 30.0% of Knip projects · 5.6× more than average |
| Prettier | 46.0% of Knip projects · 2.6× more than average |
By coding agent
| Claude Code | 3.1% of projects set up for it |
|---|---|
| GitHub Copilot | 2.3% of projects set up for it |
| Cursor | 2.7% of projects set up for it |
| OpenAI Codex | 8.0% of projects set up for it |
| OpenCode | 6.9% of projects set up for it |
| Gemini CLI | 4.8% of projects set up for it |
| Devin Desktop | 2.9% of projects set up for it |
| Roo Code | 5.3% of projects set up for it |
Share of public repos configured for each agent that list Knip as a dependency.
Install
| Package | npm install knip |
|---|---|
| Main stacks | TypeScript / JavaScript (112), Next.js (27), Python (3), Rust (3) |
| Example projects | getsentry/MobileBuildMCP, Maintainerr/Maintainerr, YFGaia/dify-plus, c15t/c15t, deadlock-mod-manager/deadlock-mod-manager |
Alternatives to Knip
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| ESLint npm Linter that finds and fixes JavaScript code patterns based on AST analysis. |
4,833 (38.1%) | 162M | 27.6K | MIT |
| Prettier npm Opinionated code formatter for JavaScript, TypeScript, and related languages. |
2,218 (17.5%) | 138M | 52.4K | MIT |
| Biome npm Fast web toolchain providing linting, formatting and code quality all in one. |
445 (3.5%) | 17.7M | 25.9K | MIT OR Apache-2.0 |
| oxlint npm Fast JavaScript linter written in Rust with zero-config defaults. |
206 (1.6%) | 25.7M | 23K | MIT |
| stylelint npm Linter that finds and fixes CSS errors and enforces code style conventions. |
140 (1.1%) | 10.8M | 11.5K | MIT |
| oxfmt npm Fast JavaScript formatter from the Oxc compiler project. |
125 (1.0%) | 16.3M | 23K | MIT |
| ESLint Import Resolver TypeScript npm ESLint plugin resolver adding TypeScript support to import/export linting. |
119 (0.9%) | 48.8M | 825 | ISC |
| Black pypi Uncompromising Python code formatter enforcing consistent style automatically. |
108 (0.9%) | 28.7M | 41.9K | — |