@knip/mcp 0.0.3 → 0.0.5

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.
@@ -73,10 +73,11 @@ This will give a lengthy output, including:
73
73
 
74
74
  ## Trace
75
75
 
76
- Use `--trace` to see where all exports are used. Or be more specific:
76
+ Use `--trace` to see where exports or dependencies are used:
77
77
 
78
78
  - Use `--trace-file [path]` to output this only for the given file.
79
79
  - Use `--trace-export [name]` to output this only for the given export name.
80
+ - Use `--trace-dependency [name]` to find where a dependency is imported
80
81
  - Use both to trace a specific named or default export of a certain file.
81
82
 
82
83
  This works across re-exports, barrel files and workspaces. Here's an example
@@ -87,6 +88,13 @@ screenshot:
87
88
  It's like a reversed module graph. Instead of traversing imports it goes in the
88
89
  opposite direction and shows where exports are imported.
89
90
 
91
+ The `--trace-dependency` accepts strings for exact matches, but if it looks like
92
+ a regex that works too:
93
+
94
+ <img src="/screenshots/trace-dependency.png" alt="trace dependency" class="mw500" />
95
+
96
+ Use [--workspace \[dir\]][8] to filter accordingly.
97
+
90
98
  #### Legend
91
99
 
92
100
  | | Description |
@@ -101,16 +109,16 @@ If you want to open an issue, please see [issue reproduction][6].
101
109
 
102
110
  ## Understanding Knip
103
111
 
104
- Looking to better understand how Knip works? The [entry files][8] and
105
- [plugins][9] explanations cover two core concepts. After this you might want to
106
- check out features like [production mode][10] and [monorepos & workspaces][11].
112
+ Looking to better understand how Knip works? The [entry files][9] and
113
+ [plugins][10] explanations cover two core concepts. After this you might want to
114
+ check out features like [production mode][11] and [monorepos & workspaces][12].
107
115
 
108
- In a more general sense, [Why use Knip?][12] explains what Knip can do for you.
116
+ In a more general sense, [Why use Knip?][13] explains what Knip can do for you.
109
117
 
110
118
  ## Asking for help
111
119
 
112
120
  If you can't find your answer in any of the aforementioned resources, feel free
113
- to [open an issue on GitHub][13].
121
+ to [open an issue on GitHub][14].
114
122
 
115
123
  [1]: #lint-issues-reported-by-knip
116
124
  [2]: #exceptions-thrown-by-knip
@@ -119,9 +127,10 @@ to [open an issue on GitHub][13].
119
127
  [5]: ../guides/handling-issues.md
120
128
  [6]: ./issue-reproduction.md
121
129
  [7]: ../reference/known-issues.md
122
- [8]: ../explanations/entry-files.md
123
- [9]: ../explanations/plugins.md
124
- [10]: ../features/production-mode.md
125
- [11]: ../features/monorepos-and-workspaces.md
126
- [12]: ../explanations/why-use-knip.md
127
- [13]: https://github.com/webpro-nl/knip/issues
130
+ [8]: ../reference/cli.md#--workspace-dir
131
+ [9]: ../explanations/entry-files.md
132
+ [10]: ../explanations/plugins.md
133
+ [11]: ../features/production-mode.md
134
+ [12]: ../features/monorepos-and-workspaces.md
135
+ [13]: ../explanations/why-use-knip.md
136
+ [14]: https://github.com/webpro-nl/knip/issues
@@ -155,6 +155,10 @@ Trace exports to see where they are imported.
155
155
 
156
156
  Also see [Trace][7].
157
157
 
158
+ ### `--trace-dependency [name]`
159
+
160
+ Trace package or binary name to see where it's referenced. Implies [--trace][8].
161
+
158
162
  ### `--trace-export [name]`
159
163
 
160
164
  Trace export name to see where it's imported. Implies [--trace][8].
@@ -73,10 +73,11 @@ This will give a lengthy output, including:
73
73
 
74
74
  ## Trace
75
75
 
