claudekit-cli 1.0.1 → 1.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 (69) hide show
  1. package/.github/workflows/ci.yml +2 -0
  2. package/.github/workflows/release.yml +44 -0
  3. package/CHANGELOG.md +28 -0
  4. package/CLAUDE.md +3 -2
  5. package/LICENSE +21 -0
  6. package/README.md +73 -3
  7. package/dist/index.js +11556 -10926
  8. package/package.json +1 -1
  9. package/src/commands/new.ts +41 -9
  10. package/src/commands/update.ts +59 -13
  11. package/src/commands/version.ts +135 -0
  12. package/src/index.ts +53 -1
  13. package/src/lib/download.ts +231 -1
  14. package/src/lib/github.ts +56 -0
  15. package/src/lib/prompts.ts +4 -3
  16. package/src/types.ts +11 -2
  17. package/src/utils/file-scanner.ts +134 -0
  18. package/src/utils/logger.ts +108 -21
  19. package/src/utils/safe-prompts.ts +54 -0
  20. package/tests/commands/version.test.ts +297 -0
  21. package/tests/lib/github-download-priority.test.ts +301 -0
  22. package/tests/lib/github.test.ts +2 -2
  23. package/tests/lib/merge.test.ts +77 -0
  24. package/tests/types.test.ts +4 -0
  25. package/tests/utils/file-scanner.test.ts +202 -0
  26. package/tests/utils/logger.test.ts +115 -0
  27. package/.opencode/agent/code-reviewer.md +0 -141
  28. package/.opencode/agent/debugger.md +0 -74
  29. package/.opencode/agent/docs-manager.md +0 -119
  30. package/.opencode/agent/git-manager.md +0 -60
  31. package/.opencode/agent/planner-researcher.md +0 -100
  32. package/.opencode/agent/planner.md +0 -87
  33. package/.opencode/agent/project-manager.md +0 -113
  34. package/.opencode/agent/researcher.md +0 -173
  35. package/.opencode/agent/solution-brainstormer.md +0 -89
  36. package/.opencode/agent/system-architecture.md +0 -192
  37. package/.opencode/agent/tester.md +0 -96
  38. package/.opencode/agent/ui-ux-designer.md +0 -203
  39. package/.opencode/agent/ui-ux-developer.md +0 -97
  40. package/.opencode/command/cook.md +0 -7
  41. package/.opencode/command/debug.md +0 -10
  42. package/.opencode/command/design/3d.md +0 -65
  43. package/.opencode/command/design/fast.md +0 -18
  44. package/.opencode/command/design/good.md +0 -21
  45. package/.opencode/command/design/screenshot.md +0 -22
  46. package/.opencode/command/design/video.md +0 -22
  47. package/.opencode/command/fix/ci.md +0 -8
  48. package/.opencode/command/fix/fast.md +0 -11
  49. package/.opencode/command/fix/hard.md +0 -15
  50. package/.opencode/command/fix/logs.md +0 -16
  51. package/.opencode/command/fix/test.md +0 -18
  52. package/.opencode/command/fix/types.md +0 -10
  53. package/.opencode/command/git/cm.md +0 -5
  54. package/.opencode/command/git/cp.md +0 -4
  55. package/.opencode/command/plan/ci.md +0 -12
  56. package/.opencode/command/plan/two.md +0 -13
  57. package/.opencode/command/plan.md +0 -10
  58. package/.opencode/command/test.md +0 -7
  59. package/.opencode/command/watzup.md +0 -8
  60. package/plans/251008-claudekit-cli-implementation-plan.md +0 -1469
  61. package/plans/reports/251008-from-code-reviewer-to-developer-review-report.md +0 -864
  62. package/plans/reports/251008-from-tester-to-developer-test-summary-report.md +0 -409
  63. package/plans/reports/251008-researcher-download-extraction-report.md +0 -1377
  64. package/plans/reports/251008-researcher-github-api-report.md +0 -1339
  65. package/plans/research/251008-cli-frameworks-bun-research.md +0 -1051
  66. package/plans/templates/bug-fix-template.md +0 -69
  67. package/plans/templates/feature-implementation-template.md +0 -84
  68. package/plans/templates/refactor-template.md +0 -82
  69. package/plans/templates/template-usage-guide.md +0 -58
@@ -5,10 +5,12 @@ on:
5
5
  branches:
