@knip/mcp 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/package.json +4 -4
  2. package/src/docs/blog/for-editors-and-agents.md +47 -43
  3. package/src/docs/blog/knip-v4.mdx +2 -2
  4. package/src/docs/blog/two-years.mdx +1 -1
  5. package/src/docs/docs/explanations/comparison-and-migration.md +4 -0
  6. package/src/docs/docs/explanations/plugins.md +20 -2
  7. package/src/docs/docs/features/auto-fix.mdx +2 -2
  8. package/src/docs/docs/guides/issue-reproduction.md +7 -6
  9. package/src/docs/docs/reference/faq.md +1 -3
  10. package/src/docs/explanations/comparison-and-migration.md +2 -0
  11. package/src/docs/explanations/plugins.md +16 -6
  12. package/src/docs/features/auto-fix.mdx +20 -5
  13. package/src/docs/features/monorepos-and-workspaces.md +19 -4
  14. package/src/docs/features/production-mode.md +1 -1
  15. package/src/docs/features/reporters.md +9 -7
  16. package/src/docs/guides/configuring-project-files.md +13 -13
  17. package/src/docs/guides/contributing.md +1 -1
  18. package/src/docs/guides/handling-issues.mdx +183 -121
  19. package/src/docs/guides/issue-reproduction.md +15 -7
  20. package/src/docs/guides/performance.md +19 -8
  21. package/src/docs/guides/troubleshooting.md +7 -10
  22. package/src/docs/guides/using-knip-in-ci.md +16 -20
  23. package/src/docs/index.mdx +3 -3
  24. package/src/docs/overview/configuration.md +6 -6
  25. package/src/docs/overview/features.md +5 -5
  26. package/src/docs/overview/getting-started.mdx +15 -5
  27. package/src/docs/reference/cli.md +269 -243
  28. package/src/docs/reference/configuration-hints.md +146 -0
  29. package/src/docs/reference/configuration.md +24 -7
  30. package/src/docs/reference/faq.md +28 -39
  31. package/src/docs/reference/integrations.md +105 -0
  32. package/src/docs/reference/known-issues.md +43 -21
  33. package/src/docs/reference/plugins.md +9 -1
  34. package/src/docs/reference/related-tooling.md +3 -3
  35. package/src/docs/sponsors.mdx +3 -4
  36. package/src/docs/typescript/unused-exports.md +1 -1
  37. package/src/docs/writing-a-plugin/index.md +16 -3
  38. package/src/tools.js +3 -9
  39. package/src/docs/docs/reference/plugins/angular.md +0 -33
  40. package/src/docs/docs/reference/plugins/astro-db.md +0 -34
  41. package/src/docs/docs/reference/plugins/astro-og-canvas.md +0 -13
  42. package/src/docs/docs/reference/plugins/astro.md +0 -43
  43. package/src/docs/docs/reference/plugins/ava.md +0 -46
  44. package/src/docs/docs/reference/plugins/babel.md +0 -38
  45. package/src/docs/docs/reference/plugins/biome.md +0 -34
  46. package/src/docs/docs/reference/plugins/bumpp.md +0 -38
  47. package/src/docs/docs/reference/plugins/bun.md +0 -13
  48. package/src/docs/docs/reference/plugins/c8.md +0 -26
  49. package/src/docs/docs/reference/plugins/capacitor.md +0 -35
  50. package/src/docs/docs/reference/plugins/changelogen.md +0 -38
  51. package/src/docs/docs/reference/plugins/changelogithub.md +0 -38
  52. package/src/docs/docs/reference/plugins/changesets.md +0 -33
  53. package/src/docs/docs/reference/plugins/commitizen.md +0 -35
  54. package/src/docs/docs/reference/plugins/commitlint.md +0 -39
  55. package/src/docs/docs/reference/plugins/convex.md +0 -34
  56. package/src/docs/docs/reference/plugins/create-typescript-app.md +0 -33
  57. package/src/docs/docs/reference/plugins/cspell.md +0 -36
  58. package/src/docs/docs/reference/plugins/cucumber.md +0 -36
  59. package/src/docs/docs/reference/plugins/cypress.md +0 -40
  60. package/src/docs/docs/reference/plugins/danger.md +0 -33
  61. package/src/docs/docs/reference/plugins/dependency-cruiser.md +0 -44
  62. package/src/docs/docs/reference/plugins/docusaurus.md +0 -39
  63. package/src/docs/docs/reference/plugins/dotenv.md +0 -24
  64. package/src/docs/docs/reference/plugins/drizzle.md +0 -33
  65. package/src/docs/docs/reference/plugins/eleventy.md +0 -38
  66. package/src/docs/docs/reference/plugins/eslint.md +0 -74
  67. package/src/docs/docs/reference/plugins/expo.md +0 -38
  68. package/src/docs/docs/reference/plugins/expressive-code.md +0 -39
  69. package/src/docs/docs/reference/plugins/gatsby.md +0 -46
  70. package/src/docs/docs/reference/plugins/github-action.md +0 -33
  71. package/src/docs/docs/reference/plugins/github-actions.md +0 -34
  72. package/src/docs/docs/reference/plugins/glob.md +0 -26
  73. package/src/docs/docs/reference/plugins/graphql-codegen.md +0 -43
  74. package/src/docs/docs/reference/plugins/hardhat.md +0 -33
  75. package/src/docs/docs/reference/plugins/husky.md +0 -37
  76. package/src/docs/docs/reference/plugins/i18next-parser.md +0 -44
  77. package/src/docs/docs/reference/plugins/jest.md +0 -50
  78. package/src/docs/docs/reference/plugins/karma.md +0 -36
  79. package/src/docs/docs/reference/plugins/knex.md +0 -33
  80. package/src/docs/docs/reference/plugins/ladle.md +0 -40
  81. package/src/docs/docs/reference/plugins/lefthook.md +0 -43
  82. package/src/docs/docs/reference/plugins/lint-staged.md +0 -45
  83. package/src/docs/docs/reference/plugins/linthtml.md +0 -38
  84. package/src/docs/docs/reference/plugins/lockfile-lint.md +0 -38
  85. package/src/docs/docs/reference/plugins/lost-pixel.md +0 -33
  86. package/src/docs/docs/reference/plugins/markdownlint.md +0 -34
  87. package/src/docs/docs/reference/plugins/mdx.md +0 -37
  88. package/src/docs/docs/reference/plugins/mdxlint.md +0 -35
  89. package/src/docs/docs/reference/plugins/metro.md +0 -46
  90. package/src/docs/docs/reference/plugins/mocha.md +0 -48
  91. package/src/docs/docs/reference/plugins/moonrepo.md +0 -35
  92. package/src/docs/docs/reference/plugins/msw.md +0 -36
  93. package/src/docs/docs/reference/plugins/nano-staged.md +0 -36
  94. package/src/docs/docs/reference/plugins/nest.md +0 -38
  95. package/src/docs/docs/reference/plugins/netlify.md +0 -42
  96. package/src/docs/docs/reference/plugins/next-intl.md +0 -33
  97. package/src/docs/docs/reference/plugins/next-mdx.md +0 -36
  98. package/src/docs/docs/reference/plugins/next.md +0 -53
  99. package/src/docs/docs/reference/plugins/nitro.md +0 -50
  100. package/src/docs/docs/reference/plugins/node-modules-inspector.md +0 -45
  101. package/src/docs/docs/reference/plugins/node.md +0 -48
  102. package/src/docs/docs/reference/plugins/nodemon.md +0 -27
  103. package/src/docs/docs/reference/plugins/npm-package-json-lint.md +0 -38
  104. package/src/docs/docs/reference/plugins/nuxt.md +0 -49
  105. package/src/docs/docs/reference/plugins/nx.md +0 -57
  106. package/src/docs/docs/reference/plugins/nyc.md +0 -36
  107. package/src/docs/docs/reference/plugins/oclif.md +0 -33
  108. package/src/docs/docs/reference/plugins/oxlint.md +0 -44
  109. package/src/docs/docs/reference/plugins/parcel.md +0 -37
  110. package/src/docs/docs/reference/plugins/playwright-ct.md +0 -39
  111. package/src/docs/docs/reference/plugins/playwright-test.md +0 -26
  112. package/src/docs/docs/reference/plugins/playwright.md +0 -49
  113. package/src/docs/docs/reference/plugins/plop.md +0 -33
  114. package/src/docs/docs/reference/plugins/pnpm.md +0 -33
  115. package/src/docs/docs/reference/plugins/postcss.md +0 -43
  116. package/src/docs/docs/reference/plugins/preconstruct.md +0 -33
  117. package/src/docs/docs/reference/plugins/prettier.md +0 -36
  118. package/src/docs/docs/reference/plugins/prisma.md +0 -55
  119. package/src/docs/docs/reference/plugins/react-cosmos.md +0 -39
  120. package/src/docs/docs/reference/plugins/react-router.md +0 -34
  121. package/src/docs/docs/reference/plugins/relay.md +0 -52
  122. package/src/docs/docs/reference/plugins/release-it.md +0 -34
  123. package/src/docs/docs/reference/plugins/remark.md +0 -37
  124. package/src/docs/docs/reference/plugins/remix.md +0 -40
  125. package/src/docs/docs/reference/plugins/rollup.md +0 -47
  126. package/src/docs/docs/reference/plugins/rsbuild.md +0 -33
  127. package/src/docs/docs/reference/plugins/rslib.md +0 -33
  128. package/src/docs/docs/reference/plugins/rspack.md +0 -33
  129. package/src/docs/docs/reference/plugins/rstest.md +0 -33
  130. package/src/docs/docs/reference/plugins/semantic-release.md +0 -38
  131. package/src/docs/docs/reference/plugins/sentry.md +0 -35
  132. package/src/docs/docs/reference/plugins/simple-git-hooks.md +0 -35
  133. package/src/docs/docs/reference/plugins/size-limit.md +0 -35
  134. package/src/docs/docs/reference/plugins/sst.md +0 -33
  135. package/src/docs/docs/reference/plugins/starlight.md +0 -33
  136. package/src/docs/docs/reference/plugins/storybook.md +0 -44
  137. package/src/docs/docs/reference/plugins/stryker.md +0 -33
  138. package/src/docs/docs/reference/plugins/stylelint.md +0 -38
  139. package/src/docs/docs/reference/plugins/svelte.md +0 -34
  140. package/src/docs/docs/reference/plugins/sveltekit.md +0 -33
  141. package/src/docs/docs/reference/plugins/svgo.md +0 -37
  142. package/src/docs/docs/reference/plugins/svgr.md +0 -40
  143. package/src/docs/docs/reference/plugins/swc.md +0 -33
  144. package/src/docs/docs/reference/plugins/syncpack.md +0 -38
  145. package/src/docs/docs/reference/plugins/tailwind.md +0 -33
  146. package/src/docs/docs/reference/plugins/tanstack-router.md +0 -48
  147. package/src/docs/docs/reference/plugins/taskfile.md +0 -40
  148. package/src/docs/docs/reference/plugins/travis.md +0 -33
  149. package/src/docs/docs/reference/plugins/ts-node.md +0 -27
  150. package/src/docs/docs/reference/plugins/tsdown.md +0 -45
  151. package/src/docs/docs/reference/plugins/tsup.md +0 -45
  152. package/src/docs/docs/reference/plugins/tsx.md +0 -46
  153. package/src/docs/docs/reference/plugins/typedoc.md +0 -49
  154. package/src/docs/docs/reference/plugins/typescript.md +0 -50
  155. package/src/docs/docs/reference/plugins/unbuild.md +0 -33
  156. package/src/docs/docs/reference/plugins/unocss.md +0 -36
  157. package/src/docs/docs/reference/plugins/vercel-og.md +0 -38
  158. package/src/docs/docs/reference/plugins/vike.md +0 -34
  159. package/src/docs/docs/reference/plugins/vite.md +0 -48
  160. package/src/docs/docs/reference/plugins/vitepress.md +0 -34
  161. package/src/docs/docs/reference/plugins/vitest.md +0 -50
  162. package/src/docs/docs/reference/plugins/vue.md +0 -33
  163. package/src/docs/docs/reference/plugins/webdriver-io.md +0 -33
  164. package/src/docs/docs/reference/plugins/webpack.md +0 -48
  165. package/src/docs/docs/reference/plugins/wireit.md +0 -33
  166. package/src/docs/docs/reference/plugins/wrangler.md +0 -33
  167. package/src/docs/docs/reference/plugins/xo.md +0 -40
  168. package/src/docs/docs/reference/plugins/yarn.md +0 -33
  169. package/src/docs/docs/reference/plugins/yorkie.md +0 -33
  170. package/src/docs/reference/plugins/angular.md +0 -33
  171. package/src/docs/reference/plugins/astro-db.md +0 -34
  172. package/src/docs/reference/plugins/astro.md +0 -43
  173. package/src/docs/reference/plugins/ava.md +0 -46
  174. package/src/docs/reference/plugins/babel.md +0 -38
  175. package/src/docs/reference/plugins/biome.md +0 -34
  176. package/src/docs/reference/plugins/bumpp.md +0 -38
  177. package/src/docs/reference/plugins/bun.md +0 -33
  178. package/src/docs/reference/plugins/c8.md +0 -26
  179. package/src/docs/reference/plugins/capacitor.md +0 -35
  180. package/src/docs/reference/plugins/changelogen.md +0 -38
  181. package/src/docs/reference/plugins/changelogithub.md +0 -38
  182. package/src/docs/reference/plugins/changesets.md +0 -33
  183. package/src/docs/reference/plugins/commitizen.md +0 -35
  184. package/src/docs/reference/plugins/commitlint.md +0 -39
  185. package/src/docs/reference/plugins/convex.md +0 -34
  186. package/src/docs/reference/plugins/create-typescript-app.md +0 -33
  187. package/src/docs/reference/plugins/cspell.md +0 -36
  188. package/src/docs/reference/plugins/cucumber.md +0 -36
  189. package/src/docs/reference/plugins/cypress.md +0 -40
  190. package/src/docs/reference/plugins/danger.md +0 -33
  191. package/src/docs/reference/plugins/dependency-cruiser.md +0 -44
  192. package/src/docs/reference/plugins/docusaurus.md +0 -39
  193. package/src/docs/reference/plugins/dotenv.md +0 -24
  194. package/src/docs/reference/plugins/drizzle.md +0 -33
  195. package/src/docs/reference/plugins/eleventy.md +0 -38
  196. package/src/docs/reference/plugins/eslint.md +0 -74
  197. package/src/docs/reference/plugins/expo.md +0 -38
  198. package/src/docs/reference/plugins/gatsby.md +0 -46
  199. package/src/docs/reference/plugins/github-action.md +0 -33
  200. package/src/docs/reference/plugins/github-actions.md +0 -34
  201. package/src/docs/reference/plugins/glob.md +0 -26
  202. package/src/docs/reference/plugins/graphql-codegen.md +0 -43
  203. package/src/docs/reference/plugins/hardhat.md +0 -33
  204. package/src/docs/reference/plugins/husky.md +0 -37
  205. package/src/docs/reference/plugins/i18next-parser.md +0 -44
  206. package/src/docs/reference/plugins/jest.md +0 -50
  207. package/src/docs/reference/plugins/karma.md +0 -36
  208. package/src/docs/reference/plugins/ladle.md +0 -40
  209. package/src/docs/reference/plugins/lefthook.md +0 -43
  210. package/src/docs/reference/plugins/lint-staged.md +0 -45
  211. package/src/docs/reference/plugins/linthtml.md +0 -38
  212. package/src/docs/reference/plugins/lockfile-lint.md +0 -38
  213. package/src/docs/reference/plugins/lost-pixel.md +0 -33
  214. package/src/docs/reference/plugins/markdownlint.md +0 -34
  215. package/src/docs/reference/plugins/mdx.md +0 -37
  216. package/src/docs/reference/plugins/mdxlint.md +0 -35
  217. package/src/docs/reference/plugins/metro.md +0 -46
  218. package/src/docs/reference/plugins/mocha.md +0 -48
  219. package/src/docs/reference/plugins/moonrepo.md +0 -35
  220. package/src/docs/reference/plugins/msw.md +0 -36
  221. package/src/docs/reference/plugins/nano-staged.md +0 -36
  222. package/src/docs/reference/plugins/nest.md +0 -38
  223. package/src/docs/reference/plugins/netlify.md +0 -42
  224. package/src/docs/reference/plugins/next-intl.md +0 -33
  225. package/src/docs/reference/plugins/next-mdx.md +0 -36
  226. package/src/docs/reference/plugins/next.md +0 -53
  227. package/src/docs/reference/plugins/node-modules-inspector.md +0 -45
  228. package/src/docs/reference/plugins/node.md +0 -48
  229. package/src/docs/reference/plugins/nodemon.md +0 -27
  230. package/src/docs/reference/plugins/npm-package-json-lint.md +0 -38
  231. package/src/docs/reference/plugins/nuxt.md +0 -49
  232. package/src/docs/reference/plugins/nx.md +0 -57
  233. package/src/docs/reference/plugins/nyc.md +0 -36
  234. package/src/docs/reference/plugins/oclif.md +0 -33
  235. package/src/docs/reference/plugins/oxlint.md +0 -44
  236. package/src/docs/reference/plugins/playwright-ct.md +0 -39
  237. package/src/docs/reference/plugins/playwright-test.md +0 -26
  238. package/src/docs/reference/plugins/playwright.md +0 -49
  239. package/src/docs/reference/plugins/plop.md +0 -33
  240. package/src/docs/reference/plugins/pnpm.md +0 -33
  241. package/src/docs/reference/plugins/postcss.md +0 -43
  242. package/src/docs/reference/plugins/preconstruct.md +0 -33
  243. package/src/docs/reference/plugins/prettier.md +0 -36
  244. package/src/docs/reference/plugins/prisma.md +0 -55
  245. package/src/docs/reference/plugins/react-cosmos.md +0 -39
  246. package/src/docs/reference/plugins/react-router.md +0 -34
  247. package/src/docs/reference/plugins/relay.md +0 -52
  248. package/src/docs/reference/plugins/release-it.md +0 -34
  249. package/src/docs/reference/plugins/remark.md +0 -37
  250. package/src/docs/reference/plugins/remix.md +0 -40
  251. package/src/docs/reference/plugins/rollup.md +0 -47
  252. package/src/docs/reference/plugins/rsbuild.md +0 -33
  253. package/src/docs/reference/plugins/rslib.md +0 -33
  254. package/src/docs/reference/plugins/rspack.md +0 -33
  255. package/src/docs/reference/plugins/rstest.md +0 -33
  256. package/src/docs/reference/plugins/semantic-release.md +0 -38
  257. package/src/docs/reference/plugins/sentry.md +0 -35
  258. package/src/docs/reference/plugins/simple-git-hooks.md +0 -35
  259. package/src/docs/reference/plugins/size-limit.md +0 -36
  260. package/src/docs/reference/plugins/sst.md +0 -33
  261. package/src/docs/reference/plugins/starlight.md +0 -33
  262. package/src/docs/reference/plugins/storybook.md +0 -44
  263. package/src/docs/reference/plugins/stryker.md +0 -33
  264. package/src/docs/reference/plugins/stylelint.md +0 -38
  265. package/src/docs/reference/plugins/svelte.md +0 -37
  266. package/src/docs/reference/plugins/svgo.md +0 -37
  267. package/src/docs/reference/plugins/svgr.md +0 -40
  268. package/src/docs/reference/plugins/swc.md +0 -33
  269. package/src/docs/reference/plugins/syncpack.md +0 -38
  270. package/src/docs/reference/plugins/tailwind.md +0 -33
  271. package/src/docs/reference/plugins/taskfile.md +0 -34
  272. package/src/docs/reference/plugins/travis.md +0 -33
  273. package/src/docs/reference/plugins/ts-node.md +0 -27
  274. package/src/docs/reference/plugins/tsdown.md +0 -45
  275. package/src/docs/reference/plugins/tsup.md +0 -45
  276. package/src/docs/reference/plugins/tsx.md +0 -46
  277. package/src/docs/reference/plugins/typedoc.md +0 -49
  278. package/src/docs/reference/plugins/typescript.md +0 -50
  279. package/src/docs/reference/plugins/unbuild.md +0 -33
  280. package/src/docs/reference/plugins/unocss.md +0 -36
  281. package/src/docs/reference/plugins/vercel-og.md +0 -38
  282. package/src/docs/reference/plugins/vike.md +0 -34
  283. package/src/docs/reference/plugins/vite.md +0 -48
  284. package/src/docs/reference/plugins/vitest.md +0 -50
  285. package/src/docs/reference/plugins/vue.md +0 -33
  286. package/src/docs/reference/plugins/webdriver-io.md +0 -33
  287. package/src/docs/reference/plugins/webpack.md +0 -48
  288. package/src/docs/reference/plugins/wireit.md +0 -33
  289. package/src/docs/reference/plugins/wrangler.md +0 -33
  290. package/src/docs/reference/plugins/xo.md +0 -40
  291. package/src/docs/reference/plugins/yarn.md +0 -33
  292. package/src/docs/reference/plugins/yorkie.md +0 -33
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knip/mcp",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Knip MCP Server",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,15 +20,15 @@
20
20
  ],
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "https://github.com/webpro-nl/knip",
23
+ "url": "git+https://github.com/webpro-nl/knip.git",
24
24
  "directory": "packages/mcp-server"
