claudekit-cli 1.2.2 → 1.4.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.
@@ -38,8 +38,8 @@ jobs:
38
38
  - name: Run linter
39
39
  run: bun run lint
40
40
 
41
- - name: Run tests
42
- run: bun test
43
-
44
41
  - name: Build
45
42
  run: bun run build
43
+
44
+ - name: Run tests
45
+ run: bun test
@@ -0,0 +1,57 @@
1
+ name: Claude Code Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize]
6
+ # Optional: Only run on specific file changes
7
+ # paths:
8
+ # - "src/**/*.ts"
9
+ # - "src/**/*.tsx"
10
+ # - "src/**/*.js"
11
+ # - "src/**/*.jsx"
12
+
13
+ jobs:
14
+ claude-review:
15
+ # Optional: Filter by PR author
16
+ # if: |
17
+ # github.event.pull_request.user.login == 'external-contributor' ||
18
+ # github.event.pull_request.user.login == 'new-developer' ||
19
+ # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20
+
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: read
24
+ pull-requests: read
25
+ issues: read
26
+ id-token: write
27
+
28
+ steps:
29
+ - name: Checkout repository
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 1
33
+
34
+ - name: Run Claude Code Review
35
+ id: claude-review
36
+ uses: anthropics/claude-code-action@v1
37
+ with:
38
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39
+ prompt: |
40
+ REPO: ${{ github.repository }}
41
+ PR NUMBER: ${{ github.event.pull_request.number }}
42
+
43
+ Please review this pull request and provide feedback on:
44
+ - Code quality and best practices
45
+ - Potential bugs or issues
46
+ - Performance considerations
47
+ - Security concerns
48
+ - Test coverage
49
+
50
+ Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
51
+
52
+ Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53
+
54
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55
+ # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
56
+ claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
57
+
@@ -0,0 +1,50 @@
1
+ name: Claude Code
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: read
23
+ pull-requests: read
24
+ issues: read
25
+ id-token: write
26
+ actions: read # Required for Claude to read CI results on PRs
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 1
32
+
33
+ - name: Run Claude Code
34
+ id: claude
35
+ uses: anthropics/claude-code-action@v1
36
+ with:
37
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38
+
39
+ # This is an optional setting that allows Claude to read CI results on PRs
40
+ additional_permissions: |
41
+ actions: read
42
+
43
+ # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44
+ # prompt: 'Update the pull request description to include a summary of changes.'
45
+
46
+ # Optional: Add claude_args to customize behavior and configuration
47
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48
+ # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
49
+ # claude_args: '--allowed-tools Bash(gh pr:*)'
50
+
package/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ # [1.4.0](https://github.com/mrgoonie/claudekit-cli/compare/v1.3.0...v1.4.0) (2025-10-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * add --exclude flag to new and update commands ([8a0d7a0](https://github.com/mrgoonie/claudekit-cli/commit/8a0d7a00de70823d4fecac26d4c7e82c4df2ab0f))
7
+
8
+ # [1.3.0](https://github.com/mrgoonie/claudekit-cli/compare/v1.2.2...v1.3.0) (2025-10-21)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fix CLI path calculation in integration tests ([c841e1d](https://github.com/mrgoonie/claudekit-cli/commit/c841e1d68abf9d1a8a714cd5dcec54357fc8c646))
14
+ * regenerate bun.lock for bun v1.3.0 compatibility ([e19c943](https://github.com/mrgoonie/claudekit-cli/commit/e19c943ad5b653694476527226448850c537c88d))
15
+ * skip integration tests in CI environment ([a890423](https://github.com/mrgoonie/claudekit-cli/commit/a890423b8e9d791c1387c4219dde78298b57159d))
16
+ * update bun.lock after dependency removal ([bfccb39](https://github.com/mrgoonie/claudekit-cli/commit/bfccb393aa12b395429aef8d8440b22417c8438b))
17
+
18
+
19
+ ### Features
20
+
21
+ * add version.json and integration tests ([fc538d0](https://github.com/mrgoonie/claudekit-cli/commit/fc538d033f579962f8aee73ae3f8a25370189037))
22
+ * enhance CLI with security features and non-interactive mode ([297e6bb](https://github.com/mrgoonie/claudekit-cli/commit/297e6bba73f87411d3be9918929a35758b62be41))
23
+
1
24
  ## [1.2.2](https://github.com/mrgoonie/claudekit-cli/compare/v1.2.1...v1.2.2) (2025-10-20)
2
25
 
3
26
 
package/README.md CHANGED
@@ -79,6 +79,12 @@ ck new --dir my-project --kit engineer
79
79
 
80
80
  # Specific version
81
81
  ck new --kit engineer --version v1.0.0
82
+
83
+ # With exclude patterns
84
+ ck new --kit engineer --exclude "*.log" --exclude "temp/**"
85
+
86
+ # Multiple patterns
87
+ ck new --exclude "*.log" --exclude "*.tmp" --exclude "cache/**"
82
88
  ```
83
89
 
84
90
  ### Update Existing Project
@@ -94,6 +100,9 @@ ck update --kit engineer
94
100
 
95
101
  # Specific version
96
102
  ck update --kit engineer --version v1.0.0
103
+
104
+ # With exclude patterns
105
+ ck update --exclude "local-config/**" --exclude "*.local"
97
106
  ```
98
107
 
99
108
  ### List Available Versions
@@ -204,6 +213,95 @@ The following file patterns are protected and will not be overwritten during upd
204
213
  - `node_modules/**`, `.git/**`
205
214
  - `dist/**`, `build/**`
206
215
 
216
+ ## Excluding Files
217
+
218
+ Use the `--exclude` flag to skip specific files or directories during download and extraction. This is useful for:
219
+
220
+ - Excluding temporary or cache directories
221
+ - Skipping log files or debug output
222
+ - Omitting files you want to manage manually
223
+ - Avoiding unnecessary large files
224
+
225
+ ### Basic Usage
226
+
227
+ ```bash
228
+ # Exclude log files
229
+ ck new --exclude "*.log"
230
+
231
+ # Exclude multiple patterns
232
+ ck new --exclude "*.log" --exclude "temp/**" --exclude "cache/**"
233
+
234
+ # Common exclude patterns for updates
235
+ ck update --exclude "node_modules/**" --exclude "dist/**" --exclude ".env.*"
236
+ ```
237
+
238
+ ### Supported Glob Patterns
239
+
240
+ The `--exclude` flag accepts standard glob patterns:
241
+
242
+ - `*` - Match any characters except `/` (e.g., `*.log` matches all log files)
243
+ - `**` - Match any characters including `/` (e.g., `temp/**` matches all files in temp directory)
244
+ - `?` - Match single character (e.g., `file?.txt` matches `file1.txt`, `file2.txt`)
245
+ - `[abc]` - Match characters in brackets (e.g., `[Tt]emp` matches `Temp` or `temp`)
246
+ - `{a,b}` - Match alternatives (e.g., `*.{log,tmp}` matches `*.log` and `*.tmp`)
247
+
248
+ ### Common Exclude Patterns
249
+
250
+ ```bash
251
+ # Exclude all log files
252
+ --exclude "*.log" --exclude "**/*.log"
253
+
254
+ # Exclude temporary directories
255
+ --exclude "tmp/**" --exclude "temp/**" --exclude ".tmp/**"
256
+
257
+ # Exclude cache directories
258
+ --exclude "cache/**" --exclude ".cache/**" --exclude "**/.cache/**"
259
+
260
+ # Exclude build artifacts
261
+ --exclude "dist/**" --exclude "build/**" --exclude "out/**"
262
+
263
+ # Exclude local configuration
264
+ --exclude "*.local" --exclude "local/**" --exclude ".env.local"
265
+
266
+ # Exclude IDE/editor files
267
+ --exclude ".vscode/**" --exclude ".idea/**" --exclude "*.swp"
268
+ ```
269
+
270
+ ### Important Notes
271
+
272
+ **Additive Behavior:**
273
+ - User exclude patterns are ADDED to the default protected patterns
274
+ - They do not replace the built-in protections
275
+ - All patterns work together to determine which files to skip
276
+
277
+ **Security Restrictions:**
278
+ - Absolute paths (starting with `/`) are not allowed
279
+ - Path traversal patterns (containing `..`) are not allowed
280
+ - Patterns must be between 1-500 characters
281
+ - These restrictions prevent accidental or malicious file system access
282
+
283
+ **Pattern Matching:**
284
+ - Patterns are case-sensitive on Linux/macOS
285
+ - Patterns are case-insensitive on Windows
286
+ - Patterns are applied during both extraction and merge phases
287
+ - Excluded files are never written to disk, saving time and space
288
+
289
+ **Examples of Invalid Patterns:**
290
+
291
+ ```bash
292
+ # ❌ Absolute paths not allowed
293
+ ck new --exclude "/etc/passwd"
294
+
295
+ # ❌ Path traversal not allowed
296
+ ck new --exclude "../../secret"
297
+
298
+ # ❌ Empty patterns not allowed
299
+ ck new --exclude ""
300
+
301
+ # ✅ Correct way to exclude root-level files
302
+ ck new --exclude "secret.txt" --exclude "config.local.json"
303
+ ```
304
+
207
305
  ### Custom .claude Files
208
306
 
209
307
  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:
package/biome.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3
3
  "files": {
4
- "ignore": ["dist", "node_modules", "*.log", ".claude"]
4
+ "ignore": ["dist", "node_modules", "*.log", ".claude", "package.json"]
5
5
  },
6
6
  "organizeImports": {
7
7
  "enabled": true