claudekit-cli 3.0.1 → 3.2.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 (3) hide show
  1. package/README.md +73 -43
  2. package/dist/index.js +3976 -3363
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -182,27 +182,46 @@ ck versions --all
182
182
  ### Diagnostics & Doctor
183
183
 
184
184
  ```bash
185
- # Check system dependencies, offer auto-installation
185
+ # Full health check (default)
186
186
  ck doctor
187
187
 
188
- # Global installation check only
189
- ck doctor --global
188
+ # Generate shareable diagnostic report (prompts for gist upload)
189
+ ck doctor --report
190
190
 
191
- # Non-interactive mode (CI/CD)
192
- CI=true ck doctor
191
+ # Auto-fix all fixable issues
192
+ ck doctor --fix
193
193
 
194
- # Auth and access diagnostics
195
- ck diagnose
196
- ck diagnose --verbose
194
+ # CI mode: no prompts, exit 1 on failures
195
+ ck doctor --check-only
196
+
197
+ # Machine-readable JSON output
198
+ ck doctor --json
199
+
200
+ # Combine flags
201
+ ck doctor --check-only --json
197
202
  ```
198
203
 
199
- **Checks:**
200
- - Claude CLI (optional, v1.0.0+), Python (3.8.0+), pip, Node.js (16.0.0+), npm
201
- - Skills dependencies status
202
- - ClaudeKit setup (global and project)
203
- - Component counts
204
+ **Health Checks:**
205
+ - **System**: Node.js, npm, Python, pip, Claude CLI, git, gh CLI
206
+ - **ClaudeKit**: Global/project installation, versions, skills
207
+ - **Auth**: GitHub CLI authentication, repository access
208
+ - **Project**: package.json, node_modules, lock files
209
+ - **Modules**: Dynamic skill dependency resolution
210
+
211
+ **Auto-Fix Capabilities:**
212
+ | Issue | Fix Action |
213
+ |-------|------------|
214
+ | Missing dependencies | Install via package manager |
215
+ | Missing gh auth | Run `gh auth login` |
216
+ | Corrupted node_modules | Reinstall dependencies |
217
+ | Missing global install | Run `ck init --global` |
218
+ | Missing skill deps | Install in skill directory |
219
+
220
+ **Exit Codes:**
221
+ - `0`: All checks pass or issues fixed
222
+ - `1`: Failures detected (only with `--check-only`)
204
223
 
205
- **Auto-installation:** macOS (Homebrew), Linux (apt/dnf/pacman), Windows (PowerShell). Requires user confirmation in interactive mode.
224
+ > **Note:** `ck diagnose` is deprecated. Use `ck doctor` instead.
206
225
 
207
226
  ### Uninstall
208
227
 
@@ -315,11 +334,8 @@ The CLI requires GitHub authentication to download releases from private reposit
315
334
 
316
335
  ### Quick Setup
317
336
 
318
- **Recommended: GitHub CLI**
337
+ **Step 1: Install GitHub CLI**
319
338
  ```bash
320
- # Install & authenticate
321
- gh auth login
322
-
323
339
  # Windows
324
340
  winget install GitHub.cli
325
341
 
@@ -330,33 +346,47 @@ brew install gh
330
346
  sudo apt install gh
331
347
  ```
332
348
 