25
25
  },
26
26
  "author": "Lars Kappert <lars@webpro.nl>",
27
27
  "license": "ISC",
28
28
  "dependencies": {
29
- "@modelcontextprotocol/sdk": "^1.25.1",
29
+ "@modelcontextprotocol/sdk": "^1.25.3",
30
30
  "zod": "^4.1.11",
31
- "knip": "^5.83.0"
31
+ "knip": "^5.84.0"
32
32
  },
33
33
  "engines": {
34
34
  "node": ">=18.18.0"
@@ -7,32 +7,34 @@ sidebar:
7
7
 
8
8
  _Published: 2025-12-17_
9
9
 
10
- Three years in, Knip has founds its place in [over 10.000 projects][1] and is
10
+ Three years in, Knip has found its place in [over 10.000 projects][1] and is
11
11
  downloaded [over 18M times/month][2]. A long period of steady growth in usage
12
12
  and stability allows Knip to become more accessible to more people. That's why
13
- I'm excited and proud to introduce the brand new VS Code Extension **and** MCP
14
- Server. For humans and coding agents alike, Knip will help keep your codebases
15
- tidy.
13
+ I'm excited and proud to introduce the brand new [Editor Extension][3] **and**
14
+ MCP Server. For humans and coding agents alike, Knip will help keep your
15
+ codebases tidy.
16
16
 
17
17
  Don't forget... Knip it before you ship it!
18
18
 
19
- ## VS Code/Open VSX Extension
19
+ ## Editor Extension
20
20
 
21
21
  This one is for you.
22
22
 
23
- [The usual suspects][3] like red squiggles for unused exports are there. What
23
+ [The usual suspects][4] like red squiggles for unused exports are there. What
24
24
  really moves the needle for DX with Knip's module graph is **navigation**. A
25
- completely unique way to view & fly through codebases for developers who care.
26
- Connect the dots during development and refactors, while keeping things in
27
- check. We're starting out with [3 key features][4]:
25
+ completely unique way to view & fly through codebases. Connect the dots during
26
+ development and refactors, while keeping things in check. We're starting out
27
+ with [3 key features][5]:
28
28
 
29
29
  1. **Hover over Export** for import & usage locations
30
30
  2. **Imports Tree View** for direct links to implementations
31
31
  3. **Exports Tree View** for direct links to import & usage locations
32
32
 
33
- Find [Knip on the VS Code Marketplace][5].
33
+ The extension has a [built-in MCP Server][6] with a command and resources to
34
+ configure Knip for you, _completely automated_.
34
35
 
35
- **EDIT:** Or find [Knip on the Open VSX Registry][6].
36
+ Find [Knip on the VS Code Marketplace][7] and find [Knip in the Open VSX
37
+ Registry][8].
36
38
 
37
39
  ## MCP Server
38
40
 
@@ -41,7 +43,7 @@ coding agent to "configure knip" and it will RTFM so you don't have to. Using a
41
43
  newer model like Opus 4.5 or GPT 5.2 results in an optimized `knip.json` file
42
44
  and an uncluttered codebase.
43
45
 
44
- The [MCP Server is available][7] separately and built into the VS Code
46
+ The [MCP Server is available][9] separately and built into the VS Code
45
47
  Extension.
46
48
 
47
49
  ## Language Server
@@ -53,25 +55,25 @@ information. Queries like "where is an export imported" or "is this import part
53
55
  of a circular dependency" are just scratching the surface here.
54
56
 
55
57
  Extensions for other IDEs can be built on top. See
56
- [language-server/README.md][8]
58
+ [language-server/README.md][10]
57
59
 
58
60
  ## Screenshots
59
61
 
60
- - [Lint Findings][3]
61
- - [Imports & Exports][4]
62
- - [Contention][9]
63
- - [Circular Dependencies][10]
64
- - [Conflicts][11]
65
- - [Branching][12]
66
- - [VS Code Extension Settings][13]
62
+ - [Lint Findings][4]
63
+ - [Imports & Exports][5]
64
+ - [Contention][11]
65
+ - [Circular Dependencies][12]
66
+ - [Conflicts][13]
67
+ - [Branching][14]
68
+ - [VS Code Extension Settings][15]
67
69
 
68
70
  ### Lint Findings
69
71
 
70
- ![Lint Findings][14]
72
+ ![Lint Findings][16]
71
73
 
72
74
  ### Imports & Exports
73
75
 
74
- ![hover][15]
76
+ ![hover][17]
75
77
 
76
78
  ### Contention
77
79
 
@@ -83,7 +85,7 @@ branched/diamond-shaped import chains.
83
85
 
84
86
  If an import is part of a circular dependency, Knip will display:
85
87
 
86
- ![Circular Dependencies][16]
88
+ ![Circular Dependencies][18]
87
89
 
88
90
  #### Conflicts
89
91
 
@@ -91,7 +93,7 @@ TypeScript shows direct conflicts when importing or re-exporting the same named
91
93
  export from different files. Except when the problem is more subtle and the
92
94
  chain spans more than one file. Knip warns:
93
95
 
94
- ![Conflicts][17]
96
+ ![Conflicts][19]
95
97
 
96
98
  #### Branching
97
99
 
@@ -99,29 +101,31 @@ Branched or diamond-shaped imports chains indicate unnecessary re-exports and
99
101
  complexity. They help to untangle large codebases and shrink or get rid of
100
102
  barrel files. Knip warns:
101
103
 
102
- ![Branching][18]
104
+ ![Branching][20]
103
105
 
104
106
  ### VS Code Extension Settings
105
107
 
106
- ![VS Code Extension Settings][19]
108
+ ![VS Code Extension Settings][21]
107
109
 
108
110
  [1]: https://github.com/webpro-nl/knip/network/dependents
109
111
  [2]: https://www.npmjs.com/package/knip
110
- [3]: #lint-findings
111
- [4]: #imports--exports
112
- [5]: https://marketplace.visualstudio.com/items?itemName=webpro.vscode-knip
113
- [6]: https://open-vsx.org/extension/webpro/vscode-knip
114
- [7]: https://www.npmjs.com/package/@knip/mcp
115
- [8]:
112
+ [3]: #editor-extension
113
+ [4]: #lint-findings
114
+ [5]: #imports--exports
115
+ [6]: #mcp-server
116
+ [7]: https://marketplace.visualstudio.com/items?itemName=webpro.vscode-knip
117
+ [8]: https://open-vsx.org/extension/webpro/vscode-knip
118
+ [9]: https://www.npmjs.com/package/@knip/mcp
119
+ [10]:
116
120
  https://github.com/webpro-nl/knip/blob/main/packages/language-server/README.md
117
- [9]: #contention
118
- [10]: #circular-dependencies
119
- [11]: #conflicts
120
- [12]: #branching
121
- [13]: #vs-code-extension-settings
122
- [14]: /screenshots/editors-and-agents/diagnostics.webp
123
- [15]: /screenshots/editors-and-agents/imports-exports.webp
124
- [16]: /screenshots/editors-and-agents/circular-dependency.webp
125
- [17]: /screenshots/editors-and-agents/conflict.webp
126
- [18]: /screenshots/editors-and-agents/branch.webp
127
- [19]: /screenshots/editors-and-agents/vscode-extension-settings.webp
121
+ [11]: #contention
122
+ [12]: #circular-dependencies
123
+ [13]: #conflicts
124
+ [14]: #branching
125
+ [15]: #vs-code-extension-settings
126
+ [16]: /screenshots/editors-and-agents/diagnostics.webp
127
+ [17]: /screenshots/editors-and-agents/imports-exports.webp
128
+ [18]: /screenshots/editors-and-agents/circular-dependency.webp
129
+ [19]: /screenshots/editors-and-agents/conflict.webp
130
+ [20]: /screenshots/editors-and-agents/branch.webp
131
+ [21]: /screenshots/editors-and-agents/vscode-extension-settings.webp
@@ -144,6 +144,6 @@ Remember, Knip it before you ship it! Have a great day ☀️
144
144
 
145
145
  [1]: ./slim-down-to-speed-up.md
146
146
  [2]: ../features/compilers.md
147
- [3]: ../guides/issue-reproduction
147
+ [3]: ../guides/issue-reproduction.md
148
148
  [4]: https://github.com/sponsors/webpro
149
- [5]: ../reference/cli#--experimental-tags
149
+ [5]: ../reference/cli.md#--experimental-tags
@@ -101,7 +101,7 @@ Thanks to Joshua Goldberg for [emoji-blast][7]! 🎉
101
101
  [1]: https://www.npmjs.com/package/exportman/v/0.0.1
102
102
  [2]: /cow-with-orange-scissors-van-gogh-style.webp
103
103
  [3]: https://github.com/webpro-nl/knip/releases/tag/5.31.0
104
- [4]: ../features/auto-fix.md
104
+ [4]: ../features/auto-fix.mdx
105
105
  [5]: https://github.com/unjs/jiti
106
106
  [6]: /sponsors
107
107
  [7]: https://www.emojiblast.dev
@@ -36,6 +36,8 @@ depcheck
36
36
  knip --dependencies
37
37
  ```
38
38
 
39
+ **Project status**: The project is archived and recommends Knip.
40
+
39
41
  ### unimported
40
42
 
41
43
  > Find and fix dangling files and unused dependencies in your JavaScript
@@ -95,6 +97,8 @@ Use `knip --exports` to also include class and enum members.
95
97
  on a single `tsconfig.json` file (`includes` and `excludes`) and requires no
96
98
  configuration. It removes the `export` keyword or the whole export declaration.
97
99
 
100
+ **Project status**: The project is archived and recommends Knip.
101
+
98
102
  ## Related projects
99
103
 
100
104
  Additional alternative and related projects include:
@@ -86,8 +86,8 @@ plugins contain `package.json` in the list of `config` files.
86
86
 
87
87
  :::tip[Summary]
88
88
 
89
- Plugins parse `config` files to find external dependencies. Knip uses this to
90
- determine unused and unlisted dependencies.
89
+ Plugins load configuration files to find referenced dependencies, and determine
90
+ unused and unlisted dependencies.
91
91
 
92
92
  :::
93
93
 
@@ -304,6 +304,23 @@ playwright test -c playwright.web.config.ts
304
304
 
305
305
  Please see [script parser][10] for more details.
306
306
 
307
+ ## Config File Location
308
+
309
+ If configuration files aren't in their default location and they are not
310
+ referenced through some script like `vite -c ./dir/vite.config.ts`, then make
311
+ sure to tell Knip about it. Two examples:
312
+
313
+ ```json title="knip.jsonc"
314
+ {
315
+ "playwright": { "config": ["e2e/playwright.config.ts"] },
316
+ "vite": "packages/*/vite.config.ts" // shorthand without `config` and array notation
317
+ }
318
+ ```
319
+
320
+ This is common in projects where a directory like `packages/lib` is not an
321
+ actual workspace with a `package.json` file. Also see [integrated monorepos][11]
322
+ for similar cases.
323
+
307
324
  ## Summary
308
325
 
309
326
  :::tip[Summary]
@@ -327,3 +344,4 @@ Plugins are configured with two distinct types of files:
327
344
  [8]: ../reference/plugins/vitest.md
328
345
  [9]: ../guides/handling-issues.mdx#conditional-or-dynamic-dependencies
329
346
  [10]: ../features/script-parser.md
347
+ [11]: ../features/integrated-monorepos.md
@@ -42,10 +42,10 @@ knip --fix --allow-remove-files
42
42
 
43
43
  Use `--fix-type` to fix only specific issue types:
44
44
 
45
- - `files`
45
+ - `dependencies`
46
46
  - `exports`
47
47
  - `types`
48
- - `dependencies`
48
+ - `files`
49
49
  - `catalog`
50
50
 
51
51
  Example:
@@ -73,17 +73,17 @@ Other solutions to share a minimal and reproducible case may work well too,
73
73
  including:
74
74
 
75
75
  - A public repository on e.g. GitHub or GitLab.
76
- - A new [fixtures folder in the Knip repository][9].
76
+ - A pull request with a new [test][9] and/or [fixture folder][10].
77
77
 
78
78
  The goal is to have an easy and common understanding and reproduction. If you're
79
79
  unable to create a reproduction using one of the methods described then please
80
- clearly explain this in the issue or [contact me][10].
80
+ clearly explain this in the issue or [contact me][11].
81
81
 
82
82
  ## Pull Request
83
83
 
84
84
  The optimal way is to add fixtures and failing tests to the Knip repository, and
85
85
  open a pull request to discuss the issue! Also see [instructions for
86
- development][11].
86
+ development][12].
87
87
 
88
88
  [1]: https://github.com/webpro-nl/knip/issues?q=is%3Aissue
89
89
  [2]: https://knip.dev/reference/known-issues
@@ -97,6 +97,7 @@ development][11].
97
97
  https://stackblitz.com/github/webpro-nl/knip/tree/main/templates/issue-reproduction/monorepo
98
98
  [7]: https://codesandbox.io
99
99
  [8]: https://stackblitz.com
100
- [9]: https://github.com/webpro-nl/knip/tree/main/packages/knip/fixtures
101
- [10]: https://github.com/webpro
102
- [11]: https://github.com/webpro-nl/knip/blob/main/.github/DEVELOPMENT.md
100
+ [9]: https://github.com/webpro-nl/knip/blob/main/.github/DEVELOPMENT.md#tests
101
+ [10]: https://github.com/webpro-nl/knip/tree/main/packages/knip/fixtures
102
+ [11]: https://github.com/webpro
103
+ [12]: https://github.com/webpro-nl/knip/blob/main/.github/DEVELOPMENT.md
@@ -405,10 +405,8 @@ Examples of features that have been requested include:
405
405
  - Analyze workspaces in parallel
406
406
  - Support Deno
407
407
  - Improve internal code structures and accessibility to support contributions
408
- - One-shot dead code removal (more comprehensive removal of unused variables,
409
- duplicate exports, dead code, etc).
410
408
  - Replace dependencies for better performance and correctness, such as for shell
411
- script parsing, module resolution and globbing with "unignores".
409
+ script parsing and globbing with "unignores".
412
410
 
413
411
  These are all interesting ideas, but most increase the API surface area, and all
414
412
  require more development efforts and maintenance. Time is limited and
@@ -95,6 +95,8 @@ Use `knip --exports` to also include class and enum members.
95
95
  on a single `tsconfig.json` file (`includes` and `excludes`) and requires no
96
96
  configuration. It removes the `export` keyword or the whole export declaration.
97
97
 
98
+ **Project status**: The project is archived and recommends Knip.
99
+
98
100
  ## Related projects
99
101
 
100
102
  Additional alternative and related projects include:
@@ -73,7 +73,7 @@ export default defineConfig({
73
73
  });
74
74
  ```
75
75
 
76
- The Vitest plugin reads this configuration and return two dependencies:
76
+ The Vitest plugin reads this configuration and returns two dependencies:
77
77
 
78
78
  - `@vitest/coverage-istanbul`
79
79
  - `vitest-environment-happy-dom`
@@ -108,7 +108,7 @@ configured.
108
108
 
109
109
  :::tip[Plugins result in less configuration]
110
110
 
111
- Plugins uses entry file patterns as defined in the configuration files of these
111
+ Plugins uses entry file patterns as defined in your configuration file of these
112
112
  tools. So you don't need to repeat this in your Knip configuration.
113
113
 
114
114
  :::
@@ -242,7 +242,8 @@ dependency.
242
242
 
243
243
  :::tip[Summary]
244
244
 
245
- Plugins can find additional entry files when parsing config files.
245
+ In your config files, plugins can find additional entry files and also other
246
+ config files recursively.
246
247
 
247
248
  :::
248
249
 
@@ -283,6 +284,14 @@ automatically added as `entry` files for Knip to **statically** resolve the
283
284
 
284
285
  Additionally, `./setup-tests.ts` will be added as an `entry` file.
285
286
 
287
+ :::note
288
+
289
+ When plugins dynamically load configuration files, conditional dependencies may
290
+ not be detected if the condition evaluates differently during analysis. See
291
+ [conditional or dynamic dependencies][9] for details and workarounds.
292
+
293
+ :::
294
+
286
295
  ## Command-Line Arguments
287
296
 
288
297
  Plugins may define the arguments where Knip should look for entry files,
@@ -293,7 +302,7 @@ node --loader tsx scripts/deploy.ts
293
302
  playwright test -c playwright.web.config.ts
294
303
  ```
295
304
 
296
- Please see [script parser][9] for more details.
305
+ Please see [script parser][10] for more details.
297
306
 
298
307
  ## Summary
299
308
 
@@ -309,11 +318,12 @@ Plugins are configured with two distinct types of files:
309
318
  :::
310
319
 
311
320
  [1]: ../reference/plugins.md
312
- [2]: ../guides/writing-a-plugin.md
321
+ [2]: ../writing-a-plugin/index.md
313
322
  [3]: #configuration-files
314
323
  [4]: #entry-files
315
324
  [5]: #command-line-arguments
316
325
  [6]: ./entry-files.md
317
326
  [7]: ../reference/plugins/eslint.md
318
327
  [8]: ../reference/plugins/vitest.md
319
- [9]: ../features/script-parser.md
328
+ [9]: ../guides/handling-issues.mdx#conditional-or-dynamic-dependencies
329
+ [10]: ../features/script-parser.md
@@ -9,13 +9,13 @@ Run Knip as you normally would, and if the report looks good then run it again
9
9
  with the `--fix` flag to let Knip automatically apply fixes. It fixes the
10
10
  following [issue types][1]:
11
11
 
12
- - Remove `export` keyword for unused exports and exported types
12
+ - Remove `export` keyword for unused exports, re-exports, and exported types
13
13
  - Remove `export default` keywords for unused default exports
14
- - Remove exports, re-exports and exported types
15
14
  - Remove unused enum members
16
15
  - Remove unused class members (disabled by default)
17
16
  - Remove unused `dependencies` and `devDependencies` from `package.json`
18
17
  - Remove unused files
18
+ - Remove unused catalog entries
19
19
 
20
20
  :::caution
21
21
 
@@ -91,9 +91,9 @@ configuration in your project.
91
91
 
92
92
  ### 2. Unused variables
93
93
 
94
- Use a tool like ESLint or Biome to find and remove unused variables inside
95
- files. Even better, try [remove-unused-vars][3] to remove unused variables
96
- within files.
94
+ Use a tool like ESLint or Biome to find and remove unused imports and variables
95
+ inside files. Even better, try [remove-unused-vars][3] to remove unused
96
+ variables within files.
97
97
 
98
98
  This may result in more deleted code, and Knip may then find more unused code.
99
99
  Rinse and repeat!
@@ -316,6 +316,20 @@ component are unused and will remove those.
316
316
 
317
317
  Note that [`classMembers` aren't included by default][4].
318
318
 
319
+ ### Catalog entries
320
+
321
+ Unused [catalog][5] entries are removed from `pnpm-workspace.yaml`:
322
+
323
+ ```diff title="pnpm-workspace.yaml"
324
+ packages:
325
+ - 'packages/*'
326
+ catalog:
327
+ react: ^18.0.0
328
+ - unused-package: ^1.0.0
329
+ ```
330
+
331
+ Catalogs in `package.json` are supported as well.
332
+
319
333
  ## What's not included
320
334
 
321
335
  Operations that auto-fix does not (yet) perform and why:
@@ -331,3 +345,4 @@ Operations that auto-fix does not (yet) perform and why:
331
345
  [2]: https://github.com/JoshuaKGoldberg/formatly
332
346
  [3]: https://github.com/webpro-nl/remove-unused-vars
333
347
  [4]: ../guides/handling-issues.mdx#class-members
348
+ [5]: https://pnpm.io/catalogs
@@ -100,16 +100,31 @@ The following options are available inside workspace configurations:
100
100
  Use `--debug` for verbose output and see the workspaces Knip includes, their
101
101
  configurations, enabled plugins, glob options and resolved files.
102
102
 
103
- ## Lint a single workspace
103
+ ## Filter workspaces
104
104
 
105
- Use the `--workspace` (or `-W`) argument to focus on a single workspace (and let
106
- Knip run faster). Example:
105
+ Use the `--workspace` (or `-W`) argument to select one or more workspaces:
107
106
 
108
107
  ```sh
109
108
  knip --workspace packages/my-lib
110
109
  ```
111
110
 
112
- This will include the target workspace, but also ancestor and dependent
111
+ The filter supports multiple formats:
112
+
113
+ ```sh
114
+ knip --workspace @myorg/my-lib # Package name
115
+ knip --workspace '@myorg/*' # Package name glob
116
+ knip --workspace packages/my-lib # Directory path
117
+ knip --workspace './apps/*' # Directory glob
118
+ ```
119
+
120
+ Combine selectors to include or exclude workspaces:
121
+
122
+ ```sh
123
+ knip --workspace @myorg/* --workspace '!@myorg/legacy'
124
+ knip --workspace './apps/*' --workspace '@shared/utils'
125
+ ```
126
+
127
+ This will include the target workspace(s), but also ancestor and dependent
113
128
  workspaces. For two reasons:
114
129
 
115
130
  - Ancestor workspaces may list dependencies in `package.json` the linted
@@ -37,7 +37,7 @@ Here's what's included in production mode:
37
37
  - Only `entry` and `project` patterns suffixed with `!`
38
38
  - Only production `entry` file patterns exported by plugins (such as Next.js and
39
39
  Remix)
40
- - Only the `start` and `postinstall` scripts
40
+ - Only the `start` script (of `package.json#scripts`)
41
41
  - Ignore exports with the [`@internal` tag][1]
42
42
 
43
43
  :::note
@@ -79,16 +79,18 @@ The keys match the [reported issue types][6]. Example usage:
79
79
  knip --reporter json
80
80
  ```
81
81
 
82
- ### Github Actions
83
-
84
- TODO
82
+ ### GitHub Actions
85
83
 
84
+ Use the GitHub Actions reporter in a workflow for annotations in pull requests.
86
85
  Example usage:
87
86
 
88
87
  ```sh
89
88
  knip --reporter github-actions
90
89
  ```
91
90
 
91
+ Changed files in pull requests will now contain inline annotations for lint
92
+ findings.
93
+
92
94
  ### Markdown
93
95
 
94
96
  The built-in `markdown` reporter output is meant to be saved to a Markdown file.
@@ -138,8 +140,8 @@ dangling.js
138
140
  <summary>Unused dependencies (2)</summary>
139
141
 
140
142
  ```
141
- unused-dep package.json
142
- my-package package.json
143
+ my-package package.json:17:5
144
+ unused-dep package.json:20:5
143
145
  ```
144
146
 
145
147
  </details>
@@ -162,8 +164,8 @@ dangling.js
162
164
  <summary>Unused dependencies (2)</summary>
163
165
 
164
166
  ```
165
- unused-dep package.json
166
- my-package package.json
167
+ my-package package.json:17:5
168
+ unused-dep package.json:20:5
167
169
  ```
168
170
 
169
171
  </details>
@@ -11,7 +11,7 @@ Knip faster:
11
11
  - Start with defaults. Only add targeted `entry` overrides when needed.
12
12
  - Use `project` patterns (with negations) to define the scope for Knip.
13
13
  - Use production mode to exclude tests and other non-production files.
14
- - Use `ignore` only to suppress issues in specific files. It does not exclude
14
+ - Use `ignore` only to suppress issues in specific files; it does not exclude
15
15
  files from analysis.
16
16
 
17
17
  Let's dive in and expand on all of these.
@@ -41,7 +41,7 @@ and adjust `project` to fit your codebase.
41
41
  Use negated `project` patterns to precisely include/exclude files for unused
42
42
  files detection.
43
43
 
44
- Use `ignore` to suppress issues in matching files; it does not remove those
44
+ Use `ignore*` to suppress specific issues in matching files; it does not exclude
45
45
  files from analysis.
46
46
 
47
47
  :::
@@ -87,12 +87,12 @@ positives)? Use negated `project` patterns:
87
87
  }
88
88
  ```
89
89
 
90
- Why is this better:
90
+ Why this is better:
91
91
 
92
- - `project` defines "what belongs to the codebase" so build outputs are not part
93
- of the analysis and don't appear in unused file detection at all
92
+ - `project` defines what belongs to the codebase, so build outputs are excluded
93
+ from analysis and unused file detection
94
94
  - `ignore` is for the few files that should be analyzed but contain exceptions
95
- - increases performance by analyzing only source files
95
+ - Improves performance by analyzing fewer files
96
96
 
97
97
  ## Ignore issues in specific files
98
98
 
@@ -127,8 +127,8 @@ instead.
127
127
  }
128
128
  ```
129
129
 
130
- Why not: `ignore` only hides issues from the report; it does not exclude files
131
- from analysis.
130
+ Why not: `ignore` hides issues from the report; it does not exclude files from
131
+ analysis.
132
132
 
133
133
  ❌   Also don't do this:
134
134
 
@@ -138,8 +138,8 @@ from analysis.
138
138
  }
139
139
  ```
140
140
 
141
- Why not: plugins for test frameworks add test file as `entry` files, you can't
142
- and shouldn't override that globally.
141
+ Why not: plugins add test files as `entry` files; you can't and shouldn't
142
+ override that globally.
143
143
 
144
144
  ❌   Or this:
145
145
 
@@ -149,8 +149,8 @@ and shouldn't override that globally.
149
149
  }
150
150
  ```
151
151
 
152
- Why not: `project` is used for unused file detection. Negating test files here
153
- is ineffective, because they're `entry` files.
152
+ Why not: `project` is for unused file detection; negating test files is
153
+ ineffective because they are `entry` files.
154
154
 
155
155
  ✅   Do this instead:
156
156
 
@@ -200,6 +200,6 @@ automatically added as well.
200
200
 
201
201
  [1]: ../typescript/unused-exports.md
202
202
  [2]: ../explanations/entry-files.md
203
- [3]: ../reference/configuration#ignoreexportsusedinfile
203
+ [3]: ../reference/configuration.md#ignoreexportsusedinfile
204
204
  [4]: ../features/production-mode.md
205
205
  [5]: ../explanations/plugins.md#entry-files
@@ -20,5 +20,5 @@ contributes to that goal is welcome!
20
20
  [1]: https://github.com/webpro-nl/knip
21
21
  [2]: ./issue-reproduction.md
22
22
  [3]: https://github.com/webpro-nl/knip/blob/main/.github/CONTRIBUTING.md
23
- [4]: ./writing-a-plugin.md
23
+ [4]: ../writing-a-plugin/index.md
24
24
  [5]: https://github.com/webpro-nl/knip/blob/main/.github/DEVELOPMENT.md