@enjoys/context-engine 1.0.0

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 (138) hide show
  1. package/README.md +213 -0
  2. package/data/commands/air.json +59 -0
  3. package/data/commands/ansible.json +24 -0
  4. package/data/commands/apachectl.json +87 -0
  5. package/data/commands/apt-get.json +81 -0
  6. package/data/commands/apt.json +91 -0
  7. package/data/commands/awk.json +26 -0
  8. package/data/commands/aws-vault.json +140 -0
  9. package/data/commands/aws.json +229 -0
  10. package/data/commands/az.json +36 -0
  11. package/data/commands/bazel.json +103 -0
  12. package/data/commands/brew.json +140 -0
  13. package/data/commands/bun.json +230 -0
  14. package/data/commands/caddy.json +194 -0
  15. package/data/commands/cargo.json +1048 -0
  16. package/data/commands/cat.json +18 -0
  17. package/data/commands/cd.json +48 -0
  18. package/data/commands/certbot.json +148 -0
  19. package/data/commands/chmod.json +97 -0
  20. package/data/commands/choco.json +134 -0
  21. package/data/commands/chown.json +59 -0
  22. package/data/commands/clickhouse-client.json +74 -0
  23. package/data/commands/cloudflare.json +226 -0
  24. package/data/commands/cmake.json +110 -0
  25. package/data/commands/cockroach.json +92 -0
  26. package/data/commands/conda.json +94 -0
  27. package/data/commands/consul.json +125 -0
  28. package/data/commands/cp.json +86 -0
  29. package/data/commands/curl.json +44 -0
  30. package/data/commands/cypress.json +100 -0
  31. package/data/commands/deno.json +29 -0
  32. package/data/commands/django-admin.json +86 -0
  33. package/data/commands/dnf.json +137 -0
  34. package/data/commands/docker.json +1100 -0
  35. package/data/commands/doctl.json +156 -0
  36. package/data/commands/eslint.json +69 -0
  37. package/data/commands/find.json +44 -0
  38. package/data/commands/firebase.json +97 -0
  39. package/data/commands/flask.json +79 -0
  40. package/data/commands/flyctl.json +148 -0
  41. package/data/commands/gcloud.json +227 -0
  42. package/data/commands/gh.json +39 -0
  43. package/data/commands/git.json +527 -0
  44. package/data/commands/glab.json +116 -0
  45. package/data/commands/go.json +161 -0
  46. package/data/commands/gofmt.json +51 -0
  47. package/data/commands/golangci-lint.json +89 -0
  48. package/data/commands/gradle.json +44 -0
  49. package/data/commands/grep.json +47 -0
  50. package/data/commands/gunicorn.json +83 -0
  51. package/data/commands/helm.json +1104 -0
  52. package/data/commands/hg.json +92 -0
  53. package/data/commands/httpd.json +147 -0
  54. package/data/commands/influx.json +119 -0
  55. package/data/commands/iptables.json +86 -0
  56. package/data/commands/java.json +31 -0
  57. package/data/commands/jest.json +82 -0
  58. package/data/commands/journalctl.json +88 -0
  59. package/data/commands/just.json +93 -0
  60. package/data/commands/k6.json +84 -0
  61. package/data/commands/kubectl.json +1277 -0
  62. package/data/commands/linode-cli.json +117 -0
  63. package/data/commands/locust.json +83 -0
  64. package/data/commands/ls.json +115 -0
  65. package/data/commands/make.json +86 -0
  66. package/data/commands/mocha.json +75 -0
  67. package/data/commands/mongosh.json +73 -0
  68. package/data/commands/mv.json +68 -0
  69. package/data/commands/mvn.json +45 -0
  70. package/data/commands/mysql.json +81 -0
  71. package/data/commands/nest.json +69 -0
  72. package/data/commands/netlify.json +92 -0
  73. package/data/commands/next.json +71 -0
  74. package/data/commands/nft.json +105 -0
  75. package/data/commands/nginx.json +146 -0
  76. package/data/commands/nmap.json +92 -0
  77. package/data/commands/node.json +43 -0
  78. package/data/commands/nomad.json +139 -0
  79. package/data/commands/npm.json +1265 -0
  80. package/data/commands/npx.json +58 -0
  81. package/data/commands/nx.json +82 -0
  82. package/data/commands/openssl.json +288 -0
  83. package/data/commands/packer.json +92 -0
  84. package/data/commands/pacman.json +82 -0
  85. package/data/commands/pg_dump.json +83 -0
  86. package/data/commands/pg_restore.json +74 -0
  87. package/data/commands/pip.json +95 -0
  88. package/data/commands/pipenv.json +79 -0
  89. package/data/commands/pipx.json +53 -0
  90. package/data/commands/playwright.json +97 -0
  91. package/data/commands/pnpm.json +29 -0
  92. package/data/commands/poetry.json +96 -0
  93. package/data/commands/prettier.json +71 -0
  94. package/data/commands/ps.json +31 -0
  95. package/data/commands/psql.json +124 -0
  96. package/data/commands/pulumi.json +130 -0
  97. package/data/commands/pytest.json +92 -0
  98. package/data/commands/python.json +30 -0
  99. package/data/commands/railway.json +91 -0
  100. package/data/commands/redis-cli.json +148 -0
  101. package/data/commands/render.json +72 -0
  102. package/data/commands/rm.json +79 -0
  103. package/data/commands/rsync.json +36 -0
  104. package/data/commands/rust.json +35 -0
  105. package/data/commands/rustup.json +103 -0
  106. package/data/commands/scp.json +60 -0
  107. package/data/commands/sed.json +28 -0
  108. package/data/commands/sqlite3.json +68 -0
  109. package/data/commands/ssh-keygen.json +112 -0
  110. package/data/commands/ssh.json +37 -0
  111. package/data/commands/sudo.json +147 -0
  112. package/data/commands/supabase.json +108 -0
  113. package/data/commands/svn.json +75 -0
  114. package/data/commands/systemctl.json +31 -0
  115. package/data/commands/tar.json +35 -0
  116. package/data/commands/tcpdump.json +77 -0
  117. package/data/commands/terraform.json +824 -0
  118. package/data/commands/terragrunt.json +83 -0
  119. package/data/commands/tsc.json +85 -0
  120. package/data/commands/turbo.json +72 -0
  121. package/data/commands/ufw.json +76 -0
  122. package/data/commands/unzip.json +59 -0
  123. package/data/commands/uvicorn.json +73 -0
  124. package/data/commands/vault.json +144 -0
  125. package/data/commands/vercel.json +98 -0
  126. package/data/commands/vite.json +63 -0
  127. package/data/commands/vitest.json +88 -0
  128. package/data/commands/wasm-pack.json +90 -0
  129. package/data/commands/wget.json +38 -0
  130. package/data/commands/winget.json +131 -0
  131. package/data/commands/wireshark.json +81 -0
  132. package/data/commands/yarn.json +28 -0
  133. package/data/commands/yum.json +98 -0
  134. package/data/commands/zip.json +59 -0
  135. package/index.d.ts +131 -0
  136. package/index.js +189 -0
  137. package/index.mjs +21 -0
  138. package/package.json +64 -0
