@cregis-dev/cckit 0.6.4 → 0.6.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cregis-dev/cckit",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Enterprise-grade Claude Code configuration toolkit — orchestrates external tools to set up unified rules, skills, MCP and methodology for teams",
5
5
  "type": "module",
6
6
  "bin": {
package/registry.json CHANGED
@@ -46,6 +46,18 @@
46
46
  "marketplace": "claude-plugins-official",
47
47
  "default": true,
48
48
  "description": "Web scraping, search, and skill generation using Firecrawl"
49
+ },
50
+ "typescript-lsp": {
51
+ "name": "TypeScript LSP",
52
+ "marketplace": "claude-plugins-official",
53
+ "default": true,
54
+ "description": "TypeScript language server protocol integration for enhanced TypeScript development"
55
+ },
56
+ "pr-review-toolkit": {
57
+ "name": "PR Review Toolkit",
58
+ "marketplace": "claude-plugins-official",
59
+ "default": true,
60
+ "description": "Comprehensive PR review using specialized agents"
49
61
  }
50
62
  },
51
63
  "rules": {
@@ -30,6 +30,7 @@ export async function configureUser(opts, logger, _deps = {}) {
30
30
 
31
31
  const { askFn = askQuestion } = _deps
32
32
  const settingsPath = _deps.settingsPath || path.join(os.homedir(), '.claude', 'settings.json')
33
+ const claudeJsonPath = _deps.claudeJsonPath || path.join(os.homedir(), '.claude.json')
33
34
 
34
35
  // Read existing user settings
35
36
  let existing = {}
@@ -96,7 +97,7 @@ export async function configureUser(opts, logger, _deps = {}) {
96
97
  modelEnvEntries[key] = modelId
97
98
  }
98
99
 
99
- // 5. Merge and write
100
+ // 5. Merge and write settings.json
100
101
  const merged = {
101
102
  ...existing,
102
103
  env: {
@@ -110,6 +111,11 @@ export async function configureUser(opts, logger, _deps = {}) {
110
111
  await fse.ensureDir(path.dirname(settingsPath))
111
112
  await fse.writeFile(settingsPath, JSON.stringify(merged, null, 2) + '\n', 'utf8')
112
113
 
114
+ // 6. Check and prompt for hasCompletedOnboarding in ~/.claude.json
115
+ if (!opts.yes) {
116
+ await checkAndPromptOnboarding(claudeJsonPath, logger, askFn)
117
+ }
118
+
113
119
  const maskedKey = apiKey ? `${apiKey.slice(0, 4)}...${apiKey.slice(-4)}` : '(not set)'
114
120
 
115
121
  logger.info(` API URL: ${apiUrl}`)
@@ -130,3 +136,46 @@ export async function configureUser(opts, logger, _deps = {}) {
130
136
  },
131
137
  }
132
138
  }
139
+
140
+ /**
141
+ * Check if ~/.claude.json has hasCompletedOnboarding and prompt if missing.
142
+ *
143
+ * @param {string} claudeJsonPath - Path to ~/.claude.json
144
+ * @param {object} logger
145
+ * @param {function} askFn
146
+ * @returns {Promise<void>}
147
+ */
148
+ async function checkAndPromptOnboarding(claudeJsonPath, logger, askFn) {
149
+ let claudeJson = {}
150
+ let fileExisted = false
151
+
152
+ try {
153
+ const raw = await fse.readFile(claudeJsonPath, 'utf8')
154
+ claudeJson = JSON.parse(raw)
155
+ fileExisted = true
156
+ } catch (err) {
157
+ if (err.code !== 'ENOENT') {
158
+ logger.warn(`Failed to read ${claudeJsonPath}: ${err.message}`)
159
+ return
160
+ }
161
+ // File doesn't exist - will create new
162
+ }
163
+
164
+ // Check if hasCompletedOnboarding already exists
165
+ if ('hasCompletedOnboarding' in claudeJson) {
166
+ return
167
+ }
168
+
169
+ // Prompt user
170
+ const input = await askFn(' Add hasCompletedOnboarding: true to ~/.claude.json? (Y/n): ')
171
+ const answer = (input || '').trim().toLowerCase()
172
+
173
+ // Default to yes if empty input
174
+ if (answer === '' || answer === 'y' || answer === 'yes') {
175
+ claudeJson.hasCompletedOnboarding = true
176
+ await fse.writeFile(claudeJsonPath, JSON.stringify(claudeJson, null, 2) + '\n', 'utf8')
177
+ logger.info(` Added hasCompletedOnboarding: true to ~/.claude.json`)
178
+ } else {
179
+ logger.info(` Skipped adding hasCompletedOnboarding`)
180
+ }
181
+ }