@vodmal/vdx-cli 0.8.2 → 0.8.3

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/doctor.ts +47 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vodmal/vdx-cli",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "vdx — unified lifecycle interface (up/down/build/test/check/fix) + versioned maturity audit with drift detection. Pairs with the vdx Claude Code plugin.",
5
5
  "keywords": [
6
6
  "vdx",
package/src/doctor.ts CHANGED
@@ -226,6 +226,52 @@ function checkVdxOnPath(): CheckResult {
226
226
  };
227
227
  }
228
228
 
229
+ function checkVdxInShell(): CheckResult {
230
+ const found = findOnPath('vdx');
231
+ if (!found) {
232
+ return {
233
+ id: 'vdx-in-shell',
234
+ label: 'vdx in shell',
235
+ status: 'warning',
236
+ level: 1,
237
+ message:
238
+ 'no — `vdx` command not on persistent PATH. If you set a shell alias, it works but doctor cannot detect aliases.',
239
+ remedy:
240
+ 'npm i -g @vodmal/vdx-cli OR alias vdx="npx -y -p @vodmal/vdx-cli vdx"',
241
+ };
242
+ }
243
+ const ephemeral = isEphemeralPath(found);
244
+ if (ephemeral === 'npx-cache') {
245
+ return {
246
+ id: 'vdx-in-shell',
247
+ label: 'vdx in shell',
248
+ status: 'warning',
249
+ level: 1,
250
+ message:
251
+ 'no — only the ephemeral npx-cache binary is on PATH; bare `vdx <verb>` in a fresh shell will not resolve',
252
+ remedy:
253
+ 'npm i -g @vodmal/vdx-cli OR alias vdx="npx -y -p @vodmal/vdx-cli vdx"',
254
+ };
255
+ }
256
+ if (ephemeral === 'local-bin') {
257
+ return {
258
+ id: 'vdx-in-shell',
259
+ label: 'vdx in shell',
260
+ status: 'warning',
261
+ level: 2,
262
+ message: `project-only — \`vdx\` works inside this project root (${found}) but not elsewhere`,
263
+ remedy: 'npm i -g @vodmal/vdx-cli for global shell access',
264
+ };
265
+ }
266
+ return {
267
+ id: 'vdx-in-shell',
268
+ label: 'vdx in shell',
269
+ status: 'ok',
270
+ level: 4,
271
+ message: `yes — \`vdx\` resolves globally (${found})`,
272
+ };
273
+ }
274
+
229
275
  function checkClaudeCodePlugin(): CheckResult {
230
276
  const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
231
277
  if (!fs.existsSync(settingsPath)) {
@@ -267,6 +313,7 @@ function checkClaudeCodePlugin(): CheckResult {
267
313
  const CHECKS: Array<() => CheckResult> = [
268
314
  checkNode,
269
315
  checkVdxOnPath,
316
+ checkVdxInShell,
270
317
  checkGit,
271
318
  checkMise,
272
319
  checkNpmAuth,