@@ -0,0 +1,1265 @@
1
+ {
2
+ "name": "npm",
3
+ "description": "Node.js package manager",
4
+ "category": "node-ecosystem",
5
+ "platforms": ["linux", "macos", "windows"],
6
+ "shells": ["bash", "zsh", "fish", "powershell"],
7
+ "subcommands": [
8
+ {
9
+ "name": "init",
10
+ "description": "Create a new package.json file",
11
+ "options": [
12
+ { "name": "--yes", "short": "-y", "description": "Accept all defaults without prompting" },
13
+ { "name": "--scope", "description": "Create a scoped package", "type": "string" },
14
+ { "name": "--workspace", "short": "-w", "description": "Create in specified workspace", "type": "string" }
15
+ ],
16
+ "args": [
17
+ { "name": "<initializer>", "type": "string", "required": false, "description": "Package initializer (e.g. react-app, vite)" }
18
+ ],
19
+ "examples": [
20
+ "npm init",
21
+ "npm init -y",
22
+ "npm init @scope",
23
+ "npm init react-app my-app",
24
+ "npm init vite@latest my-project"
25
+ ]
26
+ },
27
+ {
28
+ "name": "install",
29
+ "description": "Install project dependencies or specific packages",
30
+ "args": [
31
+ { "name": "<package>", "type": "string", "required": false, "description": "Package name or spec (name@version, name@tag, tarball, git url)" }
32
+ ],
33
+ "options": [
34
+ { "name": "--save-dev", "short": "-D", "description": "Save to devDependencies" },
35
+ { "name": "--save-exact", "short": "-E", "description": "Save exact version instead of range" },
36
+ { "name": "--save-optional", "short": "-O", "description": "Save to optionalDependencies" },
37
+ { "name": "--save-peer", "description": "Save to peerDependencies" },
38
+ { "name": "--global", "short": "-g", "description": "Install globally" },
39
+ { "name": "--no-save", "description": "Do not save to package.json" },
40
+ { "name": "--production", "description": "Do not install devDependencies" },
41
+ { "name": "--omit", "description": "Omit dependency type (dev, optional, peer)", "type": "string" },
42
+ { "name": "--legacy-peer-deps", "description": "Ignore peerDependency conflicts" },
43
+ { "name": "--force", "short": "-f", "description": "Force fetching even if local copy exists" },
44
+ { "name": "--dry-run", "description": "Report what would be installed without installing" },
45
+ { "name": "--ignore-scripts", "description": "Do not run pre/post/install scripts" },
46
+ { "name": "--no-optional", "description": "Do not install optional dependencies" },
47
+ { "name": "--prefer-offline", "description": "Use cached data when possible" },
48
+ { "name": "--package-lock-only", "description": "Only update package-lock.json" },
49
+ { "name": "--strict-peer-deps", "description": "Fail on peerDependency conflicts" },
50
+ { "name": "--workspace", "short": "-w", "description": "Install in specified workspace", "type": "string" },
51
+ { "name": "--workspaces", "short": "-ws", "description": "Install across all workspaces" },
52
+ { "name": "--install-strategy", "description": "Install strategy: hoisted, nested, shallow, linked", "type": "string" },
53
+ { "name": "--fund", "description": "Show funding message", "type": "boolean" }
54
+ ],
55
+ "examples": [
56
+ "npm install",
57
+ "npm install express",
58
+ "npm install -D typescript @types/node",
59
+ "npm install -g nodemon",
60
+ "npm install react@18.2.0",
61
+ "npm install react@latest",
62
+ "npm install --save-exact lodash",
63
+ "npm install --legacy-peer-deps",
64
+ "npm install --omit=dev",
65
+ "npm install github:user/repo",
66
+ "npm install ./local-package.tgz",
67
+ "npm install -w packages/server express"
68
+ ]
69
+ },
70
+ {
71
+ "name": "uninstall",
72
+ "description": "Remove a package",
73
+ "args": [
74
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name to remove" }
75
+ ],
76
+ "options": [
77
+ { "name": "--save-dev", "short": "-D", "description": "Remove from devDependencies" },
78
+ { "name": "--global", "short": "-g", "description": "Remove global package" },
79
+ { "name": "--no-save", "description": "Do not remove from package.json" },
80
+ { "name": "--workspace", "short": "-w", "description": "Remove from specified workspace", "type": "string" }
81
+ ],
82
+ "examples": [
83
+ "npm uninstall lodash",
84
+ "npm uninstall -D typescript",
85
+ "npm uninstall -g nodemon",
86
+ "npm uninstall -w packages/server express"
87
+ ]
88
+ },
89
+ {
90
+ "name": "update",
91
+ "description": "Update packages to latest version satisfying semver range",
92
+ "args": [
93
+ { "name": "<package>", "type": "string", "required": false, "description": "Package name (omit to update all)" }
94
+ ],
95
+ "options": [
96
+ { "name": "--global", "short": "-g", "description": "Update global packages" },
97
+ { "name": "--save", "short": "-S", "description": "Save updated versions to package.json" },
98
+ { "name": "--dry-run", "description": "Show what would be updated" },
99
+ { "name": "--workspace", "short": "-w", "description": "Update in specified workspace", "type": "string" },
100
+ { "name": "--workspaces", "short": "-ws", "description": "Update across all workspaces" }
101
+ ],
102
+ "examples": [
103
+ "npm update",
104
+ "npm update express",
105
+ "npm update -g",
106
+ "npm update --save"
107
+ ]
108
+ },
109
+ {
110
+ "name": "run",
111
+ "description": "Run an arbitrary package script",
112
+ "args": [
113
+ { "name": "<script>", "type": "string", "required": true, "description": "Script name defined in package.json scripts" },
114
+ { "name": "-- <args>", "type": "string", "required": false, "description": "Arguments passed to the script" }
115
+ ],
116
+ "options": [
117
+ { "name": "--silent", "short": "-s", "description": "Suppress npm output, only show script output" },
118
+ { "name": "--if-present", "description": "Do not error if script is missing" },
119
+ { "name": "--ignore-scripts", "description": "Do not run pre/post scripts" },
120
+ { "name": "--workspace", "short": "-w", "description": "Run script in specified workspace", "type": "string" },
121
+ { "name": "--workspaces", "short": "-ws", "description": "Run in all workspaces" },
122
+ { "name": "--include-workspace-root", "description": "Include root workspace when using --workspaces" }
123
+ ],
124
+ "examples": [
125
+ "npm run build",
126
+ "npm run dev",
127
+ "npm run test -- --watch",
128
+ "npm run lint -- --fix",
129
+ "npm run -s build",
130
+ "npm run build --if-present",
131
+ "npm run build -w packages/server",
132
+ "npm run build --workspaces"
133
+ ]
134
+ },
135
+ {
136
+ "name": "run-script",
137
+ "description": "Run an arbitrary package script (alias for run)",
138
+ "args": [
139
+ { "name": "<script>", "type": "string", "required": true, "description": "Script name from package.json" }
140
+ ],
141
+ "examples": [
142
+ "npm run-script build",
143
+ "npm run-script test"
144
+ ]
145
+ },
146
+ {
147
+ "name": "start",
148
+ "description": "Run the start script (defaults to node server.js)",
149
+ "options": [
150
+ { "name": "--ignore-scripts", "description": "Do not run pre/post scripts" }
151
+ ],
152
+ "examples": [
153
+ "npm start",
154
+ "npm start -- --port 3000"
155
+ ]
156
+ },
157
+ {
158
+ "name": "test",
159
+ "description": "Run the test script",
160
+ "options": [
161
+ { "name": "--ignore-scripts", "description": "Do not run pre/post scripts" }
162
+ ],
163
+ "examples": [
164
+ "npm test",
165
+ "npm test -- --coverage",
166
+ "npm test -- --watchAll",
167
+ "npm t"
168
+ ]
169
+ },
170
+ {
171
+ "name": "build",
172
+ "description": "Build the package (runs the build script)",
173
+ "examples": [
174
+ "npm run build"
175
+ ]
176
+ },
177
+ {
178
+ "name": "publish",
179
+ "description": "Publish a package to the registry",
180
+ "args": [
181
+ { "name": "<tarball|folder>", "type": "string", "required": false, "description": "Tarball or folder to publish" }
182
+ ],
183
+ "options": [
184
+ { "name": "--tag", "description": "Publish with given dist-tag", "type": "string" },
185
+ { "name": "--access", "description": "Set access level (public, restricted)", "type": "string" },
186
+ { "name": "--otp", "description": "One-time password for 2FA", "type": "string" },
187
+ { "name": "--dry-run", "description": "Report what would be published without publishing" },
188
+ { "name": "--registry", "description": "Publish to specified registry", "type": "string" },
189
+ { "name": "--workspace", "short": "-w", "description": "Publish specified workspace", "type": "string" },
190
+ { "name": "--workspaces", "short": "-ws", "description": "Publish all workspaces" },
191
+ { "name": "--provenance", "description": "Generate provenance statement" }
192
+ ],
193
+ "examples": [
194
+ "npm publish",
195
+ "npm publish --access public",
196
+ "npm publish --tag beta",
197
+ "npm publish --dry-run",
198
+ "npm publish --otp 123456",
199
+ "npm publish --provenance"
200
+ ]
201
+ },
202
+ {
203
+ "name": "pack",
204
+ "description": "Create a tarball from a package",
205
+ "args": [
206
+ { "name": "<package-spec>", "type": "string", "required": false, "description": "Package spec to pack" }
207
+ ],
208
+ "options": [
209
+ { "name": "--dry-run", "description": "Report contents without creating tarball" },
210
+ { "name": "--json", "description": "Output as JSON" },
211
+ { "name": "--pack-destination", "description": "Directory for the tarball", "type": "string" },
212
+ { "name": "--workspace", "short": "-w", "description": "Pack specified workspace", "type": "string" }
213
+ ],
214
+ "examples": [
215
+ "npm pack",
216
+ "npm pack --dry-run",
217
+ "npm pack --json",
218
+ "npm pack ./packages/my-lib"
219
+ ]
220
+ },
221
+ {
222
+ "name": "link",
223
+ "description": "Symlink a package for local development",
224
+ "args": [
225
+ { "name": "<package>", "type": "string", "required": false, "description": "Package name or folder to link" }
226
+ ],
227
+ "options": [
228
+ { "name": "--global", "short": "-g", "description": "Create global link" },
229
+ { "name": "--workspace", "short": "-w", "description": "Link in specified workspace", "type": "string" }
230
+ ],
231
+ "examples": [
232
+ "npm link",
233
+ "npm link my-package",
234
+ "npm link ../my-local-lib"
235
+ ]
236
+ },
237
+ {
238
+ "name": "unlink",
239
+ "description": "Remove a symlinked package",
240
+ "args": [
241
+ { "name": "<package>", "type": "string", "required": false, "description": "Package to unlink" }
242
+ ],
243
+ "examples": [
244
+ "npm unlink",
245
+ "npm unlink my-package"
246
+ ]
247
+ },
248
+ {
249
+ "name": "ls",
250
+ "description": "List installed packages",
251
+ "args": [
252
+ { "name": "<package>", "type": "string", "required": false, "description": "Filter by package name" }
253
+ ],
254
+ "options": [
255
+ { "name": "--all", "short": "-a", "description": "Show all packages, not just top-level" },
256
+ { "name": "--depth", "description": "Max display depth of dependency tree", "type": "number" },
257
+ { "name": "--json", "description": "Output as JSON" },
258
+ { "name": "--long", "short": "-l", "description": "Show extended information" },
259
+ { "name": "--parseable", "short": "-p", "description": "Output parseable results" },
260
+ { "name": "--global", "short": "-g", "description": "List global packages" },
261
+ { "name": "--production", "description": "Only show production dependencies" },
262
+ { "name": "--omit", "description": "Omit dependency type", "type": "string" },
263
+ { "name": "--workspace", "short": "-w", "description": "List in specified workspace", "type": "string" }
264
+ ],
265
+ "examples": [
266
+ "npm ls",
267
+ "npm ls --depth=0",
268
+ "npm ls --json",
269
+ "npm ls -g --depth=0",
270
+ "npm ls react",
271
+ "npm ls --all",
272
+ "npm ls --parseable"
273
+ ]
274
+ },
275
+ {
276
+ "name": "outdated",
277
+ "description": "Check for outdated packages",
278
+ "args": [
279
+ { "name": "<package>", "type": "string", "required": false, "description": "Check specific package" }
280
+ ],
281
+ "options": [
282
+ { "name": "--json", "description": "Output as JSON" },
283
+ { "name": "--long", "short": "-l", "description": "Show extended information" },
284
+ { "name": "--parseable", "short": "-p", "description": "Output parseable results" },
285
+ { "name": "--global", "short": "-g", "description": "Check global packages" },
286
+ { "name": "--all", "short": "-a", "description": "Show all outdated packages" },
287
+ { "name": "--workspace", "short": "-w", "description": "Check in specified workspace", "type": "string" }
288
+ ],
289
+ "examples": [
290
+ "npm outdated",
291
+ "npm outdated --json",
292
+ "npm outdated --long",
293
+ "npm outdated -g"
294
+ ]
295
+ },
296
+ {
297
+ "name": "audit",
298
+ "description": "Run a security audit on installed packages",
299
+ "options": [
300
+ { "name": "--json", "description": "Output as JSON" },
301
+ { "name": "--production", "description": "Only audit production dependencies" },
302
+ { "name": "--omit", "description": "Omit dependency type from audit", "type": "string" },
303
+ { "name": "--audit-level", "description": "Minimum vulnerability level to report (info, low, moderate, high, critical)", "type": "string" },
304
+ { "name": "--fix", "description": "Automatically install compatible updated versions for vulnerable deps" },
305
+ { "name": "--force", "description": "Install semver-major updates to vulnerable deps with --fix" },
306
+ { "name": "--dry-run", "description": "Report fixes without installing them" },
307
+ { "name": "--workspace", "short": "-w", "description": "Audit specified workspace", "type": "string" },
308
+ { "name": "--workspaces", "short": "-ws", "description": "Audit all workspaces" }
309
+ ],
310
+ "subcommands": [
311
+ {
312
+ "name": "fix",
313
+ "description": "Automatically fix audit vulnerabilities",
314
+ "options": [
315
+ { "name": "--force", "description": "Install semver-major updates" },
316
+ { "name": "--dry-run", "description": "Report without installing" }
317
+ ],
318
+ "examples": [
319
+ "npm audit fix",
320
+ "npm audit fix --force",
321
+ "npm audit fix --dry-run"
322
+ ]
323
+ }
324
+ ],
325
+ "examples": [
326
+ "npm audit",
327
+ "npm audit --json",
328
+ "npm audit --audit-level=high",
329
+ "npm audit --production",
330
+ "npm audit fix",
331
+ "npm audit fix --force",
332
+ "npm audit fix --dry-run",
333
+ "npm audit --omit=dev"
334
+ ]
335
+ },
336
+ {
337
+ "name": "fund",
338
+ "description": "Display funding information for installed packages",
339
+ "args": [
340
+ { "name": "<package>", "type": "string", "required": false, "description": "Show funding for specific package" }
341
+ ],
342
+ "options": [
343
+ { "name": "--json", "description": "Output as JSON" },
344
+ { "name": "--which", "description": "Positional index of funding source to open", "type": "number" },
345
+ { "name": "--workspace", "short": "-w", "description": "Show funding in specified workspace", "type": "string" }
346
+ ],
347
+ "examples": [
348
+ "npm fund",
349
+ "npm fund express",
350
+ "npm fund --json"
351
+ ]
352
+ },
353
+ {
354
+ "name": "login",
355
+ "description": "Log in to the npm registry",
356
+ "options": [
357
+ { "name": "--registry", "description": "Registry URL to log in to", "type": "string" },
358
+ { "name": "--scope", "description": "Associate login with scope", "type": "string" },
359
+ { "name": "--auth-type", "description": "Authentication type (legacy, web)", "type": "string" }
360
+ ],
361
+ "examples": [
362
+ "npm login",
363
+ "npm login --registry=https://registry.company.com",
364
+ "npm login --scope=@myorg"
365
+ ]
366
+ },
367
+ {
368
+ "name": "logout",
369
+ "description": "Log out of the npm registry",
370
+ "options": [
371
+ { "name": "--registry", "description": "Registry URL", "type": "string" },
372
+ { "name": "--scope", "description": "Scope to log out of", "type": "string" }
373
+ ],
374
+ "examples": [
375
+ "npm logout",
376
+ "npm logout --registry=https://registry.company.com"
377
+ ]
378
+ },
379
+ {
380
+ "name": "whoami",
381
+ "description": "Display the current logged-in npm username",
382
+ "options": [
383
+ { "name": "--registry", "description": "Check against specified registry", "type": "string" }
384
+ ],
385
+ "examples": [
386
+ "npm whoami"
387
+ ]
388
+ },
389
+ {
390
+ "name": "cache",
391
+ "description": "Manage the npm cache",
392
+ "subcommands": [
393
+ {
394
+ "name": "clean",
395
+ "description": "Remove all items from the cache",
396
+ "options": [
397
+ { "name": "--force", "description": "Force cache clean (required)" }
398
+ ],
399
+ "examples": [
400
+ "npm cache clean --force"
401
+ ]
402
+ },
403
+ {
404
+ "name": "ls",
405
+ "description": "List contents of the cache",
406
+ "examples": [
407
+ "npm cache ls"
408
+ ]
409
+ },
410
+ {
411
+ "name": "verify",
412
+ "description": "Verify cache integrity and remove corrupted content",
413
+ "examples": [
414
+ "npm cache verify"
415
+ ]
416
+ }
417
+ ],
418
+ "examples": [
419
+ "npm cache clean --force",
420
+ "npm cache verify",
421
+ "npm cache ls"
422
+ ]
423
+ },
424
+ {
425
+ "name": "config",
426
+ "description": "Manage npm configuration",
427
+ "subcommands": [
428
+ {
429
+ "name": "list",
430
+ "description": "Show all config settings",
431
+ "options": [
432
+ { "name": "--json", "description": "Output as JSON" },
433
+ { "name": "--long", "short": "-l", "description": "Show all defaults and descriptions" }
434
+ ],
435
+ "examples": [
436
+ "npm config list",
437
+ "npm config list --json",
438
+ "npm config list -l"
439
+ ]
440
+ },
441
+ {
442
+ "name": "set",
443
+ "description": "Set a config key-value pair",
444
+ "args": [
445
+ { "name": "<key>=<value>", "type": "string", "required": true, "description": "Config key and value" }
446
+ ],
447
+ "options": [
448
+ { "name": "--global", "short": "-g", "description": "Set in global config" },
449
+ { "name": "--location", "description": "Where to set: user, global, or project", "type": "string" }
450
+ ],
451
+ "examples": [
452
+ "npm config set registry https://registry.npmjs.org/",
453
+ "npm config set init-author-name \"Your Name\"",
454
+ "npm config set save-exact true",
455
+ "npm config set @myorg:registry https://npm.myorg.com",
456
+ "npm config set //registry.npmjs.org/:_authToken $TOKEN"
457
+ ]
458
+ },
459
+ {
460
+ "name": "get",
461
+ "description": "Get the value of a config key",
462
+ "args": [
463
+ { "name": "<key>", "type": "string", "required": true, "description": "Config key to retrieve" }
464
+ ],
465
+ "examples": [
466
+ "npm config get registry",
467
+ "npm config get prefix",
468
+ "npm config get cache"
469
+ ]
470
+ },
471
+ {
472
+ "name": "delete",
473
+ "description": "Delete a config key",
474
+ "args": [
475
+ { "name": "<key>", "type": "string", "required": true, "description": "Config key to delete" }
476
+ ],
477
+ "examples": [
478
+ "npm config delete registry",
479
+ "npm config delete proxy"
480
+ ]
481
+ },
482
+ {
483
+ "name": "edit",
484
+ "description": "Open the config file in an editor",
485
+ "options": [
486
+ { "name": "--global", "short": "-g", "description": "Edit global config" }
487
+ ],
488
+ "examples": [
489
+ "npm config edit",
490
+ "npm config edit --global"
491
+ ]
492
+ }
493
+ ],
494
+ "examples": [
495
+ "npm config list",
496
+ "npm config set registry https://registry.npmjs.org/",
497
+ "npm config get registry",
498
+ "npm config delete proxy",
499
+ "npm config edit"
500
+ ]
501
+ },
502
+ {
503
+ "name": "search",
504
+ "description": "Search the npm registry for packages",
505
+ "args": [
506
+ { "name": "<search-terms>", "type": "string", "required": true, "description": "Search terms" }
507
+ ],
508
+ "options": [
509
+ { "name": "--json", "description": "Output as JSON" },
510
+ { "name": "--long", "short": "-l", "description": "Show detailed results" },
511
+ { "name": "--parseable", "short": "-p", "description": "Parseable output" },
512
+ { "name": "--searchlimit", "description": "Max number of results", "type": "number" },
513
+ { "name": "--registry", "description": "Search against specified registry", "type": "string" }
514
+ ],
515
+ "examples": [
516
+ "npm search express",
517
+ "npm search react --json",
518
+ "npm search webpack --long"
519
+ ]
520
+ },
521
+ {
522
+ "name": "view",
523
+ "description": "View registry info about a package",
524
+ "args": [
525
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" },
526
+ { "name": "<field>", "type": "string", "required": false, "description": "Specific field to view" }
527
+ ],
528
+ "options": [
529
+ { "name": "--json", "description": "Output as JSON" },
530
+ { "name": "--registry", "description": "Use specified registry", "type": "string" }
531
+ ],
532
+ "examples": [
533
+ "npm view express",
534
+ "npm view express version",
535
+ "npm view express versions --json",
536
+ "npm view express dependencies",
537
+ "npm view express dist-tags",
538
+ "npm view express repository.url"
539
+ ]
540
+ },
541
+ {
542
+ "name": "info",
543
+ "description": "View registry info about a package (alias for view)",
544
+ "args": [
545
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
546
+ ],
547
+ "options": [
548
+ { "name": "--json", "description": "Output as JSON" }
549
+ ],
550
+ "examples": [
551
+ "npm info express",
552
+ "npm info react versions"
553
+ ]
554
+ },
555
+ {
556
+ "name": "version",
557
+ "description": "Bump the package version",
558
+ "args": [
559
+ { "name": "<newversion>", "type": "string", "required": false, "description": "Version or increment (major, minor, patch, premajor, preminor, prepatch, prerelease, from-git)" }
560
+ ],
561
+ "options": [
562
+ { "name": "--preid", "description": "Prerelease identifier (alpha, beta, rc)", "type": "string" },
563
+ { "name": "--no-git-tag-version", "description": "Do not create git tag" },
564
+ { "name": "--no-commit-hooks", "description": "Do not run git commit hooks" },
565
+ { "name": "--allow-same-version", "description": "Allow same version bump" },
566
+ { "name": "--json", "description": "Output as JSON" },
567
+ { "name": "--workspace", "short": "-w", "description": "Bump in specified workspace", "type": "string" },
568
+ { "name": "--workspaces", "short": "-ws", "description": "Bump in all workspaces" }
569
+ ],
570
+ "examples": [
571
+ "npm version patch",
572
+ "npm version minor",
573
+ "npm version major",
574
+ "npm version 1.2.3",
575
+ "npm version prerelease --preid=alpha",
576
+ "npm version premajor --preid=beta",
577
+ "npm version from-git",
578
+ "npm version --no-git-tag-version patch"
579
+ ]
580
+ },
581
+ {
582
+ "name": "prune",
583
+ "description": "Remove extraneous packages",
584
+ "options": [
585
+ { "name": "--production", "description": "Remove devDependencies" },
586
+ { "name": "--omit", "description": "Omit dependency type", "type": "string" },
587
+ { "name": "--dry-run", "description": "Report what would be removed" },
588
+ { "name": "--json", "description": "Output as JSON" }
589
+ ],
590
+ "examples": [
591
+ "npm prune",
592
+ "npm prune --production",
593
+ "npm prune --dry-run"
594
+ ]
595
+ },
596
+ {
597
+ "name": "dedupe",
598
+ "description": "Reduce duplication in the dependency tree",
599
+ "options": [
600
+ { "name": "--dry-run", "description": "Report what would change" },
601
+ { "name": "--json", "description": "Output as JSON" },
602
+ { "name": "--workspace", "short": "-w", "description": "Dedupe in specified workspace", "type": "string" }
603
+ ],
604
+ "examples": [
605
+ "npm dedupe",
606
+ "npm dedupe --dry-run"
607
+ ]
608
+ },
609
+ {
610
+ "name": "ci",
611
+ "description": "Clean install from package-lock.json (for CI/CD environments)",
612
+ "options": [
613
+ { "name": "--ignore-scripts", "description": "Do not run scripts" },
614
+ { "name": "--omit", "description": "Omit dependency type", "type": "string" },
615
+ { "name": "--prefer-offline", "description": "Use cached data when possible" },
616
+ { "name": "--workspace", "short": "-w", "description": "Install in specified workspace", "type": "string" },
617
+ { "name": "--workspaces", "short": "-ws", "description": "Install in all workspaces" }
618
+ ],
619
+ "examples": [
620
+ "npm ci",
621
+ "npm ci --omit=dev",
622
+ "npm ci --ignore-scripts"
623
+ ]
624
+ },
625
+ {
626
+ "name": "exec",
627
+ "description": "Run a command from a local or remote npm package",
628
+ "args": [
629
+ { "name": "<command>", "type": "string", "required": true, "description": "Command to execute" }
630
+ ],
631
+ "options": [
632
+ { "name": "--package", "short": "-p", "description": "Package to install for exec", "type": "string" },
633
+ { "name": "--call", "short": "-c", "description": "Define custom command from exec", "type": "string" },
634
+ { "name": "--yes", "description": "Automatically confirm prompts" },
635
+ { "name": "--no", "description": "Automatically deny prompts" },
636
+ { "name": "--workspace", "short": "-w", "description": "Exec in specified workspace", "type": "string" }
637
+ ],
638
+ "examples": [
639
+ "npm exec -- eslint .",
640
+ "npm exec --package=typescript -- tsc --version",
641
+ "npm exec -c 'eslint . && prettier --check .'",
642
+ "npm exec -y -- create-react-app my-app"
643
+ ]
644
+ },
645
+ {
646
+ "name": "explore",
647
+ "description": "Browse an installed package directory",
648
+ "args": [
649
+ { "name": "<package>", "type": "string", "required": true, "description": "Package to explore" },
650
+ { "name": "<command>", "type": "string", "required": false, "description": "Command to run inside the package dir" }
651
+ ],
652
+ "examples": [
653
+ "npm explore express",
654
+ "npm explore express -- ls"
655
+ ]
656
+ },
657
+ {
658
+ "name": "explain",
659
+ "description": "Explain why a package is installed",
660
+ "args": [
661
+ { "name": "<package>", "type": "string", "required": true, "description": "Package to explain" }
662
+ ],
663
+ "options": [
664
+ { "name": "--json", "description": "Output as JSON" }
665
+ ],
666
+ "examples": [
667
+ "npm explain chalk",
668
+ "npm explain lodash --json",
669
+ "npm why chalk"
670
+ ]
671
+ },
672
+ {
673
+ "name": "prefix",
674
+ "description": "Display the prefix (directory where packages are installed)",
675
+ "options": [
676
+ { "name": "--global", "short": "-g", "description": "Show global prefix" }
677
+ ],
678
+ "examples": [
679
+ "npm prefix",
680
+ "npm prefix -g"
681
+ ]
682
+ },
683
+ {
684
+ "name": "root",
685
+ "description": "Display the effective node_modules folder",
686
+ "options": [
687
+ { "name": "--global", "short": "-g", "description": "Show global root" }
688
+ ],
689
+ "examples": [
690
+ "npm root",
691
+ "npm root -g"
692
+ ]
693
+ },
694
+ {
695
+ "name": "bin",
696
+ "description": "Display the bin folder for executables",
697
+ "options": [
698
+ { "name": "--global", "short": "-g", "description": "Show global bin folder" }
699
+ ],
700
+ "examples": [
701
+ "npm bin",
702
+ "npm bin -g"
703
+ ]
704
+ },
705
+ {
706
+ "name": "rebuild",
707
+ "description": "Rebuild installed packages (useful for native modules)",
708
+ "args": [
709
+ { "name": "<package>", "type": "string", "required": false, "description": "Package to rebuild (omit for all)" }
710
+ ],
711
+ "examples": [
712
+ "npm rebuild",
713
+ "npm rebuild node-sass",
714
+ "npm rebuild bcrypt"
715
+ ]
716
+ },
717
+ {
718
+ "name": "doctor",
719
+ "description": "Run a set of checks to validate your npm environment",
720
+ "examples": [
721
+ "npm doctor"
722
+ ]
723
+ },
724
+ {
725
+ "name": "token",
726
+ "description": "Manage authentication tokens",
727
+ "subcommands": [
728
+ {
729
+ "name": "list",
730
+ "description": "List all active authentication tokens",
731
+ "options": [
732
+ { "name": "--json", "description": "Output as JSON" },
733
+ { "name": "--parseable", "short": "-p", "description": "Parseable output" }
734
+ ],
735
+ "examples": [
736
+ "npm token list",
737
+ "npm token list --json"
738
+ ]
739
+ },
740
+ {
741
+ "name": "create",
742
+ "description": "Create a new authentication token",
743
+ "options": [
744
+ { "name": "--read-only", "description": "Create read-only token" },
745
+ { "name": "--cidr", "description": "Restrict token to CIDR ranges", "type": "string" }
746
+ ],
747
+ "examples": [
748
+ "npm token create",
749
+ "npm token create --read-only",
750
+ "npm token create --cidr=10.0.0.0/8"
751
+ ]
752
+ },
753
+ {
754
+ "name": "revoke",
755
+ "description": "Revoke an authentication token",
756
+ "args": [
757
+ { "name": "<id|token>", "type": "string", "required": true, "description": "Token ID or token value" }
758
+ ],
759
+ "examples": [
760
+ "npm token revoke abc123"
761
+ ]
762
+ }
763
+ ],
764
+ "examples": [
765
+ "npm token list",
766
+ "npm token create",
767
+ "npm token revoke abc123"
768
+ ]
769
+ },
770
+ {
771
+ "name": "owner",
772
+ "description": "Manage package owners (maintainers)",
773
+ "subcommands": [
774
+ {
775
+ "name": "add",
776
+ "description": "Add a new maintainer to a package",
777
+ "args": [
778
+ { "name": "<user>", "type": "string", "required": true, "description": "npm username" },
779
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
780
+ ],
781
+ "examples": [
782
+ "npm owner add newuser my-package"
783
+ ]
784
+ },
785
+ {
786
+ "name": "rm",
787
+ "description": "Remove a maintainer from a package",
788
+ "args": [
789
+ { "name": "<user>", "type": "string", "required": true, "description": "npm username" },
790
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
791
+ ],
792
+ "examples": [
793
+ "npm owner rm olduser my-package"
794
+ ]
795
+ },
796
+ {
797
+ "name": "ls",
798
+ "description": "List maintainers of a package",
799
+ "args": [
800
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
801
+ ],
802
+ "examples": [
803
+ "npm owner ls express"
804
+ ]
805
+ }
806
+ ],
807
+ "examples": [
808
+ "npm owner ls express",
809
+ "npm owner add username my-package",
810
+ "npm owner rm username my-package"
811
+ ]
812
+ },
813
+ {
814
+ "name": "deprecate",
815
+ "description": "Deprecate a version of a package",
816
+ "args": [
817
+ { "name": "<package>[@<version>]", "type": "string", "required": true, "description": "Package and optional version range" },
818
+ { "name": "<message>", "type": "string", "required": true, "description": "Deprecation message (empty to undeprecate)" }
819
+ ],
820
+ "options": [
821
+ { "name": "--otp", "description": "One-time password for 2FA", "type": "string" },
822
+ { "name": "--registry", "description": "Registry URL", "type": "string" }
823
+ ],
824
+ "examples": [
825
+ "npm deprecate my-package@1.0.0 \"Use v2 instead\"",
826
+ "npm deprecate my-package@\"< 2.0.0\" \"Upgrade to v2\"",
827
+ "npm deprecate my-package@1.0.0 \"\""
828
+ ]
829
+ },
830
+ {
831
+ "name": "dist-tag",
832
+ "description": "Manage package distribution tags",
833
+ "subcommands": [
834
+ {
835
+ "name": "add",
836
+ "description": "Add a dist-tag to a specific version",
837
+ "args": [
838
+ { "name": "<package>@<version>", "type": "string", "required": true, "description": "Package@version" },
839
+ { "name": "<tag>", "type": "string", "required": true, "description": "Tag name" }
840
+ ],
841
+ "examples": [
842
+ "npm dist-tag add my-package@1.0.0 latest",
843
+ "npm dist-tag add my-package@2.0.0-beta.1 beta"
844
+ ]
845
+ },
846
+ {
847
+ "name": "rm",
848
+ "description": "Remove a dist-tag",
849
+ "args": [
850
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" },
851
+ { "name": "<tag>", "type": "string", "required": true, "description": "Tag name" }
852
+ ],
853
+ "examples": [
854
+ "npm dist-tag rm my-package beta"
855
+ ]
856
+ },
857
+ {
858
+ "name": "ls",
859
+ "description": "List all dist-tags for a package",
860
+ "args": [
861
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
862
+ ],
863
+ "examples": [
864
+ "npm dist-tag ls express",
865
+ "npm dist-tag ls react"
866
+ ]
867
+ }
868
+ ],
869
+ "examples": [
870
+ "npm dist-tag ls express",
871
+ "npm dist-tag add my-package@1.0.0 latest",
872
+ "npm dist-tag rm my-package beta"
873
+ ]
874
+ },
875
+ {
876
+ "name": "access",
877
+ "description": "Manage access to scoped packages",
878
+ "subcommands": [
879
+ {
880
+ "name": "list",
881
+ "description": "List access permissions for a package or org",
882
+ "subcommands": [
883
+ {
884
+ "name": "packages",
885
+ "description": "List packages with access for user/org/team",
886
+ "args": [
887
+ { "name": "<entity>", "type": "string", "required": true, "description": "User, org, or team" }
888
+ ],
889
+ "examples": [
890
+ "npm access list packages @myorg",
891
+ "npm access list packages @myorg:myteam"
892
+ ]
893
+ },
894
+ {
895
+ "name": "collaborators",
896
+ "description": "List collaborators for a package",
897
+ "args": [
898
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
899
+ ],
900
+ "examples": [
901
+ "npm access list collaborators @myorg/my-package"
902
+ ]
903
+ }
904
+ ],
905
+ "examples": [
906
+ "npm access list packages @myorg",
907
+ "npm access list collaborators @myorg/my-package"
908
+ ]
909
+ },
910
+ {
911
+ "name": "grant",
912
+ "description": "Grant access permissions",
913
+ "args": [
914
+ { "name": "<read-only|read-write>", "type": "string", "required": true, "description": "Permission level" },
915
+ { "name": "<scope:team>", "type": "string", "required": true, "description": "Team to grant" },
916
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
917
+ ],
918
+ "examples": [
919
+ "npm access grant read-write @myorg:myteam @myorg/my-package"
920
+ ]
921
+ },
922
+ {
923
+ "name": "revoke",
924
+ "description": "Revoke access permissions",
925
+ "args": [
926
+ { "name": "<scope:team>", "type": "string", "required": true, "description": "Team to revoke" },
927
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
928
+ ],
929
+ "examples": [
930
+ "npm access revoke @myorg:myteam @myorg/my-package"
931
+ ]
932
+ },
933
+ {
934
+ "name": "set",
935
+ "description": "Set access level for a package",
936
+ "subcommands": [
937
+ {
938
+ "name": "status=public",
939
+ "description": "Set package to public",
940
+ "examples": ["npm access set status=public @myorg/my-package"]
941
+ },
942
+ {
943
+ "name": "status=private",
944
+ "description": "Set package to private",
945
+ "examples": ["npm access set status=private @myorg/my-package"]
946
+ },
947
+ {
948
+ "name": "mfa",
949
+ "description": "Set 2FA requirement for publishing",
950
+ "examples": [
951
+ "npm access set mfa=publish @myorg/my-package",
952
+ "npm access set mfa=none @myorg/my-package"
953
+ ]
954
+ }
955
+ ],
956
+ "examples": [
957
+ "npm access set status=public @myorg/my-package",
958
+ "npm access set mfa=publish @myorg/my-package"
959
+ ]
960
+ }
961
+ ],
962
+ "examples": [
963
+ "npm access list packages @myorg",
964
+ "npm access list collaborators @myorg/my-package",
965
+ "npm access grant read-write @myorg:team @myorg/my-package",
966
+ "npm access revoke @myorg:team @myorg/my-package",
967
+ "npm access set status=public @myorg/my-package"
968
+ ]
969
+ },
970
+ {
971
+ "name": "ping",
972
+ "description": "Ping the configured npm registry",
973
+ "options": [
974
+ { "name": "--registry", "description": "Registry URL to ping", "type": "string" }
975
+ ],
976
+ "examples": [
977
+ "npm ping",
978
+ "npm ping --registry https://registry.npmjs.org"
979
+ ]
980
+ },
981
+ {
982
+ "name": "bugs",
983
+ "description": "Open the bug tracker for a package in a browser",
984
+ "args": [
985
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
986
+ ],
987
+ "options": [
988
+ { "name": "--browser", "description": "Browser to use", "type": "string" },
989
+ { "name": "--registry", "description": "Registry URL", "type": "string" }
990
+ ],
991
+ "examples": [
992
+ "npm bugs express",
993
+ "npm bugs react"
994
+ ]
995
+ },
996
+ {
997
+ "name": "docs",
998
+ "description": "Open the documentation for a package in a browser",
999
+ "args": [
1000
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
1001
+ ],
1002
+ "options": [
1003
+ { "name": "--browser", "description": "Browser to use", "type": "string" },
1004
+ { "name": "--registry", "description": "Registry URL", "type": "string" }
1005
+ ],
1006
+ "examples": [
1007
+ "npm docs express",
1008
+ "npm docs react"
1009
+ ]
1010
+ },
1011
+ {
1012
+ "name": "repo",
1013
+ "description": "Open the repository page for a package in a browser",
1014
+ "args": [
1015
+ { "name": "<package>", "type": "string", "required": true, "description": "Package name" }
1016
+ ],
1017
+ "options": [
1018
+ { "name": "--browser", "description": "Browser to use", "type": "string" }
1019
+ ],
1020
+ "examples": [
1021
+ "npm repo express",
1022
+ "npm repo react"
1023
+ ]
1024
+ },
1025
+ {
1026
+ "name": "stars",
1027
+ "description": "View packages starred by a user",
1028
+ "args": [
1029
+ { "name": "<user>", "type": "string", "required": false, "description": "npm username (defaults to logged-in user)" }
1030
+ ],
1031
+ "examples": [
1032
+ "npm stars",
1033
+ "npm stars username"
1034
+ ]
1035
+ },
1036
+ {
1037
+ "name": "profile",
1038
+ "description": "View or modify your npm profile",
1039
+ "subcommands": [
1040
+ {
1041
+ "name": "get",
1042
+ "description": "Display profile fields",
1043
+ "args": [
1044
+ { "name": "<field>", "type": "string", "required": false, "description": "Specific field to view" }
1045
+ ],
1046
+ "examples": [
1047
+ "npm profile get",
1048
+ "npm profile get email",
1049
+ "npm profile get name"
1050
+ ]
1051
+ },
1052
+ {
1053
+ "name": "set",
1054
+ "description": "Update profile fields",
1055
+ "args": [
1056
+ { "name": "<field>", "type": "string", "required": true, "description": "Field to set" },
1057
+ { "name": "<value>", "type": "string", "required": true, "description": "New value" }
1058
+ ],
1059
+ "examples": [
1060
+ "npm profile set fullname \"John Doe\"",
1061
+ "npm profile set homepage https://example.com",
1062
+ "npm profile set password"
1063
+ ]
1064
+ },
1065
+ {
1066
+ "name": "enable-2fa",
1067
+ "description": "Enable two-factor authentication",
1068
+ "args": [
1069
+ { "name": "<mode>", "type": "string", "required": false, "description": "2FA mode: auth-only or auth-and-writes" }
1070
+ ],
1071
+ "examples": [
1072
+ "npm profile enable-2fa auth-and-writes",
1073
+ "npm profile enable-2fa auth-only"
1074
+ ]
1075
+ },
1076
+ {
1077
+ "name": "disable-2fa",
1078
+ "description": "Disable two-factor authentication",
1079
+ "examples": [
1080
+ "npm profile disable-2fa"
1081
+ ]
1082
+ }
1083
+ ],
1084
+ "examples": [
1085
+ "npm profile get",
1086
+ "npm profile set fullname \"Your Name\"",
1087
+ "npm profile enable-2fa auth-and-writes",
1088
+ "npm profile disable-2fa"
1089
+ ]
1090
+ }
1091
+ ],
1092
+ "globalOptions": [
1093
+ { "name": "--help", "short": "-h", "description": "Show help for a command" },
1094
+ { "name": "--version", "short": "-v", "description": "Show npm version" },
1095
+ { "name": "--registry", "description": "Set the registry URL", "type": "string" },
1096
+ { "name": "--loglevel", "description": "Set log level (silent, error, warn, notice, http, info, verbose, silly)", "type": "string" },
1097
+ { "name": "--json", "description": "Output as JSON where supported" },
1098
+ { "name": "--long", "short": "-l", "description": "Show extended information" },
1099
+ { "name": "--parseable", "short": "-p", "description": "Output parseable results" },
1100
+ { "name": "--global", "short": "-g", "description": "Operate in global mode" },
1101
+ { "name": "--prefix", "description": "Override the prefix directory", "type": "string" },
1102
+ { "name": "--userconfig", "description": "Path to user config file", "type": "string" },
1103
+ { "name": "--globalconfig", "description": "Path to global config file", "type": "string" },
1104
+ { "name": "--workspace", "short": "-w", "description": "Enable running in workspace context", "type": "string" },
1105
+ { "name": "--workspaces", "short": "-ws", "description": "Enable running across all workspaces" },
1106
+ { "name": "--include-workspace-root", "description": "Include workspace root when using --workspaces" },
1107
+ { "name": "--omit", "description": "Omit dependency type (dev, optional, peer)", "type": "string" },
1108
+ { "name": "--ignore-scripts", "description": "Do not run any lifecycle scripts" },
1109
+ { "name": "--no-fund", "description": "Suppress fund message" },
1110
+ { "name": "--no-audit", "description": "Suppress audit message" },
1111
+ { "name": "--dry-run", "description": "Report intended changes without making them" },
1112
+ { "name": "--force", "short": "-f", "description": "Remove various protections and force operations" },
1113
+ { "name": "--save", "short": "-S", "description": "Save to dependencies (default)" },
1114
+ { "name": "--save-dev", "short": "-D", "description": "Save to devDependencies" },
1115
+ { "name": "--save-exact", "short": "-E", "description": "Save exact version" },
1116
+ { "name": "--save-optional", "short": "-O", "description": "Save to optionalDependencies" },
1117
+ { "name": "--legacy-peer-deps", "description": "Ignore peerDependency conflicts during install" },
1118
+ { "name": "--strict-peer-deps", "description": "Fail on peerDependency conflicts" },
1119
+ { "name": "--prefer-offline", "description": "Prefer cached data, avoiding registry fetch" },
1120
+ { "name": "--prefer-online", "description": "Force staleness check for cached data" },
1121
+ { "name": "--cache", "description": "Set the cache directory", "type": "string" },
1122
+ { "name": "--timing", "description": "Show timing information" },
1123
+ { "name": "--foreground-scripts", "description": "Run lifecycle scripts in foreground" },
1124
+ { "name": "--script-shell", "description": "Shell to use for scripts", "type": "string" }
1125
+ ],
1126
+ "examples": [
1127
+ "npm init -y",
1128
+ "npm install",
1129
+ "npm install express",
1130
+ "npm install -D typescript",
1131
+ "npm install -g nodemon",
1132
+ "npm run build",
1133
+ "npm test",
1134
+ "npm start",
1135
+ "npm publish --access public",
1136
+ "npm version patch",
1137
+ "npm audit fix",
1138
+ "npm outdated",
1139
+ "npm ci",
1140
+ "npm cache clean --force",
1141
+ "npm config list",
1142
+ "npm view express versions",
1143
+ "npm ls --depth=0",
1144
+ "npm dedupe",
1145
+ "npm doctor",
1146
+ "npm exec -- create-react-app my-app"
1147
+ ],
1148
+ "relatedCommands": ["yarn", "pnpm", "bun", "npx", "node"],
1149
+ "contextEngine": {
1150
+ "detectors": [
1151
+ {
1152
+ "name": "package_scripts",
1153
+ "description": "List all scripts defined in package.json",
1154
+ "command": "node -e \"try{const p=require('./package.json');console.log(Object.keys(p.scripts||{}).join('\\n'))}catch{}\"",
1155
+ "parser": "lines",
1156
+ "cacheFor": 10,
1157
+ "requiresCmd": "node"
1158
+ },
1159
+ {
1160
+ "name": "dependencies",
1161
+ "description": "List all production dependencies from package.json",
1162
+ "command": "node -e \"try{const p=require('./package.json');console.log(Object.keys(p.dependencies||{}).join('\\n'))}catch{}\"",
1163
+ "parser": "lines",
1164
+ "cacheFor": 15,
1165
+ "requiresCmd": "node"
1166
+ },
1167
+ {
1168
+ "name": "dev_dependencies",
1169
+ "description": "List all dev dependencies from package.json",
1170
+ "command": "node -e \"try{const p=require('./package.json');console.log(Object.keys(p.devDependencies||{}).join('\\n'))}catch{}\"",
1171
+ "parser": "lines",
1172
+ "cacheFor": 15,
1173
+ "requiresCmd": "node"
1174
+ },
1175
+ {
1176
+ "name": "node_version",
1177
+ "description": "Detect the current Node.js version",
1178
+ "command": "node --version",
1179
+ "parser": "text",
1180
+ "cacheFor": 300,
1181
+ "requiresCmd": "node"
1182
+ },
1183
+ {
1184
+ "name": "npm_version",
1185
+ "description": "Detect the current npm version",
1186
+ "command": "npm --version",
1187
+ "parser": "text",
1188
+ "cacheFor": 300,
1189
+ "requiresCmd": "npm"
1190
+ },
1191
+ {
1192
+ "name": "global_packages",
1193
+ "description": "List globally installed npm packages",
1194
+ "command": "npm list -g --depth=0 --json",
1195
+ "parser": "json",
1196
+ "cacheFor": 60,
1197
+ "requiresCmd": "npm"
1198
+ },
1199
+ {
1200
+ "name": "outdated",
1201
+ "description": "List outdated packages in the current project",
1202
+ "command": "npm outdated --json 2>/dev/null",
1203
+ "parser": "json",
1204
+ "cacheFor": 30,
1205
+ "requiresCmd": "npm"
1206
+ },
1207
+ {
1208
+ "name": "npm_config",
1209
+ "description": "Current npm configuration settings",
1210
+ "command": "npm config list",
1211
+ "parser": "lines",
1212
+ "cacheFor": 60,
1213
+ "requiresCmd": "npm"
1214
+ },
1215
+ {
1216
+ "name": "workspaces",
1217
+ "description": "List configured workspaces from package.json",
1218
+ "command": "node -e \"try{const p=require('./package.json');console.log((p.workspaces||[]).join('\\n'))}catch{}\"",
1219
+ "parser": "lines",
1220
+ "cacheFor": 30,
1221
+ "requiresCmd": "node"
1222
+ },
1223
+ {
1224
+ "name": "registry",
1225
+ "description": "Current configured npm registry URL",
1226
+ "command": "npm config get registry",
1227
+ "parser": "text",
1228
+ "cacheFor": 120,
1229
+ "requiresCmd": "npm"
1230
+ },
1231
+ {
1232
+ "name": "logged_in_user",
1233
+ "description": "Currently authenticated npm user",
1234
+ "command": "npm whoami 2>/dev/null",
1235
+ "parser": "text",
1236
+ "cacheFor": 120,
1237
+ "requiresCmd": "npm"
1238
+ },
1239
+ {
1240
+ "name": "installed_packages",
1241
+ "description": "List locally installed packages at top level",
1242
+ "command": "npm ls --depth=0 --json 2>/dev/null",
1243
+ "parser": "json",
1244
+ "cacheFor": 15,
1245
+ "requiresCmd": "npm"
1246
+ },
1247
+ {
1248
+ "name": "audit_summary",
1249
+ "description": "Summary of known vulnerabilities in dependencies",
1250
+ "command": "npm audit --json 2>/dev/null | node -e \"const d=require('fs').readFileSync(0,'utf8');try{const j=JSON.parse(d);console.log(JSON.stringify(j.metadata?.vulnerabilities||{}))}catch{}\"",
1251
+ "parser": "json",
1252
+ "cacheFor": 60,
1253
+ "requiresCmd": "npm"
1254
+ },
1255
+ {
1256
+ "name": "engines",
1257
+ "description": "Engine constraints from package.json",
1258
+ "command": "node -e \"try{const p=require('./package.json');console.log(JSON.stringify(p.engines||{}))}catch{}\"",
1259
+ "parser": "json",
1260
+ "cacheFor": 30,
1261
+ "requiresCmd": "node"
1262
+ }
1263
+ ]
1264
+ }
1265
+ }