claudekit-cli 1.0.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 (137) hide show
  1. package/.claude/agents/brainstormer.md +96 -0
  2. package/.claude/agents/code-reviewer.md +141 -0
  3. package/.claude/agents/copywriter.md +108 -0
  4. package/.claude/agents/database-admin.md +86 -0
  5. package/.claude/agents/debugger.md +124 -0
  6. package/.claude/agents/docs-manager.md +115 -0
  7. package/.claude/agents/git-manager.md +60 -0
  8. package/.claude/agents/journal-writer.md +111 -0
  9. package/.claude/agents/planner.md +87 -0
  10. package/.claude/agents/project-manager.md +113 -0
  11. package/.claude/agents/researcher.md +173 -0
  12. package/.claude/agents/scout.md +123 -0
  13. package/.claude/agents/tester.md +95 -0
  14. package/.claude/agents/ui-ux-designer.md +206 -0
  15. package/.claude/commands/bootstrap.md +104 -0
  16. package/.claude/commands/brainstorm.md +67 -0
  17. package/.claude/commands/content/enhance.md +13 -0
  18. package/.claude/commands/content/fast.md +11 -0
  19. package/.claude/commands/content/good.md +13 -0
  20. package/.claude/commands/cook.md +19 -0
  21. package/.claude/commands/debug.md +10 -0
  22. package/.claude/commands/design/3d.md +65 -0
  23. package/.claude/commands/design/describe.md +13 -0
  24. package/.claude/commands/design/fast.md +19 -0
  25. package/.claude/commands/design/good.md +23 -0
  26. package/.claude/commands/design/screenshot.md +23 -0
  27. package/.claude/commands/design/video.md +23 -0
  28. package/.claude/commands/docs/init.md +13 -0
  29. package/.claude/commands/docs/summarize.md +10 -0
  30. package/.claude/commands/docs/update.md +21 -0
  31. package/.claude/commands/fix/ci.md +11 -0
  32. package/.claude/commands/fix/fast.md +12 -0
  33. package/.claude/commands/fix/hard.md +18 -0
  34. package/.claude/commands/fix/logs.md +16 -0
  35. package/.claude/commands/fix/test.md +18 -0
  36. package/.claude/commands/fix/types.md +10 -0
  37. package/.claude/commands/git/cm.md +5 -0
  38. package/.claude/commands/git/cp.md +4 -0
  39. package/.claude/commands/integrate/polar.md +42 -0
  40. package/.claude/commands/plan/ci.md +12 -0
  41. package/.claude/commands/plan/two.md +13 -0
  42. package/.claude/commands/plan.md +10 -0
  43. package/.claude/commands/scout.md +29 -0
  44. package/.claude/commands/test.md +7 -0
  45. package/.claude/commands/watzup.md +8 -0
  46. package/.claude/hooks/telegram_notify.sh +136 -0
  47. package/.claude/send-discord.sh +64 -0
  48. package/.claude/settings.json +7 -0
  49. package/.claude/statusline.sh +143 -0
  50. package/.claude/workflows/development-rules.md +80 -0
  51. package/.claude/workflows/documentation-management.md +28 -0
  52. package/.claude/workflows/orchestration-protocol.md +16 -0
  53. package/.claude/workflows/primary-workflow.md +41 -0
  54. package/.github/workflows/ci.yml +43 -0
  55. package/.github/workflows/release.yml +58 -0
  56. package/.opencode/agent/code-reviewer.md +141 -0
  57. package/.opencode/agent/debugger.md +74 -0
  58. package/.opencode/agent/docs-manager.md +119 -0
  59. package/.opencode/agent/git-manager.md +60 -0
  60. package/.opencode/agent/planner-researcher.md +100 -0
  61. package/.opencode/agent/planner.md +87 -0
  62. package/.opencode/agent/project-manager.md +113 -0
  63. package/.opencode/agent/researcher.md +173 -0
  64. package/.opencode/agent/solution-brainstormer.md +89 -0
  65. package/.opencode/agent/system-architecture.md +192 -0
  66. package/.opencode/agent/tester.md +96 -0
  67. package/.opencode/agent/ui-ux-designer.md +203 -0
  68. package/.opencode/agent/ui-ux-developer.md +97 -0
  69. package/.opencode/command/cook.md +7 -0
  70. package/.opencode/command/debug.md +10 -0
  71. package/.opencode/command/design/3d.md +65 -0
  72. package/.opencode/command/design/fast.md +18 -0
  73. package/.opencode/command/design/good.md +21 -0
  74. package/.opencode/command/design/screenshot.md +22 -0
  75. package/.opencode/command/design/video.md +22 -0
  76. package/.opencode/command/docs/init.md +11 -0
  77. package/.opencode/command/docs/summarize.md +10 -0
  78. package/.opencode/command/docs/update.md +18 -0
  79. package/.opencode/command/fix/ci.md +8 -0
  80. package/.opencode/command/fix/fast.md +11 -0
  81. package/.opencode/command/fix/hard.md +15 -0
  82. package/.opencode/command/fix/logs.md +16 -0
  83. package/.opencode/command/fix/test.md +18 -0
  84. package/.opencode/command/fix/types.md +10 -0
  85. package/.opencode/command/git/cm.md +5 -0
  86. package/.opencode/command/git/cp.md +4 -0
  87. package/.opencode/command/plan/ci.md +12 -0
  88. package/.opencode/command/plan/two.md +13 -0
  89. package/.opencode/command/plan.md +10 -0
  90. package/.opencode/command/test.md +7 -0
  91. package/.opencode/command/watzup.md +8 -0
  92. package/.releaserc.json +17 -0
  93. package/.repomixignore +15 -0
  94. package/AGENTS.md +217 -0
  95. package/CHANGELOG.md +16 -0
  96. package/CLAUDE.md +33 -0
  97. package/README.md +214 -0
  98. package/biome.json +25 -0
  99. package/bun.lock +1238 -0
  100. package/dist/index.js +19100 -0
  101. package/docs/code-standards.md +1128 -0
  102. package/docs/codebase-summary.md +821 -0
  103. package/docs/github-setup.md +176 -0
  104. package/docs/project-pdr.md +739 -0
  105. package/docs/system-architecture.md +950 -0
  106. package/docs/tech-stack.md +290 -0
  107. package/package.json +60 -0
  108. package/plans/251008-claudekit-cli-implementation-plan.md +1469 -0
  109. package/plans/reports/251008-from-code-reviewer-to-developer-review-report.md +864 -0
  110. package/plans/reports/251008-from-tester-to-developer-test-summary-report.md +409 -0
  111. package/plans/reports/251008-researcher-download-extraction-report.md +1377 -0
  112. package/plans/reports/251008-researcher-github-api-report.md +1339 -0
  113. package/plans/research/251008-cli-frameworks-bun-research.md +1051 -0
  114. package/plans/templates/bug-fix-template.md +69 -0
  115. package/plans/templates/feature-implementation-template.md +84 -0
  116. package/plans/templates/refactor-template.md +82 -0
  117. package/plans/templates/template-usage-guide.md +58 -0
  118. package/src/commands/new.ts +118 -0
  119. package/src/commands/update.ts +114 -0
  120. package/src/index.ts +44 -0
  121. package/src/lib/auth.ts +157 -0
  122. package/src/lib/download.ts +180 -0
  123. package/src/lib/github.ts +157 -0
  124. package/src/lib/merge.ts +116 -0
  125. package/src/lib/prompts.ts +113 -0
  126. package/src/types.ts +149 -0
  127. package/src/utils/config.ts +87 -0
  128. package/src/utils/logger.ts +37 -0
  129. package/tests/lib/auth.test.ts +116 -0
  130. package/tests/lib/download.test.ts +70 -0
  131. package/tests/lib/github.test.ts +52 -0
  132. package/tests/lib/merge.test.ts +138 -0
  133. package/tests/lib/prompts.test.ts +66 -0
  134. package/tests/types.test.ts +255 -0
  135. package/tests/utils/config.test.ts +263 -0
  136. package/tests/utils/logger.test.ts +124 -0
  137. package/tsconfig.json +30 -0
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Research, analyze, and create an implementation plan
3
+ ---
4
+
5
+ Use the `planner` subagent to plan for this task:
6
+ <task>
7
+ $ARGUMENTS
8
+ </task>
9
+
10
+ **IMPORTANT**: **Do not** start implementing.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Debugging technical issues and providing solutions.
3
+ ---
4
+
5
+ Use the `tester` subagent to run tests locally and analyze the summary report.
6
+
7
+ **IMPORTANT**: **Do not** start implementing.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: Review recent changes and wrap up the work
3
+ ---
4
+ Review my current branch and the most recent commits.
5
+ Provide a detailed summary of all changes, including what was modified, added, or removed.
6
+ Analyze the overall impact and quality of the changes.
7
+
8
+ **IMPORTANT**: **Do not** start implementing.
@@ -0,0 +1,17 @@
1
+ {
2
+ "branches": ["main"],
3
+ "plugins": [
4
+ "@semantic-release/commit-analyzer",
5
+ "@semantic-release/release-notes-generator",
6
+ "@semantic-release/changelog",
7
+ "@semantic-release/npm",
8
+ [
9
+ "@semantic-release/git",
10
+ {
11
+ "assets": ["package.json", "CHANGELOG.md"],
12
+ "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
13
+ }
14
+ ],
15
+ "@semantic-release/github"
16
+ ]
17
+ }
package/.repomixignore ADDED
@@ -0,0 +1,15 @@
1
+ docs/*
2
+ plans/*
3
+ assets/*
4
+ dist/*
5
+ coverage/*
6
+ build/*
7
+ ios/*
8
+ android/*
9
+
10
+ .claude/*
11
+ .serena/*
12
+ .pnpm-store/*
13
+ .github/*
14
+ .dart_tool/*
15
+ .idea/*
package/AGENTS.md ADDED
@@ -0,0 +1,217 @@
1
+ # AGENTS.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ ...
8
+
9
+ ## Project Structure
10
+
11
+ - `docs/` - Product requirements and wireframes
12
+ - `product-overview-pdr.md` - Complete product requirements document (Vietnamese)
13
+ - `code-standards.md` - Code standards and conventions
14
+ - `codebase-summary.md` - Codebase summary & structure
15
+ - `project-roadmap.md` - Project roadmap
16
+ - `plans/` - Implementation plans
17
+ - `templates/` - Implementation plan templates
18
+ - `reports/` - Implementation reports
19
+
20
+ ## Key Features to Implement
21
+
22
+ ...
23
+
24
+ ## Development Commands
25
+
26
+ ...
27
+
28
+ ## Architecture Guidelines
29
+
30
+ ...
31
+
32
+ ---
33
+
34
+ ## Role & Responsibilities
35
+
36
+ Your role is to analyze user requirements, delegate tasks to appropriate sub-agents, and ensure cohesive delivery of features that meet specifications and architectural standards.
37
+
38
+ ### Orchestration Protocol
39
+
40
+ #### Sequential Chaining
41
+ Chain subagents when tasks have dependencies or require outputs from previous steps:
42
+ - **Planning → Implementation → Testing → Review**: Use for feature development
43
+ - **Research → Design → Code → Documentation**: Use for new system components
44
+ - Each agent completes fully before the next begins
45
+ - Pass context and outputs between agents in the chain
46
+
47
+ #### Parallel Execution
48
+ Spawn multiple subagents simultaneously for independent tasks:
49
+ - **Code + Tests + Docs**: When implementing separate, non-conflicting components
50
+ - **Multiple Feature Branches**: Different agents working on isolated features
51
+ - **Cross-platform Development**: iOS and Android specific implementations
52
+ - **Careful Coordination**: Ensure no file conflicts or shared resource contention
53
+ - **Merge Strategy**: Plan integration points before parallel execution begins
54
+
55
+ ### Core Responsibilities
56
+
57
+ #### 1. Code Implementation
58
+ - Before you start, delegate to `planner` agent to create a implementation plan with TODO tasks in `./plans` directory.
59
+ - When in planning phase, use multiple `researcher` agents in parallel to conduct research on different relevant technical topics and report back to `planner` agent to create implementation plan.
60
+ - Write clean, readable, and maintainable code
61
+ - Follow established architectural patterns
62
+ - Implement features according to specifications
63
+ - Handle edge cases and error scenarios
64
+ - **DO NOT** create new enhanced files, update to the existing files directly.
65
+ - **[IMPORTANT]** After creating or modifying code file, run `flutter analyze <path/to/file>` to check for any compile errors.
66
+
67
+ #### 2. Testing
68
+ - Delegate to `tester` agent to run tests and analyze the summary report.
69
+ - Write comprehensive unit tests
70
+ - Ensure high code coverage
71
+ - Test error scenarios
72
+ - Validate performance requirements
73
+ - Tests are critical for ensuring code quality and reliability, **DO NOT** ignore failing tests just to pass the build.
74
+ - **IMPORTANT:** Always fix failing tests follow the recommendations and delegate to `tester` agent to run tests again, only finish your session when all tests pass.
75
+
76
+ #### 3. Code Quality
77
+ - After finish implementation, delegate to `code-reviewer` agent to review code.
78
+ - Follow coding standards and conventions
79
+ - Write self-documenting code
80
+ - Add meaningful comments for complex logic
81
+ - Optimize for performance and maintainability
82
+
83
+ #### 4. Integration
84
+ - Always follow the plan given by `planner` agent
85
+ - Ensure seamless integration with existing code
86
+ - Follow API contracts precisely
87
+ - Maintain backward compatibility
88
+ - Document breaking changes
89
+ - Delegate to `docs-manager` agent to update docs in `./docs` directory if any.
90
+
91
+ #### 5. Debugging
92
+ - When a user report bugs or issues on the server or a CI/CD pipeline, delegate to `debugger` agent to run tests and analyze the summary report.
93
+ - Read the summary report from `debugger` agent and implement the fix.
94
+ - Delegate to `tester` agent to run tests and analyze the summary report.
95
+ - If the `tester` agent reports failed tests, fix them follow the recommendations.
96
+
97
+ ---
98
+
99
+ ## Context Management & Anti-Rot Guidelines
100
+
101
+ **REMEMBER: Everything is Context Engineering!**
102
+ Subagents have their own context, delegate tasks to them using file system whenever possible.
103
+
104
+ ### Context Refresh Protocol
105
+ To prevent context degradation and maintain performance in long conversations:
106
+
107
+ #### Agent Handoff Refresh Points
108
+ - **Between Agents**: Reset context when switching between specialized agents
109
+ - **Phase Transitions**: Clear context between planning → implementation → testing → review phases
110
+ - **Document Generation**: Use fresh context for creating plans, reports, and documentation
111
+ - **Error Recovery**: Reset context after debugging sessions to avoid confusion
112
+
113
+ #### Information Handoff Structure
114
+ When delegating to agents, provide only essential context:
115
+ ```markdown
116
+ ## Task Summary
117
+ - **Objective**: [brief description]
118
+ - **Scope**: [specific boundaries]
119
+ - **Critical Context**: [requirements, constraints, current state]
120
+ - **Reference Files**: [relevant file paths and line numbers - don't include full content]
121
+ - **Success Criteria**: [clear acceptance criteria]
122
+ ```
123
+
124
+ #### Context Health Guidelines
125
+ - **Prioritize Recent Changes**: Emphasize recent modifications over historical data
126
+ - **Use References Over Content**: Link to files instead of including full content
127
+ - **Summary Over Details**: Provide bullet points instead of verbose explanations
128
+
129
+ ### Agent Interaction Best Practices
130
+ - Each agent should complete its task and provide a focused summary report
131
+ - Avoid circular dependencies between agents
132
+ - Use clear "handoff complete" signals when transitioning
133
+ - Include only task-relevant context in agent instructions
134
+ - Pass plan file path across subagents
135
+
136
+ ---
137
+
138
+ ## Project Documentation Management
139
+
140
+ ### Roadmap & Changelog Maintenance
141
+ - **Project Roadmap** (`./docs/development-roadmap.md`): Living document tracking project phases, milestones, and progress
142
+ - **Project Changelog** (`./docs/project-changelog.md`): Detailed record of all significant changes, features, and fixes
143
+ - **System Architecture** (`./docs/system-architecture.md`): Detailed record of all significant changes, features, and fixes
144
+ - **Code Standards** (`./docs/code-standards.md`): Detailed record of all significant changes, features, and fixes
145
+
146
+ ### Automatic Updates Required
147
+ - **After Feature Implementation**: Update roadmap progress status and changelog entries
148
+ - **After Major Milestones**: Review and adjust roadmap phases, update success metrics
149
+ - **After Bug Fixes**: Document fixes in changelog with severity and impact
150
+ - **After Security Updates**: Record security improvements and version updates
151
+ - **Weekly Reviews**: Update progress percentages and milestone statuses
152
+
153
+ ### Documentation Triggers
154
+ The `project-manager` agent MUST update these documents when:
155
+ - A development phase status changes (e.g., from "In Progress" to "Complete")
156
+ - Major features are implemented or released
157
+ - Significant bugs are resolved or security patches applied
158
+ - Project timeline or scope adjustments are made
159
+ - External dependencies or breaking changes occur
160
+
161
+ ### Update Protocol
162
+ 1. **Before Updates**: Always read current roadmap and changelog status
163
+ 2. **During Updates**: Maintain version consistency and proper formatting
164
+ 3. **After Updates**: Verify links, dates, and cross-references are accurate
165
+ 4. **Quality Check**: Ensure updates align with actual implementation progress
166
+
167
+ ---
168
+
169
+ ## Development Rules
170
+
171
+ ### General
172
+ - **File Size Management**: Keep individual code files under 500 lines for optimal context management
173
+ - Split large files into smaller, focused components
174
+ - Use composition over inheritance for complex widgets
175
+ - Extract utility functions into separate modules
176
+ - Create dedicated service classes for business logic
177
+ - You ALWAYS follow these principles: **YANGI (You Aren't Gonna Need It) - KISS (Keep It Simple, Stupid) - DRY (Don't Repeat Yourself)**
178
+ - Use `context7` mcp tools for exploring latest docs of plugins/packages
179
+ - Use `senera` mcp tools for semantic retrieval and editing capabilities
180
+ - Use `psql` bash command to query database for debugging.
181
+ - Use `eyes_vision_analysis` tool of `human` mcp server to read and analyze images.
182
+ - **[IMPORTANT]** Follow the codebase structure and code standards in `./docs` during implementation
183
+ - **[IMPORTANT]** When you finish the implementation, send a full summary report to Discord channel with `./.claude/send-discord.sh 'Your message here'` script (remember to escape the string).
184
+ - **[IMPORTANT]** Do not just simulate the implementation or mocking them, always implement the real code.
185
+
186
+ ### Subagents
187
+ Delegate detailed tasks to these subagents according to their roles & expertises:
188
+ - Use file system (in markdown format) to hand over reports in `./plans/reports` directory from agent to agent with this file name format: `YYMMDD-from-agent-name-to-agent-name-task-name-report.md`.
189
+ - Use `planner` agent to plan for the implementation plan using templates in `./plans/templates/` (`planner` agent can spawn multiple `researcher` agents in parallel to explore different approaches with "Query Fan-Out" technique).
190
+ - Use `database-admin` agent to run tests and analyze the summary report.
191
+ - Use `tester` agent to run tests and analyze the summary report.
192
+ - Use `debugger` agent to collect logs in server or github actions to analyze the summary report.
193
+ - Use `code-reviewer` agent to review code according to the implementation plan.
194
+ - Use `docs-manager` agent to update docs in `./docs` directory if any (espcially for `./docs/codebase-summary.md` when significant changes are made).
195
+ - Use `git-manager` agent to commit and push code changes.
196
+ - Use `project-manager` agent for project's progress tracking, completion verification & TODO status management.
197
+ - **[IMPORTANT]** Always delegate to `project-manager` agent after completing significant features, major milestones, or when requested to update project documentation.
198
+ **IMPORTANT:** You can intelligently spawn multiple subagents **in parallel** or **chain them sequentially** to handle the tasks efficiently.
199
+
200
+ ### Code Quality Guidelines
201
+ - Read and follow codebase structure and code standards in `./docs`
202
+ - Don't be too harsh on code linting, but make sure there are no syntax errors and code are compilable
203
+ - Prioritize functionality and readability over strict style enforcement and code formatting
204
+ - Use reasonable code quality standards that enhance developer productivity
205
+ - Use try catch error handling & cover security standards
206
+ - Use `code-reviewer` agent to review code after every implementation
207
+
208
+ ### Pre-commit/Push Rules
209
+ - Run linting before commit
210
+ - Run tests before push (DO NOT ignore failed tests just to pass the build or github actions)
211
+ - Keep commits focused on the actual code changes
212
+ - **DO NOT** commit and push any confidential information (such as dotenv files, API keys, database credentials, etc.) to git repository!
213
+ - NEVER automatically add AI attribution signatures like:
214
+ "🤖 Generated with [Claude Code]"
215
+ "Co-Authored-By: Claude noreply@anthropic.com"
216
+ Any AI tool attribution or signature
217
+ - Create clean, professional commit messages without AI references. Use conventional commit format.
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # 1.0.0 (2025-10-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add libsecret system dependency for keytar in CI workflows ([9f9bb5a](https://github.com/mrgoonie/claudekit-cli/commit/9f9bb5a351fb3071d3929fbc8c916ca88ec0167d))
7
+ * configure biome linter rules and fix formatting issues ([d68e10b](https://github.com/mrgoonie/claudekit-cli/commit/d68e10bb1e65e525069ac3b3401ae9fc8131c15e))
8
+ * ensure clearToken always clears in-memory token even if keytar fails ([ffdbb12](https://github.com/mrgoonie/claudekit-cli/commit/ffdbb12dc20f5f171be94f4fb51745eff9b6c799))
9
+ * mark native and optional dependencies as external in build ([c8a25c4](https://github.com/mrgoonie/claudekit-cli/commit/c8a25c40fb53e5bcda6fe48522ffa21f9e2907e5))
10
+ * prevent auth tests from prompting for input in CI ([4e8b8b1](https://github.com/mrgoonie/claudekit-cli/commit/4e8b8b149f03b1ae05b3fb27846786c34e58d284))
11
+
12
+
13
+ ### Features
14
+
15
+ * enhance UI/UX designer agent with improved tools and workflow clarity ([57e3467](https://github.com/mrgoonie/claudekit-cli/commit/57e3467c88c951e83fe5680358a4a5ac0e3b44d3))
16
+ * initial implementation of ClaudeKit CLI ([2e4f308](https://github.com/mrgoonie/claudekit-cli/commit/2e4f308bc99b8811ea0cc72b91a18b286b9fbd3e))
package/CLAUDE.md ADDED
@@ -0,0 +1,33 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Role & Responsibilities
6
+
7
+ Your role is to analyze user requirements, delegate tasks to appropriate sub-agents, and ensure cohesive delivery of features that meet specifications and architectural standards.
8
+
9
+ ## Workflows
10
+
11
+ - Primary workflow: `./.claude/workflows/primary-workflow.md`
12
+ - Development rules: `./.claude/workflows/development-rules.md`
13
+ - Orchestration protocols: `./.claude/workflows/orchestration-protocol.md`
14
+ - Documentation management: `./.claude/workflows/documentation-management.md`
15
+
16
+ **IMPORTANT:** You must follow strictly the development rules in `./.claude/workflows/development-rules.md` file.
17
+ **IMPORTANT:** Before you plan or proceed any implementation, always read the `./README.md` file first to get context.
18
+
19
+ ## Documentation Management
20
+
21
+ We keep all important docs in `./docs` folder and keep updating them, structure like below:
22
+
23
+ ```
24
+ ./docs
25
+ ├── project-overview-pdr.md
26
+ ├── code-standards.md
27
+ ├── codebase-summary.md
28
+ ├── design-guidelines.md
29
+ ├── deployment-guide.md
30
+ ├── system-architecture.md
31
+ └── project-roadmap.md
32
+ ```
33
+
package/README.md ADDED
@@ -0,0 +1,214 @@
1
+ # ClaudeKit CLI
2
+
3
+ Command-line tool for bootstrapping and updating ClaudeKit projects.
4
+
5
+ ## Project Overview
6
+
7
+ **ClaudeKit CLI** (`ck`) is a command-line tool for bootstrapping and updating projects from private GitHub repository releases. Built with Bun and TypeScript, it provides fast, secure, and user-friendly project setup and maintenance.
8
+
9
+ **Key Features:**
10
+ - Multi-tier GitHub authentication (gh CLI → env vars → keychain → prompt)
11
+ - Streaming downloads with progress tracking
12
+ - Smart file merging with conflict detection
13
+ - Secure credential storage using OS keychain
14
+ - Beautiful CLI interface with interactive prompts
15
+
16
+ ## Installation
17
+
18
+ ### From npm (Recommended)
19
+
20
+ ```bash
21
+ bun add -g claudekit-cli
22
+ ```
23
+
24
+ ### From Source
25
+
26
+ ```bash
27
+ git clone https://github.com/mrgoonie/claudekit-cli
28
+ cd claudekit-cli
29
+ bun install
30
+ bun link
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ### Create a New Project
36
+
37
+ ```bash
38
+ # Interactive mode
39
+ ck new
40
+
41
+ # With options
42
+ ck new --dir my-project --kit engineer
43
+
44
+ # Specific version
45
+ ck new --kit engineer --version v1.0.0
46
+ ```
47
+
48
+ ### Update Existing Project
49
+
50
+ ```bash
51
+ # Interactive mode
52
+ ck update
53
+
54
+ # With options
55
+ ck update --kit engineer
56
+
57
+ # Specific version
58
+ ck update --kit engineer --version v1.0.0
59
+ ```
60
+
61
+ ### Other Commands
62
+
63
+ ```bash
64
+ # Show version
65
+ ck --version
66
+ ck -v
67
+
68
+ # Show help
69
+ ck --help
70
+ ck -h
71
+ ```
72
+
73
+ ## Authentication
74
+
75
+ The CLI requires a GitHub Personal Access Token (PAT) to download releases from private repositories. The authentication flow follows a multi-tier fallback:
76
+
77
+ 1. **GitHub CLI**: Uses `gh auth token` if GitHub CLI is installed and authenticated
78
+ 2. **Environment Variables**: Checks `GITHUB_TOKEN` or `GH_TOKEN`
79
+ 3. **OS Keychain**: Retrieves stored token from system keychain
80
+ 4. **User Prompt**: Prompts for token input and offers to save it securely
81
+
82
+ ### Creating a Personal Access Token
83
+
84
+ 1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
85
+ 2. Generate new token with `repo` scope (for private repositories)
86
+ 3. Copy the token
87
+
88
+ ### Setting Token via Environment Variable
89
+
90
+ ```bash
91
+ export GITHUB_TOKEN=ghp_your_token_here
92
+ ```
93
+
94
+ ## Available Kits
95
+
96
+ - **engineer**: ClaudeKit Engineer - Engineering toolkit for building with Claude
97
+ - **marketing**: ClaudeKit Marketing - [Coming Soon]
98
+
99
+ ## Configuration
100
+
101
+ Configuration is stored in `~/.claudekit/config.json`:
102
+
103
+ ```json
104
+ {
105
+ "github": {
106
+ "token": "stored_in_keychain"
107
+ },
108
+ "defaults": {
109
+ "kit": "engineer",
110
+ "dir": "."
111
+ }
112
+ }
113
+ ```
114
+
115
+ ## Protected Files
116
+
117
+ The following file patterns are protected and will not be overwritten during updates:
118
+
119
+ - `.env`, `.env.local`, `.env.*.local`
120
+ - `*.key`, `*.pem`, `*.p12`
121
+ - `node_modules/**`, `.git/**`
122
+ - `dist/**`, `build/**`
123
+
124
+ ## Development
125
+
126
+ ```bash
127
+ # Install dependencies
128
+ bun install
129
+
130
+ # Run in development
131
+ bun run dev new --kit engineer
132
+
133
+ # Build
134
+ bun run build
135
+
136
+ # Compile standalone binary
137
+ bun run compile
138
+
139
+ # Run tests
140
+ bun test
141
+
142
+ # Type check
143
+ bun run typecheck
144
+
145
+ # Lint & Format
146
+ bun run lint
147
+ bun run format
148
+ ```
149
+
150
+ ## Project Structure
151
+
152
+ ```
153
+ claudekit-cli/
154
+ ├── docs/ # Documentation
155
+ │ ├── project-pdr.md # Product requirements
156
+ │ ├── code-standards.md # Coding standards
157
+ │ ├── system-architecture.md # Architecture diagrams
158
+ │ ├── codebase-summary.md # Codebase overview
159
+ │ └── tech-stack.md # Technology stack
160
+ ├── plans/ # Implementation plans & reports
161
+ │ ├── 251008-claudekit-cli-implementation-plan.md
162
+ │ ├── reports/ # Agent reports
163
+ │ ├── research/ # Research documents
164
+ │ └── templates/ # Plan templates
165
+ ├── src/ # Source code
166
+ │ ├── commands/ # Command implementations
167
+ │ │ ├── new.ts # 'ck new' command
168
+ │ │ └── update.ts # 'ck update' command
169
+ │ ├── lib/ # Core libraries
170
+ │ │ ├── auth.ts # Authentication manager
171
+ │ │ ├── github.ts # GitHub API client
172
+ │ │ ├── download.ts # Download manager
173
+ │ │ ├── merge.ts # File merger
174
+ │ │ └── prompts.ts # Interactive prompts
175
+ │ ├── utils/ # Utilities
176
+ │ │ ├── config.ts # Configuration manager
177
+ │ │ └── logger.ts # Logger with sanitization
178
+ │ ├── index.ts # CLI entry point
179
+ │ └── types.ts # Type definitions
180
+ ├── tests/ # Test files (mirrors src/)
181
+ │ ├── lib/
182
+ │ ├── utils/
183
+ │ └── types.test.ts
184
+ ├── README.md # User documentation
185
+ ├── package.json # Package manifest
186
+ └── tsconfig.json # TypeScript config
187
+ ```
188
+
189
+ ---
190
+
191
+ ## Key Features & Components
192
+
193
+ ### 1. Commands
194
+ - **`ck new`**: Create new project from release
195
+ - **`ck update`**: Update existing project
196
+ - **`ck --version`**: Show version
197
+ - **`ck --help`**: Show help
198
+
199
+ ### 2. Authentication (Multi-Tier Fallback)
200
+ 1. GitHub CLI (`gh auth token`)
201
+ 2. Environment variables (GITHUB_TOKEN, GH_TOKEN)
202
+ 3. Configuration file (~/.claudekit/config.json)
203
+ 4. OS Keychain (via keytar)
204
+ 5. User prompt (with optional secure storage)
205
+
206
+ ### 3. Core Operations
207
+ - **Download**: Streaming downloads with progress bars
208
+ - **Extract**: TAR.GZ and ZIP support with path traversal protection
209
+ - **Merge**: Smart file merging with conflict detection
210
+ - **Protected Files**: .env, *.key, *.pem, node_modules/, .git/, etc.
211
+
212
+ ## License
213
+
214
+ MIT
package/biome.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3
+ "organizeImports": {
4
+ "enabled": true
5
+ },
6
+ "linter": {
7
+ "enabled": true,
8
+ "rules": {
9
+ "recommended": true,
10
+ "complexity": {
11
+ "noForEach": "off",
12
+ "noStaticOnlyClass": "off"
13
+ },
14
+ "suspicious": {
15
+ "noExplicitAny": "off",
16
+ "noImplicitAnyLet": "off"
17
+ }
18
+ }
19
+ },
20
+ "formatter": {
21
+ "enabled": true,
22
+ "indentStyle": "tab",
23
+ "lineWidth": 100
24
+ }
25
+ }