@vibe-agent-toolkit/cli 0.1.0 → 0.1.1

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 (37) hide show
  1. package/README.md +67 -4
  2. package/dist/bin.js +15 -12
  3. package/dist/bin.js.map +1 -1
  4. package/dist/commands/agent/index.d.ts.map +1 -1
  5. package/dist/commands/agent/index.js +0 -37
  6. package/dist/commands/agent/index.js.map +1 -1
  7. package/dist/commands/audit/cache-detector.d.ts +32 -0
  8. package/dist/commands/audit/cache-detector.d.ts.map +1 -0
  9. package/dist/commands/audit/cache-detector.js +68 -0
  10. package/dist/commands/audit/cache-detector.js.map +1 -0
  11. package/dist/commands/audit/hierarchical-output.d.ts +41 -0
  12. package/dist/commands/audit/hierarchical-output.d.ts.map +1 -0
  13. package/dist/commands/audit/hierarchical-output.js +267 -0
  14. package/dist/commands/audit/hierarchical-output.js.map +1 -0
  15. package/dist/commands/audit.d.ts +18 -0
  16. package/dist/commands/audit.d.ts.map +1 -0
  17. package/dist/commands/audit.js +386 -0
  18. package/dist/commands/audit.js.map +1 -0
  19. package/dist/commands/doctor.d.ts +106 -0
  20. package/dist/commands/doctor.d.ts.map +1 -0
  21. package/dist/commands/doctor.js +499 -0
  22. package/dist/commands/doctor.js.map +1 -0
  23. package/dist/commands/resources/scan.d.ts.map +1 -1
  24. package/dist/commands/resources/scan.js +8 -0
  25. package/dist/commands/resources/scan.js.map +1 -1
  26. package/dist/utils/config-loader.d.ts +6 -0
  27. package/dist/utils/config-loader.d.ts.map +1 -1
  28. package/dist/utils/config-loader.js +18 -0
  29. package/dist/utils/config-loader.js.map +1 -1
  30. package/docs/audit.md +446 -0
  31. package/docs/doctor.md +268 -0
  32. package/docs/index.md +32 -0
  33. package/package.json +11 -8
  34. package/dist/commands/agent/audit.d.ts +0 -9
  35. package/dist/commands/agent/audit.d.ts.map +0 -1
  36. package/dist/commands/agent/audit.js +0 -139
  37. package/dist/commands/agent/audit.js.map +0 -1