6
6
  - main
7
7
  - master
8
+ - dev
8
9
  push:
9
10
  branches:
10
11
  - main
11
12
  - master
13
+ - dev
12
14
 
13
15
  jobs:
14
16
  test:
@@ -56,3 +56,47 @@ jobs:
56
56
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57
57
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
58
58
  run: npx semantic-release
59
+
60
+ - name: Notify Discord
61
+ if: ${{ success() }}
62
+ uses: actions/github-script@v7
63
+ env:
64
+ DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
65
+ with:
66
+ github-token: ${{ secrets.GITHUB_TOKEN }}
67
+ script: |
68
+ if (!process.env.DISCORD_WEBHOOK_URL) {
69
+ core.warning('DISCORD_WEBHOOK_URL not set, skipping Discord notification.')
70
+ return
71
+ }
72
+
73
+ const { owner, repo } = context.repo
74
+ const { data: releases } = await github.rest.repos.listReleases({
75
+ owner,
76
+ repo,
77
+ per_page: 1,
78
+ })
79
+
80
+ if (!releases.length) {
81
+ core.warning('No releases found, skipping Discord notification.')
82
+ return
83
+ }
84
+
85
+ const release = releases[0]
86
+ const description = (release.body || '').slice(0, 4000)
87
+
88
+ await fetch(process.env.DISCORD_WEBHOOK_URL, {
89
+ method: 'POST',
90
+ headers: { 'Content-Type': 'application/json' },
91
+ body: JSON.stringify({
92
+ username: 'ClaudeKit Release Bot',
93
+ embeds: [
94
+ {
95
+ title: `Release ${release.name || release.tag_name}`,
96
+ url: release.html_url,
97
+ description: description || 'No changelog available.',
98
+ timestamp: release.created_at,
99
+ },
100
+ ],
101
+ }),
102
+ })
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # [1.2.0](https://github.com/mrgoonie/claudekit-cli/compare/v1.1.0...v1.2.0) (2025-10-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **cli:** resolve unicode character rendering in terminal output ([a8d1e53](https://github.com/mrgoonie/claudekit-cli/commit/a8d1e53462be644e8435b17a6679453860a1c06a))
7
+ * **download:** implement hybrid asset download with GitHub tarball fallback ([bfa2262](https://github.com/mrgoonie/claudekit-cli/commit/bfa22624562f5098a017c38d39906315edde98a4))
8
+ * format package.json keywords array to single line ([c4f5858](https://github.com/mrgoonie/claudekit-cli/commit/c4f5858dc1e4d95df5b9e4233884f7ba8b09a09a))
9
+
10
+
11
+ ### Features
12
+
13
+ * **cli:** add verbose logging with --verbose flag and log file support ([d0c960d](https://github.com/mrgoonie/claudekit-cli/commit/d0c960d7115f4eb38b328f08ed980eda12dacd4b))
14
+ * **download:** prioritize ClaudeKit package assets in release downloads ([07533fe](https://github.com/mrgoonie/claudekit-cli/commit/07533fead1ed7f8382db81b65c4b82a7578ac86f))
15
+ * **update:** add custom file preservation and fix download authentication ([901f356](https://github.com/mrgoonie/claudekit-cli/commit/901f356de0fed1c68e3ad249d293f3eb3867bacf))
16
+
17
+ # [1.1.0](https://github.com/mrgoonie/claudekit-cli/compare/v1.0.1...v1.1.0) (2025-10-17)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * format package.json keywords array to single line ([c8dd66f](https://github.com/mrgoonie/claudekit-cli/commit/c8dd66faa94a84188790947fe3ee6f562d63cd46))
23
+
24
+
25
+ ### Features
26
+
27
+ * **cli:** add versions command to list available releases ([27fbad1](https://github.com/mrgoonie/claudekit-cli/commit/27fbad1be3b5df90cb85ba9a3dd1b0eeb4fa6125))
28
+
1
29
  ## [1.0.1](https://github.com/mrgoonie/claudekit-cli/compare/v1.0.0...v1.0.1) (2025-10-09)
2
30
 
3
31
 
package/CLAUDE.md CHANGED
@@ -15,6 +15,8 @@ Your role is to analyze user requirements, delegate tasks to appropriate sub-age
15
15
 
16
16
  **IMPORTANT:** You must follow strictly the development rules in `./.claude/workflows/development-rules.md` file.
17
17
  **IMPORTANT:** Before you plan or proceed any implementation, always read the `./README.md` file first to get context.
18
+ **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
19
+ **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
18
20
 
19
21
  ## Documentation Management
20
22
 
@@ -29,5 +31,4 @@ We keep all important docs in `./docs` folder and keep updating them, structure
29
31
  ├── deployment-guide.md
30
32
  ├── system-architecture.md
31
33
  └── project-roadmap.md
32
- ```
33
-
34
+ ```
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Duy Nguyen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -94,18 +94,59 @@ ck update --kit engineer
94
94
  ck update --kit engineer --version v1.0.0
95
95
  ```
96
96
 
97
+ ### List Available Versions
98
+
99
+ ```bash
100
+ # Show all available versions for all kits
101
+ ck versions
102
+
103
+ # Filter by specific kit
104
+ ck versions --kit engineer
105
+ ck versions --kit marketing
106
+
107
+ # Show more versions (default: 30)
108
+ ck versions --limit 50
109
+
110
+ # Include prereleases and drafts
111
+ ck versions --all
112
+ ```
113
+
97
114
  ### Other Commands
98
115
 
99
116
  ```bash
100
- # Show version
117
+ # Show CLI version
101
118
  ck --version
102
- ck -v
103
119
 
104
120
  # Show help
105
121
  ck --help
106
122
  ck -h
107
123
  ```
108
124
 
125
+ ### Debugging and Verbose Mode
126
+
127
+ Enable detailed logging for debugging or troubleshooting:
128
+
129
+ ```bash
130
+ # Enable verbose logging with flag
131
+ ck new --verbose
132
+ ck update -v # Short form
133
+
134
+ # Using environment variable
135
+ CLAUDEKIT_VERBOSE=1 ck new
136
+
137
+ # Save logs to file for sharing
138
+ ck new --verbose --log-file debug.log
139
+ ```
140
+
141
+ **Verbose mode shows:**
142
+ - HTTP request/response details (with sanitized tokens)
143
+ - File operations (downloads, extractions, copies)
144
+ - Command execution steps and timing
145
+ - Error stack traces with full context
146
+ - Authentication flow details
147
+
148
+ **Note:** All sensitive data (tokens, credentials) is automatically sanitized in verbose logs for security.
149
+
109
150
  ## Authentication
110
151
 
111
152
  The CLI requires a GitHub Personal Access Token (PAT) to download releases from private repositories. The authentication flow follows a multi-tier fallback:
@@ -161,6 +202,34 @@ The following file patterns are protected and will not be overwritten during upd
161
202
  - `node_modules/**`, `.git/**`
162
203
  - `dist/**`, `build/**`
163
204
 
205
+ ### Custom .claude Files
206
+
207
+ When updating a project, the CLI automatically preserves your custom `.claude/` files that don't exist in the new release package. This allows you to maintain:
208
+
209
+ - Custom slash commands
210
+ - Personal workflows
211
+ - Project-specific configurations
212
+ - Any other custom files in `.claude/` directory
213
+
214
+ **How it works:**
215
+ 1. Before updating, the CLI scans your project's `.claude/` directory
216
+ 2. Compares it with the new release's `.claude/` directory
217
+ 3. Identifies custom files (files in your project but not in the release)
218
+ 4. Automatically protects these custom files during the update
219
+
220
+ **Example:**
221
+ ```
222
+ Your project:
223
+ .claude/
224
+ ├── commands/standard.md (from ClaudeKit)
225
+ └── commands/my-custom.md (your custom command)
226
+
227
+ After update:
228
+ .claude/
229
+ ├── commands/standard.md (updated from new release)
230
+ └── commands/my-custom.md (preserved - your custom file)
231
+ ```
232
+
164
233
  ## Development
165
234
 
166
235
  ```bash
@@ -233,7 +302,8 @@ claudekit-cli/
233
302
  ### 1. Commands
234
303
  - **`ck new`**: Create new project from release
235
304
  - **`ck update`**: Update existing project
236
- - **`ck --version`**: Show version
305
+ - **`ck versions`**: List available versions of ClaudeKit repositories
306
+ - **`ck --version`**: Show CLI version
237
307
  - **`ck --help`**: Show help
238
308
 
239
309
  ### 2. Authentication (Multi-Tier Fallback)