76
- Use `--trace` to see where all exports are used. Or be more specific:
76
+ Use `--trace` to see where exports or dependencies are used:
77
77
 
78
78
  - Use `--trace-file [path]` to output this only for the given file.
79
79
  - Use `--trace-export [name]` to output this only for the given export name.
80
+ - Use `--trace-dependency [name]` to find where a dependency is imported
80
81
  - Use both to trace a specific named or default export of a certain file.
81
82
 
82
83
  This works across re-exports, barrel files and workspaces. Here's an example
@@ -87,6 +88,13 @@ screenshot:
87
88
  It's like a reversed module graph. Instead of traversing imports it goes in the
88
89
  opposite direction and shows where exports are imported.
89
90
 
91
+ The `--trace-dependency` accepts strings for exact matches, but if it looks like
92
+ a regex that works too:
93
+
94
+ <img src="/screenshots/trace-dependency.png" alt="trace dependency" class="mw500" />
95
+
96
+ Use [--workspace \[dir\]][8] to filter accordingly.
97
+
90
98
  #### Legend
91
99
 
92
100
  | | Description |
@@ -101,16 +109,16 @@ If you want to open an issue, please see [issue reproduction][6].
101
109
 
102
110
  ## Understanding Knip
103
111
 
104
- Looking to better understand how Knip works? The [entry files][8] and
105
- [plugins][9] explanations cover two core concepts. After this you might want to
106
- check out features like [production mode][10] and [monorepos & workspaces][11].
112
+ Looking to better understand how Knip works? The [entry files][9] and
113
+ [plugins][10] explanations cover two core concepts. After this you might want to
114
+ check out features like [production mode][11] and [monorepos & workspaces][12].
107
115
 
108
- In a more general sense, [Why use Knip?][12] explains what Knip can do for you.
116
+ In a more general sense, [Why use Knip?][13] explains what Knip can do for you.
109
117
 
110
118
  ## Asking for help
111
119
 
112
120
  If you can't find your answer in any of the aforementioned resources, feel free
113
- to [open an issue on GitHub][13].
121
+ to [open an issue on GitHub][14].
114
122
 
115
123
  [1]: #lint-issues-reported-by-knip
116
124
  [2]: #exceptions-thrown-by-knip
@@ -119,9 +127,10 @@ to [open an issue on GitHub][13].
119
127
  [5]: ../guides/handling-issues.md
120
128
  [6]: ./issue-reproduction.md
121
129
  [7]: ../reference/known-issues.md
122
- [8]: ../explanations/entry-files.md
123
- [9]: ../explanations/plugins.md
124
- [10]: ../features/production-mode.md
125
- [11]: ../features/monorepos-and-workspaces.md
126
- [12]: ../explanations/why-use-knip.md
127
- [13]: https://github.com/webpro-nl/knip/issues
130
+ [8]: ../reference/cli.md#--workspace-dir
131
+ [9]: ../explanations/entry-files.md
132
+ [10]: ../explanations/plugins.md
133
+ [11]: ../features/production-mode.md
134
+ [12]: ../features/monorepos-and-workspaces.md
135
+ [13]: ../explanations/why-use-knip.md
136
+ [14]: https://github.com/webpro-nl/knip/issues
@@ -155,6 +155,10 @@ Trace exports to see where they are imported.
155
155
 
156
156
  Also see [Trace][7].
157
157
 
158
+ ### `--trace-dependency [name]`
159
+
160
+ Trace package or binary name to see where it's referenced. Implies [--trace][8].
161
+
158
162
  ### `--trace-export [name]`
159
163
 
160
164
  Trace export name to see where it's imported. Implies [--trace][8].
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knip/mcp",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Knip MCP Server",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,7 +31,7 @@
31
31
  "license": "ISC",
32
32
  "dependencies": {
33
33
  "@modelcontextprotocol/sdk": "^1.24.3",
34
- "knip": "^5.75.2",
34
+ "knip": "workspace:*",
35
35
  "zod": "^4.1.11"
36
36
  },
37
37
  "engines": {