package/docs/audit.md ADDED
@@ -0,0 +1,446 @@
1
+ # Audit Command Reference
2
+
3
+ ## Overview
4
+
5
+ The `vat audit` command provides comprehensive validation for Claude plugins, marketplaces, registries, and Claude Skills. It automatically detects resource types and applies appropriate validation rules, outputting structured YAML reports for programmatic parsing.
6
+
7
+ ## Key Features
8
+
9
+ - **Auto-detection**: Automatically identifies resource type based on file structure
10
+ - **Comprehensive validation**: Schema validation, link integrity, naming conventions
11
+ - **Hierarchical output**: Groups results by marketplace → plugin → skill relationships
12
+ - **Cache staleness detection**: Identifies outdated cached plugins
13
+ - **Cross-platform support**: Works on Windows, macOS, and Linux
14
+ - **CI/CD friendly**: Structured YAML output and exit codes for automation
15
+
16
+ ## Usage
17
+
18
+ ```bash
19
+ vat audit [path] [options]
20
+ ```
21
+
22
+ ### Arguments
23
+
24
+ - `[path]` - Path to audit (optional, default: current directory)
25
+ - Can be: directory, registry file, SKILL.md file, or resource directory
26
+
27
+ ### Options
28
+
29
+ - `--user` - Audit user-level Claude plugins installation (`~/.claude/plugins`)
30
+ - `-r, --recursive` - Scan directories recursively for all resource types
31
+ - `--debug` - Enable debug logging (outputs to stderr)
32
+
33
+ ## Supported Resource Types
34
+
35
+ ### 1. Plugin Directories
36
+
37
+ Plugin directories contain a `.claude-plugin/plugin.json` manifest:
38
+
39
+ ```
40
+ my-plugin/
41
+ ├── .claude-plugin/
42
+ │ └── plugin.json # Plugin manifest
43
+ └── skills/
44
+ └── skill1.md
45
+ ```
46
+
47
+ **Validation checks**:
48
+ - `plugin.json` exists and is valid JSON
49
+ - Schema validation against plugin manifest schema
50
+ - Referenced skills exist
51
+
52
+ ### 2. Marketplace Directories
53
+
54
+ Marketplace directories contain a `.claude-plugin/marketplace.json` manifest:
55
+
56
+ ```
57
+ my-marketplace/
58
+ ├── .claude-plugin/
59
+ │ └── marketplace.json # Marketplace manifest
60
+ └── plugins/
61
+ └── plugin1/
62
+ ```
63
+
64
+ **Validation checks**:
65
+ - `marketplace.json` exists and is valid JSON
66
+ - Schema validation against marketplace manifest schema
67
+ - Plugin references are valid
68
+
69
+ ### 3. Registry Files
70
+
71
+ Registry files track installed plugins and known marketplaces:
72
+
73
+ - `installed_plugins.json` - Installed plugins registry
74
+ - `known_marketplaces.json` - Known marketplaces registry
75
+
76
+ **Validation checks**:
77
+ - File exists and is valid JSON
78
+ - Schema validation against registry schema
79
+ - Checksums match installed versions (cache staleness)
80
+
81
+ ### 4. Claude Skills (SKILL.md files)
82
+
83
+ Individual Claude Skill markdown files with frontmatter:
84
+
85
+ ```markdown
86
+ ---
87
+ name: my-skill
88
+ description: Skill description
89
+ ---
90
+
91
+ Skill content here...
92
+ ```
93
+
94
+ **Validation checks** (see Error Codes section below for details):
95
+ - Frontmatter presence and validity
96
+ - Required fields (`name`, `description`)
97
+ - Name and description constraints
98
+ - Link integrity (broken links, missing anchors)
99
+ - Path style (no Windows backslashes)
100
+ - Length limits (warning at 5000+ lines)
101
+ - Console-incompatible tool usage (warning)
102
+
103
+ ### 5. VAT Agents
104
+
105
+ VAT agent directories contain an `agent.yaml` manifest and `SKILL.md`:
106
+
107
+ ```
108
+ my-agent/
109
+ ├── agent.yaml
110
+ └── SKILL.md
111
+ ```
112
+
113
+ **Validation checks**:
114
+ - Validates the `SKILL.md` file with VAT-specific context
115
+
116
+ ## User-Level Audit
117
+
118
+ The `--user` flag audits your installed Claude plugins:
119
+
120
+ ```bash
121
+ vat audit --user
122
+ ```
123
+
124
+ **What it checks**:
125
+ - All plugins in `~/.claude/plugins/`
126
+ - All marketplaces and their plugins
127
+ - Cache staleness (checksums vs installed versions)
128
+ - All skills within plugins
129
+
130
+ **Output format**:
131
+ - Hierarchical structure: marketplace → plugin → skill
132
+ - Cache status for each plugin
133
+ - Issue counts at each level
134
+
135
+ **Example output**:
136
+ ```yaml
137
+ status: success
138
+ summary:
139
+ filesScanned: 42
140
+ success: 40
141
+ warnings: 2
142
+ errors: 0
143
+ marketplaces: 2
144
+ standalonePlugins: 3
145
+ standaloneSkills: 5
146
+ hierarchical:
147
+ marketplaces:
148
+ - name: anthropic-agent-skills
149
+ status: success
150
+ plugins:
151
+ - name: document-skills
152
+ status: warning
153
+ cacheStatus: fresh
154
+ skills:
155
+ - path: .../pdf.md
156
+ status: warning
157
+ issues:
158
+ - code: SKILL_TOO_LONG
159
+ message: Skill exceeds recommended length
160
+ ```
161
+
162
+ ## Exit Codes
163
+
164
+ - **0** - Success: All validations passed
165
+ - **1** - Errors found: Validation errors that must be fixed
166
+ - **2** - System error: Config invalid, path not found, etc.
167
+
168
+ ## Validation Checks
169
+
170
+ ### Errors (Must Fix)
171
+
172
+ Errors prevent the resource from being used correctly:
173
+
174
+ - **Missing manifests/frontmatter**: Resource structure is invalid
175
+ - **Schema validation failures**: Manifest/frontmatter doesn't match expected format
176
+ - **Broken links**: Links to non-existent files (Skills only)
177
+ - **Reserved words in names**: Using reserved words like "help", "exit" (Skills only)
178
+ - **XML tags in frontmatter**: XML-like tags in name/description (Skills only)
179
+ - **Windows-style backslashes**: Path separators should be forward slashes (Skills only)
180
+
181
+ ### Warnings (Should Fix)
182
+
183
+ Warnings indicate potential issues but don't prevent usage:
184
+
185
+ - **Skill exceeds recommended length**: Over 5000 lines (Skills only)
186
+ - **Console-incompatible tools**: References tools that don't work in console (Skills only)
187
+
188
+ ## Error Codes Reference
189
+
190
+ ### Plugin Errors
191
+
192
+ | Code | Severity | Description | Fix |
193
+ |------|----------|-------------|-----|
194
+ | `PLUGIN_MISSING_MANIFEST` | error | `.claude-plugin/plugin.json` not found | Create plugin manifest |
195
+ | `PLUGIN_INVALID_JSON` | error | Manifest is not valid JSON | Fix JSON syntax |
196
+ | `PLUGIN_INVALID_SCHEMA` | error | Manifest fails schema validation | Fix manifest structure |
197
+
198
+ ### Marketplace Errors
199
+
200
+ | Code | Severity | Description | Fix |
201
+ |------|----------|-------------|-----|
202
+ | `MARKETPLACE_MISSING_MANIFEST` | error | `.claude-plugin/marketplace.json` not found | Create marketplace manifest |
203
+ | `MARKETPLACE_INVALID_JSON` | error | Manifest is not valid JSON | Fix JSON syntax |
204
+ | `MARKETPLACE_INVALID_SCHEMA` | error | Manifest fails schema validation | Fix manifest structure |
205
+
206
+ ### Registry Errors
207
+
208
+ | Code | Severity | Description | Fix |
209
+ |------|----------|-------------|-----|
210
+ | `REGISTRY_MISSING_FILE` | error | Registry file not found | Create registry file |
211
+ | `REGISTRY_INVALID_JSON` | error | Registry is not valid JSON | Fix JSON syntax |
212
+ | `REGISTRY_INVALID_SCHEMA` | error | Registry fails schema validation | Fix registry structure |
213
+
214
+ ### Skill Errors
215
+
216
+ | Code | Severity | Description | Fix |
217
+ |------|----------|-------------|-----|
218
+ | `SKILL_MISSING_FRONTMATTER` | error | No YAML frontmatter found | Add frontmatter with `---` delimiters |
219
+ | `SKILL_MISSING_NAME` | error | `name` field missing from frontmatter | Add `name` field |
220
+ | `SKILL_MISSING_DESCRIPTION` | error | `description` field missing from frontmatter | Add `description` field |
221
+ | `SKILL_NAME_INVALID` | error | Name contains invalid characters | Use only letters, numbers, hyphens, underscores |
222
+ | `SKILL_DESCRIPTION_TOO_LONG` | error | Description exceeds 500 characters | Shorten description |
223
+ | `SKILL_NAME_RESERVED_WORD` | error | Name is a reserved word | Choose a different name |
224
+ | `SKILL_NAME_XML_TAGS` | error | Name contains XML-like tags | Remove XML tags from name |
225
+ | `SKILL_DESCRIPTION_XML_TAGS` | error | Description contains XML-like tags | Remove XML tags from description |
226
+ | `SKILL_DESCRIPTION_EMPTY` | error | Description is empty or whitespace | Provide meaningful description |
227
+ | `PATH_STYLE_WINDOWS` | error | Windows-style backslashes in paths | Use forward slashes (/) instead |
228
+ | `LINK_INTEGRITY_BROKEN` | error | Link to non-existent file | Fix or remove broken link |
229
+
230
+ ### Skill Warnings
231
+
232
+ | Code | Severity | Description | Fix |
233
+ |------|----------|-------------|-----|
234
+ | `SKILL_TOO_LONG` | warning | Skill exceeds 5000 lines | Consider splitting into multiple skills |
235
+ | `SKILL_CONSOLE_INCOMPATIBLE` | warning | References console-incompatible tools | Use console-compatible alternatives |
236
+
237
+ ### Format Detection Errors
238
+
239
+ | Code | Severity | Description | Fix |
240
+ |------|----------|-------------|-----|
241
+ | `UNKNOWN_FORMAT` | error | Cannot determine resource type | Ensure path contains valid resource structure |
242
+
243
+ ## Output Format
244
+
245
+ ### Standard Output (stdout)
246
+
247
+ Structured YAML report for programmatic parsing:
248
+
249
+ ```yaml
250
+ status: success | warning | error
251
+ summary:
252
+ filesScanned: number
253
+ success: number # Files with no issues
254
+ warnings: number # Files with warnings only
255
+ errors: number # Files with errors
256
+ issues:
257
+ errors: number # Total error count across all files
258
+ warnings: number # Total warning count across all files
259
+ info: number # Total info count across all files
260
+ duration: "123ms"
261
+ files:
262
+ - path: /path/to/resource
263
+ status: success | warning | error
264
+ type: plugin | marketplace | registry | skill
265
+ issues: []
266
+ ```
267
+
268
+ ### Standard Error (stderr)
269
+
270
+ Human-readable error messages and logs:
271
+
272
+ ```
273
+ ERROR: Audit failed: 2 file(s) with errors
274
+ ERROR: /path/to/skill.md:
275
+ ERROR: [SKILL_MISSING_NAME] name field is required in frontmatter
276
+ ERROR: at: line 1
277
+ ERROR: fix: Add 'name: skill-name' to frontmatter
278
+ ```
279
+
280
+ ## Examples
281
+
282
+ ### Basic Usage
283
+
284
+ Audit current directory:
285
+
286
+ ```bash
287
+ vat audit
288
+ ```
289
+
290
+ Audit specific directory:
291
+
292
+ ```bash
293
+ vat audit ./my-plugin
294
+ ```
295
+
296
+ Audit specific registry file:
297
+
298
+ ```bash
299
+ vat audit ~/.claude/plugins/installed_plugins.json
300
+ ```
301
+
302
+ Audit specific skill:
303
+
304
+ ```bash
305
+ vat audit ./skills/my-skill.md
306
+ ```
307
+
308
+ ### User-Level Audit
309
+
310
+ Audit all installed Claude plugins:
311
+
312
+ ```bash
313
+ vat audit --user
314
+ ```
315
+
316
+ This scans:
317
+ - `~/.claude/plugins/marketplaces/*/`
318
+ - `~/.claude/plugins/cache/*/`
319
+ - All registry files
320
+ - All skills within plugins
321
+
322
+ ### Recursive Scanning
323
+
324
+ Scan directory tree for all resources:
325
+
326
+ ```bash
327
+ vat audit ./resources --recursive
328
+ ```
329
+
330
+ Finds and validates:
331
+ - Plugin directories (`.claude-plugin/plugin.json`)
332
+ - Marketplace directories (`.claude-plugin/marketplace.json`)
333
+ - Registry files (`installed_plugins.json`, `known_marketplaces.json`)
334
+ - Skill files (`SKILL.md`)
335
+
336
+ ### CI/CD Integration
337
+
338
+ Use in CI pipeline:
339
+
340
+ ```bash
341
+ #!/bin/bash
342
+ set -e
343
+
344
+ # Audit all resources
345
+ vat audit --recursive > audit-report.yaml
346
+
347
+ # Check exit code
348
+ if [ $? -eq 1 ]; then
349
+ echo "Audit failed with validation errors"
350
+ cat audit-report.yaml
351
+ exit 1
352
+ elif [ $? -eq 2 ]; then
353
+ echo "Audit failed with system error"
354
+ exit 2
355
+ fi
356
+
357
+ echo "Audit passed"
358
+ ```
359
+
360
+ GitHub Actions example:
361
+
362
+ ```yaml
363
+ name: Validate Skills
364
+ on: [push, pull_request]
365
+
366
+ jobs:
367
+ audit:
368
+ runs-on: ubuntu-latest
369
+ steps:
370
+ - uses: actions/checkout@v4
371
+ - uses: oven-sh/setup-bun@v1
372
+ - run: npm install -g vibe-agent-toolkit
373
+ - run: vat audit --recursive
374
+ ```
375
+
376
+ ## Troubleshooting
377
+
378
+ ### "User plugins directory not found"
379
+
380
+ **Problem**: `--user` flag but no `~/.claude/plugins/` directory
381
+
382
+ **Solution**: Install Claude Desktop and plugins first, or audit specific path instead
383
+
384
+ ### "Cannot determine resource type"
385
+
386
+ **Problem**: Path doesn't match any known resource structure
387
+
388
+ **Solutions**:
389
+ - Ensure plugin has `.claude-plugin/plugin.json` or `.claude-plugin/marketplace.json`
390
+ - Ensure registry files are named `installed_plugins.json` or `known_marketplaces.json`
391
+ - Ensure skill files are named `SKILL.md`
392
+ - Use `--recursive` to scan subdirectories
393
+
394
+ ### "Permission denied" on Windows
395
+
396
+ **Problem**: Cannot access `%USERPROFILE%\.claude\plugins`
397
+
398
+ **Solution**: Run as administrator or check file permissions
399
+
400
+ ### Large output in CI
401
+
402
+ **Problem**: Too much YAML output for CI logs
403
+
404
+ **Solution**: Redirect stdout to file, only show stderr:
405
+
406
+ ```bash
407
+ vat audit --recursive > audit.yaml 2>&1
408
+ if [ $? -ne 0 ]; then
409
+ echo "Audit failed, see audit.yaml"
410
+ exit 1
411
+ fi
412
+ ```
413
+
414
+ ## Cross-Platform Considerations
415
+
416
+ ### Path Separators
417
+
418
+ Always use forward slashes (`/`) in:
419
+ - Link paths in SKILL.md files
420
+ - Config file paths
421
+ - Command-line arguments
422
+
423
+ Windows users: Use forward slashes even on Windows - they work correctly in Node.js.
424
+
425
+ ### Home Directory
426
+
427
+ `--user` flag automatically resolves:
428
+ - macOS/Linux: `~/.claude/plugins`
429
+ - Windows: `%USERPROFILE%\.claude\plugins`
430
+
431
+ ### Line Endings
432
+
433
+ SKILL.md files can use any line ending (LF, CRLF) - the parser handles both.
434
+
435
+ ## Related Commands
436
+
437
+ - `vat agent audit <path>` - Legacy skill-only audit (deprecated)
438
+ - `vat doctor` - Check environment and installation health
439
+ - `vat resources validate` - Validate markdown resources (links, anchors)
440
+
441
+ ## See Also
442
+
443
+ - [CLI Reference](./index.md) - Complete CLI documentation
444
+ - [Agent Command](./agent.md) - Agent build and import commands
445
+ - [Resources Command](./resources.md) - Markdown resource validation
446
+ - [Doctor Command](./doctor.md) - Environment diagnostics
package/docs/doctor.md ADDED
@@ -0,0 +1,268 @@
1
+ # vat doctor - Environment Diagnostics
2
+
3
+ ## Overview
4
+
5
+ The `vat doctor` command diagnoses common issues with your agent project setup and environment,
6
+ providing actionable suggestions for any problems found.
7
+
8
+ ## Command
9
+
10
+ ### vat doctor [options]
11
+
12
+ **Purpose:** Check environment and project setup health
13
+
14
+ **What it checks:**
15
+ 1. Node.js version (>=20 required)
16
+ 2. Git installed and version
17
+ 3. Current directory is a git repository
18
+ 4. Configuration file exists (vibe-agent-toolkit.config.yaml)
19
+ 5. Configuration is valid YAML with correct schema
20
+ 6. VAT version (checks npm for updates)
21
+ 7. CLI build status (when running from VAT source tree)
22
+
23
+ **Options:**
24
+ - `--verbose` - Show all checks (including passing ones)
25
+
26
+ **Exit Codes:**
27
+ - `0` - All checks passed
28
+ - `1` - One or more checks failed
29
+
30
+ **Output:** Human-friendly formatted text with emojis
31
+
32
+ ## Usage Examples
33
+
34
+ ### Basic Check
35
+
36
+ Check all diagnostic items and show only failures:
37
+
38
+ ```bash
39
+ vat doctor
40
+ ```
41
+
42
+ Output when all checks pass:
43
+ ```
44
+ 🩺 vat doctor
45
+
46
+ Running diagnostic checks...
47
+
48
+ 📊 Results: 7/7 checks passed
49
+
50
+ ✨ All checks passed! Your vat setup looks healthy.
51
+ ```
52
+
53
+ ### Verbose Mode
54
+
55
+ Show all checks including passing ones:
56
+
57
+ ```bash
58
+ vat doctor --verbose
59
+ ```
60
+
61
+ Output shows all individual checks:
62
+ ```
63
+ 🩺 vat doctor
64
+
65
+ Running diagnostic checks...
66
+
67
+ ✅ vat version
68
+ Current: 0.1.0 — up to date
69
+
70
+ ✅ Node.js version
71
+ v22.0.0 (meets requirement: >=20.0.0)
72
+
73
+ ✅ Git installed
74
+ git version 2.43.0
75
+
76
+ ✅ Git repository
77
+ Current directory is a git repository
78
+
79
+ ✅ Configuration file
80
+ Found: vibe-agent-toolkit.config.yaml
81
+
82
+ ✅ Configuration valid
83
+ Configuration is valid
84
+
85
+ ✅ CLI build status
86
+ Build is up to date (v0.1.0)
87
+
88
+ 📊 Results: 7/7 checks passed
89
+
90
+ ✨ All checks passed! Your vat setup looks healthy.
91
+ ```
92
+
93
+ ## Project Context Detection
94
+
95
+ When run from a subdirectory, doctor shows project context:
96
+
97
+ ```bash
98
+ cd packages/cli
99
+ vat doctor
100
+ ```
101
+
102
+ Output:
103
+ ```
104
+ 🩺 vat doctor
105
+
106
+ 📍 Project Context
107
+ Current directory: /path/to/project/packages/cli
108
+ Project root: /path/to/project
109
+ Configuration: /path/to/project/vibe-agent-toolkit.config.yaml
110
+
111
+ Running diagnostic checks...
112
+
113
+ 📊 Results: 7/7 checks passed
114
+
115
+ ✨ All checks passed! Your vat setup looks healthy.
116
+ ```
117
+
118
+ ## Troubleshooting
119
+
120
+ When checks fail, doctor provides specific suggestions:
121
+
122
+ ### Node.js Version Too Old
123
+
124
+ ```
125
+ ❌ Node.js version
126
+ v18.0.0 is too old. Node.js 20+ required.
127
+ 💡 Upgrade Node.js: https://nodejs.org/ or use nvm
128
+ ```
129
+
130
+ ### Git Not Installed
131
+
132
+ ```
133
+ ❌ Git installed
134
+ Git is not installed
135
+ 💡 Install Git: https://git-scm.com/
136
+ ```
137
+
138
+ ### Not a Git Repository
139
+
140
+ ```
141
+ ❌ Git repository
142
+ Current directory is not a git repository
143
+ 💡 Run: git init
144
+ ```
145
+
146
+ ### Configuration File Missing
147
+
148
+ ```
149
+ ❌ Configuration file
150
+ Configuration file not found
151
+ 💡 Create vibe-agent-toolkit.config.yaml in project root
152
+ ```
153
+
154
+ ### Configuration Invalid
155
+
156
+ ```
157
+ ❌ Configuration valid
158
+ Configuration contains errors: YAML syntax error at line 5
159
+ 💡 Fix YAML syntax or schema errors in vibe-agent-toolkit.config.yaml
160
+ ```
161
+
162
+ ### VAT Update Available
163
+
164
+ ```
165
+ ✅ vat version
166
+ Current: 0.1.0, Latest: 0.2.0 available
167
+ 💡 Upgrade: npm install -g vibe-agent-toolkit@latest
168
+ ```
169
+
170
+ ### CLI Build Stale (VAT Source Tree)
171
+
172
+ ```
173
+ ❌ CLI build status
174
+ Build is stale: running v0.1.0, source v0.2.0
175
+ 💡 Rebuild packages: bun run build
176
+ ```
177
+
178
+ ## Use Cases
179
+
180
+ ### Before Starting Development
181
+
182
+ Run doctor to ensure your environment is set up correctly:
183
+
184
+ ```bash
185
+ vat doctor
186
+ ```
187
+
188
+ ### After Updating VAT
189
+
190
+ Check that everything still works after upgrading:
191
+
192
+ ```bash
193
+ npm install -g vibe-agent-toolkit@latest
194
+ vat doctor
195
+ ```
196
+
197
+ ### Debugging Issues
198
+
199
+ Use verbose mode to see all check details:
200
+
201
+ ```bash
202
+ vat doctor --verbose
203
+ ```
204
+
205
+ ### CI/CD Integration
206
+
207
+ Use exit codes for automated checks:
208
+
209
+ ```bash
210
+ if vat doctor; then
211
+ echo "Environment healthy"
212
+ else
213
+ echo "Environment issues detected"
214
+ exit 1
215
+ fi
216
+ ```
217
+
218
+ ## Check Details
219
+
220
+ ### Node.js Version Check
221
+
222
+ - **Requirement:** Node.js 20 or higher
223
+ - **Why:** VAT uses modern JavaScript features
224
+ - **Fix:** Install Node.js from https://nodejs.org/ or use nvm
225
+
226
+ ### Git Installation Check
227
+
228
+ - **Requirement:** Git command available
229
+ - **Why:** VAT projects are typically git repositories
230
+ - **Fix:** Install Git from https://git-scm.com/
231
+
232
+ ### Git Repository Check
233
+
234
+ - **Requirement:** Current directory is in a git repository
235
+ - **Why:** VAT works best with version-controlled projects
236
+ - **Fix:** Run `git init` to initialize a repository
237
+
238
+ ### Configuration File Check
239
+
240
+ - **Requirement:** vibe-agent-toolkit.config.yaml exists
241
+ - **Location:** Searches up directory tree from current location
242
+ - **Fix:** Create configuration file in project root
243
+
244
+ ### Configuration Valid Check
245
+
246
+ - **Requirement:** Configuration file is valid YAML with correct schema
247
+ - **Why:** Invalid config causes runtime errors
248
+ - **Fix:** Validate YAML syntax and check required fields
249
+
250
+ ### VAT Version Check
251
+
252
+ - **Purpose:** Inform about available updates (advisory only)
253
+ - **Always passes:** This check never fails
254
+ - **Suggestion:** Shows upgrade command if update available
255
+
256
+ ### CLI Build Status Check
257
+
258
+ - **When:** Only runs when in VAT source tree
259
+ - **Purpose:** Ensure CLI build matches source version (for VAT developers)
260
+ - **Skipped:** When running installed VAT globally
261
+ - **Fix:** Run `bun run build` in VAT source directory
262
+
263
+ ## Tips
264
+
265
+ - Run `vat doctor` before reporting issues to verify environment
266
+ - Use `--verbose` flag when debugging to see all check details
267
+ - Doctor checks can be run from any subdirectory in your project
268
+ - Exit code 0 means all checks passed (useful for scripts)