333
- **Alternative: Personal Access Token**
334
- 1. Create token at [github.com/settings/tokens/new](https://github.com/settings/tokens/new?scopes=repo)
335
- 2. Set environment variable:
336
- ```bash
337
- # Windows (permanent)
338
- [System.Environment]::SetEnvironmentVariable("GITHUB_TOKEN", "ghp_TOKEN", [System.EnvironmentVariableTarget]::User)
349
+ **Step 2: Authenticate with GitHub CLI**
350
+ ```bash
351
+ gh auth login
352
+ ```
353
+
354
+ When prompted, follow these steps:
355
+ 1. Select **GitHub.com**
356
+ 2. Select **HTTPS** (or SSH if preferred)
357
+ 3. Authenticate Git? → **Yes**
358
+ 4. Select **Login with a web browser** (⚠️ recommended)
359
+ 5. Copy the one-time code shown
360
+ 6. Press Enter to open browser and paste the code
361
+ 7. Authorize GitHub CLI
339
362
 
340
- # macOS/Linux (add to ~/.bashrc or ~/.zshrc)
341
- export GITHUB_TOKEN=ghp_your_token_here
342
- ```
363
+ > **⚠️ Important**: Select "Login with a web browser" - do NOT use "Paste an authentication token" as PAT authentication is no longer supported for accessing private repositories.
343
364
 
344
365
  ## Troubleshooting
345
366
 
346
- Run diagnostics to check for common issues:
367
+ Run the doctor command to diagnose issues:
347
368
 
348
369
  ```bash
349
- ck doctor # Check dependencies and offer installation
350
- ck diagnose # Check authentication, access, releases
351
- ck new --verbose # Enable detailed logging for ck new
352
- ck init --verbose # Enable detailed logging for ck init
370
+ # Interactive diagnostics
371
+ ck doctor
372
+
373
+ # Generate report for support
374
+ ck doctor --report
375
+
376
+ # CI/automation
377
+ ck doctor --check-only --json
378
+
379
+ # Verbose logging
380
+ ck new --verbose
381
+ ck init --verbose
353
382
  ```
354
383
 
355
384
  **Common Issues:**
356
- - **"Access denied"**: Accept GitHub repo invitation, verify `repo` scope
357
- - **"Authentication failed"**: Check token format (ghp_*), verify env var
358
- - **Token not persisting (Windows)**: Use `SetEnvironmentVariable` or `gh auth login`
359
- - **Need help**: Run `ck diagnose`, check logs, report at GitHub issues
385
+ - **"Access denied"**: Run `ck doctor` to check auth, use `--fix` to auto-repair
386
+ - **"Authentication failed"**: Run `ck doctor --fix` to re-authenticate, or manually run `gh auth login` (select 'Login with a web browser')
387
+ - **"GitHub CLI not authenticated"**: Run `gh auth login` and select 'Login with a web browser' (NOT 'Paste token')
388
+ - **Module errors**: Run `ck doctor --fix` to reinstall skill dependencies
389
+ - **Need help**: Run `ck doctor --report` and share the gist URL
360
390
 
361
391
  ## Available Kits
362
392
 
@@ -462,19 +492,19 @@ bun test
462
492
  ## FAQ
463
493
 
464
494
  **Q: Do I need GitHub CLI?**
465
- A: No, but recommended. Provides auto token management, OAuth security, one-time setup.
495
+ A: Yes, GitHub CLI is required. ClaudeKit uses it exclusively for authentication with private repositories.
466
496
 
467
- **Q: What token scope needed?**
468
- A: `repo` scope for private repositories. Create at [github.com/settings/tokens/new](https://github.com/settings/tokens/new?scopes=repo).
497
+ **Q: How do I authenticate?**
498
+ A: Run `gh auth login`, select 'Login with a web browser', complete OAuth in browser. Do NOT use 'Paste an authentication token'.
469
499
 
470
500
  **Q: "Access denied" error?**
471
- A: Accept GitHub repo invitation, verify `repo` scope, wait 2-5min for permissions.
501
+ A: Accept GitHub repo invitation, re-run `gh auth login` with web browser login, wait 2-5min for permissions.
472
502
 
473
- **Q: Token not persisting (Windows)?**
474
- A: Use `SetEnvironmentVariable` with `User` target, or `gh auth login`.
503
+ **Q: "GitHub CLI not authenticated" error?**
504
+ A: Run `gh auth login` and select 'Login with a web browser' (NOT 'Paste token'). PAT authentication is no longer supported.
475
505
 
476
506
  **Q: Is my token secure?**
477
- A: Yes. Tokens sanitized in logs, stored encrypted in OS keychain, never in plaintext.
507
+ A: Yes. GitHub CLI manages tokens securely via OAuth, stored encrypted in OS keychain.
478
508
 
479
509
  ## License
480
510