@vodmal/vdx-cli 0.7.0 → 0.8.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.
- package/README.md +5 -0
- package/package.json +1 -1
- package/src/doctor.ts +34 -0
package/README.md
CHANGED
|
@@ -24,6 +24,11 @@ invocation; pick global when you'll run `vdx` repeatedly, npx when you
|
|
|
24
24
|
don't want anything in your global `node_modules` or you're in an
|
|
25
25
|
ephemeral environment.
|
|
26
26
|
|
|
27
|
+
**First command after install: `vdx doctor`** — it inspects your environment
|
|
28
|
+
(Node version, `vdx` on PATH, git, mise, npm auth, container runtime, Claude
|
|
29
|
+
Code plugin) and points to remedies for everything that's missing or
|
|
30
|
+
sub-optimal.
|
|
31
|
+
|
|
27
32
|
## Use
|
|
28
33
|
|
|
29
34
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vodmal/vdx-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
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
|
@@ -149,6 +149,39 @@ function checkContainerRuntime(): CheckResult {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
function findOnPath(name: string): string | null {
|
|
153
|
+
const PATH = process.env.PATH ?? '';
|
|
154
|
+
const sep = process.platform === 'win32' ? ';' : ':';
|
|
155
|
+
for (const dir of PATH.split(sep)) {
|
|
156
|
+
if (!dir) continue;
|
|
157
|
+
const p = path.join(dir, name);
|
|
158
|
+
if (fs.existsSync(p)) return p;
|
|
159
|
+
}
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function checkVdxOnPath(): CheckResult {
|
|
164
|
+
const found = findOnPath('vdx');
|
|
165
|
+
if (found) {
|
|
166
|
+
return {
|
|
167
|
+
id: 'vdx-on-path',
|
|
168
|
+
label: 'vdx on PATH',
|
|
169
|
+
status: 'ok',
|
|
170
|
+
level: 4,
|
|
171
|
+
message: found,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
id: 'vdx-on-path',
|
|
176
|
+
label: 'vdx on PATH',
|
|
177
|
+
status: 'warning',
|
|
178
|
+
level: 1,
|
|
179
|
+
message: 'binary not on PATH — `vdx <verb>` will not work directly in shell',
|
|
180
|
+
remedy:
|
|
181
|
+
'npm i -g @vodmal/vdx-cli (or alias vdx="npx -y -p @vodmal/vdx-cli vdx")',
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
152
185
|
function checkClaudeCodePlugin(): CheckResult {
|
|
153
186
|
const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
|
|
154
187
|
if (!fs.existsSync(settingsPath)) {
|
|
@@ -189,6 +222,7 @@ function checkClaudeCodePlugin(): CheckResult {
|
|
|
189
222
|
|
|
190
223
|
const CHECKS: Array<() => CheckResult> = [
|
|
191
224
|
checkNode,
|
|
225
|
+
checkVdxOnPath,
|
|
192
226
|
checkGit,
|
|
193
227
|
checkMise,
|
|
194
228
|
checkNpmAuth,
|