ccjk 12.0.7 → 12.0.8

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 (299) hide show
  1. package/package.json +1 -1
  2. package/dist/chunks/agent-teams.mjs +0 -136
  3. package/dist/chunks/agent.mjs +0 -1439
  4. package/dist/chunks/agents.mjs +0 -3778
  5. package/dist/chunks/api-cli.mjs +0 -132
  6. package/dist/chunks/api-providers.mjs +0 -129
  7. package/dist/chunks/api.mjs +0 -112
  8. package/dist/chunks/auto-bootstrap.mjs +0 -358
  9. package/dist/chunks/auto-init.mjs +0 -7584
  10. package/dist/chunks/auto-updater.mjs +0 -410
  11. package/dist/chunks/banner.mjs +0 -188
  12. package/dist/chunks/bash.mjs +0 -187
  13. package/dist/chunks/boost.mjs +0 -397
  14. package/dist/chunks/ccjk-agents.mjs +0 -414
  15. package/dist/chunks/ccjk-all.mjs +0 -1028
  16. package/dist/chunks/ccjk-config.mjs +0 -261
  17. package/dist/chunks/ccjk-hooks.mjs +0 -1074
  18. package/dist/chunks/ccjk-mcp.mjs +0 -761
  19. package/dist/chunks/ccjk-setup.mjs +0 -763
  20. package/dist/chunks/ccjk-skills.mjs +0 -514
  21. package/dist/chunks/ccr.mjs +0 -98
  22. package/dist/chunks/ccu.mjs +0 -40
  23. package/dist/chunks/check-updates.mjs +0 -108
  24. package/dist/chunks/claude-code-config-manager.mjs +0 -750
  25. package/dist/chunks/claude-code-incremental-manager.mjs +0 -623
  26. package/dist/chunks/claude-config.mjs +0 -236
  27. package/dist/chunks/claude-wrapper.mjs +0 -85
  28. package/dist/chunks/cleanup-migration.mjs +0 -20
  29. package/dist/chunks/cli-hook.mjs +0 -2285
  30. package/dist/chunks/cloud-sync.mjs +0 -29
  31. package/dist/chunks/codex-config-switch.mjs +0 -451
  32. package/dist/chunks/codex-provider-manager.mjs +0 -236
  33. package/dist/chunks/codex-uninstaller.mjs +0 -404
  34. package/dist/chunks/codex.mjs +0 -2077
  35. package/dist/chunks/commands.mjs +0 -108
  36. package/dist/chunks/commands2.mjs +0 -413
  37. package/dist/chunks/commit.mjs +0 -138
  38. package/dist/chunks/completion.mjs +0 -515
  39. package/dist/chunks/config-consolidator.mjs +0 -172
  40. package/dist/chunks/config-switch.mjs +0 -317
  41. package/dist/chunks/config.mjs +0 -379
  42. package/dist/chunks/config2.mjs +0 -477
  43. package/dist/chunks/config3.mjs +0 -470
  44. package/dist/chunks/constants.mjs +0 -133
  45. package/dist/chunks/context-loader.mjs +0 -343
  46. package/dist/chunks/context.mjs +0 -372
  47. package/dist/chunks/convoy-manager.mjs +0 -880
  48. package/dist/chunks/dashboard.mjs +0 -476
  49. package/dist/chunks/doctor.mjs +0 -964
  50. package/dist/chunks/evolution.mjs +0 -382
  51. package/dist/chunks/features.mjs +0 -698
  52. package/dist/chunks/fish.mjs +0 -181
  53. package/dist/chunks/fs-operations.mjs +0 -192
  54. package/dist/chunks/health-alerts.mjs +0 -304
  55. package/dist/chunks/health-check.mjs +0 -532
  56. package/dist/chunks/help.mjs +0 -340
  57. package/dist/chunks/hook-installer.mjs +0 -45
  58. package/dist/chunks/index.mjs +0 -24
  59. package/dist/chunks/index10.mjs +0 -1171
  60. package/dist/chunks/index11.mjs +0 -1008
  61. package/dist/chunks/index12.mjs +0 -193
  62. package/dist/chunks/index13.mjs +0 -218
  63. package/dist/chunks/index14.mjs +0 -663
  64. package/dist/chunks/index2.mjs +0 -19
  65. package/dist/chunks/index3.mjs +0 -19092
  66. package/dist/chunks/index4.mjs +0 -8
  67. package/dist/chunks/index5.mjs +0 -7600
  68. package/dist/chunks/index6.mjs +0 -171
  69. package/dist/chunks/index7.mjs +0 -3583
  70. package/dist/chunks/index8.mjs +0 -19
  71. package/dist/chunks/index9.mjs +0 -616
  72. package/dist/chunks/init.mjs +0 -1606
  73. package/dist/chunks/installer.mjs +0 -690
  74. package/dist/chunks/installer2.mjs +0 -179
  75. package/dist/chunks/interview.mjs +0 -2927
  76. package/dist/chunks/json-config.mjs +0 -60
  77. package/dist/chunks/linux.mjs +0 -3863
  78. package/dist/chunks/macos.mjs +0 -69
  79. package/dist/chunks/main.mjs +0 -635
  80. package/dist/chunks/manager.mjs +0 -1048
  81. package/dist/chunks/marketplace.mjs +0 -949
  82. package/dist/chunks/mcp-cli.mjs +0 -204
  83. package/dist/chunks/mcp-performance.mjs +0 -187
  84. package/dist/chunks/mcp.mjs +0 -1231
  85. package/dist/chunks/menu.mjs +0 -652
  86. package/dist/chunks/metrics-display.mjs +0 -153
  87. package/dist/chunks/migrator.mjs +0 -178
  88. package/dist/chunks/monitor.mjs +0 -1856
  89. package/dist/chunks/notification.mjs +0 -1864
  90. package/dist/chunks/onboarding.mjs +0 -385
  91. package/dist/chunks/package.mjs +0 -3
  92. package/dist/chunks/paradigm.mjs +0 -74
  93. package/dist/chunks/permission-manager.mjs +0 -132
  94. package/dist/chunks/permissions.mjs +0 -265
  95. package/dist/chunks/persistence-manager.mjs +0 -794
  96. package/dist/chunks/persistence.mjs +0 -667
  97. package/dist/chunks/platform.mjs +0 -391
  98. package/dist/chunks/plugin.mjs +0 -1936
  99. package/dist/chunks/powershell.mjs +0 -213
  100. package/dist/chunks/prompts.mjs +0 -241
  101. package/dist/chunks/providers.mjs +0 -260
  102. package/dist/chunks/quick-actions.mjs +0 -320
  103. package/dist/chunks/quick-provider.mjs +0 -682
  104. package/dist/chunks/quick-setup.mjs +0 -412
  105. package/dist/chunks/remote.mjs +0 -497
  106. package/dist/chunks/session.mjs +0 -878
  107. package/dist/chunks/sessions.mjs +0 -106
  108. package/dist/chunks/silent-updater.mjs +0 -396
  109. package/dist/chunks/simple-config.mjs +0 -98
  110. package/dist/chunks/skill.mjs +0 -117
  111. package/dist/chunks/skill2.mjs +0 -9003
  112. package/dist/chunks/skills-sync.mjs +0 -6460
  113. package/dist/chunks/skills.mjs +0 -567
  114. package/dist/chunks/slash-commands.mjs +0 -207
  115. package/dist/chunks/smart-defaults.mjs +0 -412
  116. package/dist/chunks/smart-guide.mjs +0 -194
  117. package/dist/chunks/startup.mjs +0 -487
  118. package/dist/chunks/stats.mjs +0 -410
  119. package/dist/chunks/status.mjs +0 -289
  120. package/dist/chunks/team.mjs +0 -63
  121. package/dist/chunks/thinking.mjs +0 -626
  122. package/dist/chunks/trace.mjs +0 -57
  123. package/dist/chunks/uninstall.mjs +0 -849
  124. package/dist/chunks/update.mjs +0 -167
  125. package/dist/chunks/upgrade-manager.mjs +0 -204
  126. package/dist/chunks/version-checker.mjs +0 -881
  127. package/dist/chunks/vim.mjs +0 -903
  128. package/dist/chunks/windows.mjs +0 -14
  129. package/dist/chunks/workflows.mjs +0 -633
  130. package/dist/chunks/wsl.mjs +0 -129
  131. package/dist/chunks/zero-config.mjs +0 -374
  132. package/dist/chunks/zsh.mjs +0 -182
  133. package/dist/cli.d.mts +0 -1
  134. package/dist/cli.d.ts +0 -1
  135. package/dist/cli.mjs +0 -2199
  136. package/dist/i18n/locales/en/agent-teams.json +0 -18
  137. package/dist/i18n/locales/en/agentBrowser.json +0 -79
  138. package/dist/i18n/locales/en/agents.json +0 -135
  139. package/dist/i18n/locales/en/api.json +0 -63
  140. package/dist/i18n/locales/en/ccjk-agents.json +0 -33
  141. package/dist/i18n/locales/en/ccjk-all.json +0 -23
  142. package/dist/i18n/locales/en/ccjk-skills.json +0 -22
  143. package/dist/i18n/locales/en/ccjk.json +0 -276
  144. package/dist/i18n/locales/en/ccr.json +0 -65
  145. package/dist/i18n/locales/en/claude-md.json +0 -73
  146. package/dist/i18n/locales/en/cli.json +0 -152
  147. package/dist/i18n/locales/en/cloud-setup.json +0 -31
  148. package/dist/i18n/locales/en/cloud-sync.json +0 -147
  149. package/dist/i18n/locales/en/cloud.json +0 -40
  150. package/dist/i18n/locales/en/cloudPlugins.json +0 -118
  151. package/dist/i18n/locales/en/codex.json +0 -127
  152. package/dist/i18n/locales/en/cometix.json +0 -29
  153. package/dist/i18n/locales/en/common.json +0 -68
  154. package/dist/i18n/locales/en/config.json +0 -108
  155. package/dist/i18n/locales/en/configuration.json +0 -226
  156. package/dist/i18n/locales/en/context.json +0 -85
  157. package/dist/i18n/locales/en/dashboard.json +0 -78
  158. package/dist/i18n/locales/en/errors.json +0 -26
  159. package/dist/i18n/locales/en/evolution.json +0 -54
  160. package/dist/i18n/locales/en/hooks.json +0 -74
  161. package/dist/i18n/locales/en/hooksSync.json +0 -133
  162. package/dist/i18n/locales/en/installation.json +0 -83
  163. package/dist/i18n/locales/en/interview.json +0 -104
  164. package/dist/i18n/locales/en/language.json +0 -19
  165. package/dist/i18n/locales/en/lsp.json +0 -78
  166. package/dist/i18n/locales/en/marketplace.json +0 -116
  167. package/dist/i18n/locales/en/mcp.json +0 -178
  168. package/dist/i18n/locales/en/memory.json +0 -92
  169. package/dist/i18n/locales/en/menu.json +0 -143
  170. package/dist/i18n/locales/en/multi-config.json +0 -79
  171. package/dist/i18n/locales/en/notification.json +0 -307
  172. package/dist/i18n/locales/en/permissions.json +0 -95
  173. package/dist/i18n/locales/en/persistence.json +0 -127
  174. package/dist/i18n/locales/en/plugins.json +0 -146
  175. package/dist/i18n/locales/en/quick-actions.json +0 -78
  176. package/dist/i18n/locales/en/registry.json +0 -54
  177. package/dist/i18n/locales/en/remote.json +0 -93
  178. package/dist/i18n/locales/en/sandbox.json +0 -44
  179. package/dist/i18n/locales/en/setup.json +0 -44
  180. package/dist/i18n/locales/en/shencha.json +0 -14
  181. package/dist/i18n/locales/en/skills.json +0 -100
  182. package/dist/i18n/locales/en/skillsSync.json +0 -74
  183. package/dist/i18n/locales/en/smartGuide.json +0 -49
  184. package/dist/i18n/locales/en/stats.json +0 -20
  185. package/dist/i18n/locales/en/subagent.json +0 -69
  186. package/dist/i18n/locales/en/superpowers.json +0 -117
  187. package/dist/i18n/locales/en/team.json +0 -7
  188. package/dist/i18n/locales/en/thinking.json +0 -65
  189. package/dist/i18n/locales/en/tools.json +0 -42
  190. package/dist/i18n/locales/en/uninstall.json +0 -56
  191. package/dist/i18n/locales/en/updater.json +0 -29
  192. package/dist/i18n/locales/en/vim.json +0 -169
  193. package/dist/i18n/locales/en/workflow.json +0 -55
  194. package/dist/i18n/locales/en/workspace.json +0 -108
  195. package/dist/i18n/locales/zh-CN/agent-teams.json +0 -18
  196. package/dist/i18n/locales/zh-CN/agentBrowser.json +0 -79
  197. package/dist/i18n/locales/zh-CN/agents.json +0 -135
  198. package/dist/i18n/locales/zh-CN/api.json +0 -63
  199. package/dist/i18n/locales/zh-CN/ccjk-agents.json +0 -33
  200. package/dist/i18n/locales/zh-CN/ccjk-all.json +0 -23
  201. package/dist/i18n/locales/zh-CN/ccjk-skills.json +0 -22
  202. package/dist/i18n/locales/zh-CN/ccjk.json +0 -276
  203. package/dist/i18n/locales/zh-CN/ccr.json +0 -65
  204. package/dist/i18n/locales/zh-CN/claude-md.json +0 -73
  205. package/dist/i18n/locales/zh-CN/cli.json +0 -152
  206. package/dist/i18n/locales/zh-CN/cloud-setup.json +0 -31
  207. package/dist/i18n/locales/zh-CN/cloud-sync.json +0 -147
  208. package/dist/i18n/locales/zh-CN/cloud.json +0 -40
  209. package/dist/i18n/locales/zh-CN/cloudPlugins.json +0 -118
  210. package/dist/i18n/locales/zh-CN/codex.json +0 -127
  211. package/dist/i18n/locales/zh-CN/cometix.json +0 -29
  212. package/dist/i18n/locales/zh-CN/common.json +0 -68
  213. package/dist/i18n/locales/zh-CN/config.json +0 -108
  214. package/dist/i18n/locales/zh-CN/configuration.json +0 -224
  215. package/dist/i18n/locales/zh-CN/context.json +0 -85
  216. package/dist/i18n/locales/zh-CN/dashboard.json +0 -78
  217. package/dist/i18n/locales/zh-CN/errors.json +0 -26
  218. package/dist/i18n/locales/zh-CN/evolution.json +0 -54
  219. package/dist/i18n/locales/zh-CN/hooks.json +0 -74
  220. package/dist/i18n/locales/zh-CN/hooksSync.json +0 -133
  221. package/dist/i18n/locales/zh-CN/installation.json +0 -83
  222. package/dist/i18n/locales/zh-CN/interview.json +0 -104
  223. package/dist/i18n/locales/zh-CN/language.json +0 -19
  224. package/dist/i18n/locales/zh-CN/lsp.json +0 -78
  225. package/dist/i18n/locales/zh-CN/marketplace.json +0 -116
  226. package/dist/i18n/locales/zh-CN/mcp.json +0 -178
  227. package/dist/i18n/locales/zh-CN/memory.json +0 -92
  228. package/dist/i18n/locales/zh-CN/menu.json +0 -143
  229. package/dist/i18n/locales/zh-CN/multi-config.json +0 -79
  230. package/dist/i18n/locales/zh-CN/notification.json +0 -307
  231. package/dist/i18n/locales/zh-CN/permissions.json +0 -95
  232. package/dist/i18n/locales/zh-CN/persistence.json +0 -127
  233. package/dist/i18n/locales/zh-CN/plugins.json +0 -146
  234. package/dist/i18n/locales/zh-CN/quick-actions.json +0 -78
  235. package/dist/i18n/locales/zh-CN/registry.json +0 -54
  236. package/dist/i18n/locales/zh-CN/remote.json +0 -93
  237. package/dist/i18n/locales/zh-CN/sandbox.json +0 -44
  238. package/dist/i18n/locales/zh-CN/setup.json +0 -44
  239. package/dist/i18n/locales/zh-CN/shencha.json +0 -14
  240. package/dist/i18n/locales/zh-CN/skills.json +0 -100
  241. package/dist/i18n/locales/zh-CN/skillsSync.json +0 -74
  242. package/dist/i18n/locales/zh-CN/smartGuide.json +0 -49
  243. package/dist/i18n/locales/zh-CN/stats.json +0 -20
  244. package/dist/i18n/locales/zh-CN/subagent.json +0 -69
  245. package/dist/i18n/locales/zh-CN/superpowers.json +0 -117
  246. package/dist/i18n/locales/zh-CN/team.json +0 -7
  247. package/dist/i18n/locales/zh-CN/thinking.json +0 -65
  248. package/dist/i18n/locales/zh-CN/tools.json +0 -42
  249. package/dist/i18n/locales/zh-CN/uninstall.json +0 -56
  250. package/dist/i18n/locales/zh-CN/updater.json +0 -29
  251. package/dist/i18n/locales/zh-CN/vim.json +0 -169
  252. package/dist/i18n/locales/zh-CN/workflow.json +0 -55
  253. package/dist/i18n/locales/zh-CN/workspace.json +0 -108
  254. package/dist/index.d.mts +0 -5295
  255. package/dist/index.d.ts +0 -5295
  256. package/dist/index.mjs +0 -4941
  257. package/dist/shared/ccjk.B364Fu0N.mjs +0 -1819
  258. package/dist/shared/ccjk.BAGoDD49.mjs +0 -36
  259. package/dist/shared/ccjk.BBtCGd_g.mjs +0 -899
  260. package/dist/shared/ccjk.BFQ7yr5S.mjs +0 -16
  261. package/dist/shared/ccjk.BFxsJM0k.mjs +0 -599
  262. package/dist/shared/ccjk.BIxuVL3_.mjs +0 -25
  263. package/dist/shared/ccjk.BRZ9ww8S.mjs +0 -142
  264. package/dist/shared/ccjk.BoApaI4j.mjs +0 -28
  265. package/dist/shared/ccjk.BrPUmTqm.mjs +0 -266
  266. package/dist/shared/ccjk.BtB1e5jm.mjs +0 -171
  267. package/dist/shared/ccjk.BwfbSKN2.mjs +0 -1051
  268. package/dist/shared/ccjk.BxSmJ8B7.mjs +0 -243
  269. package/dist/shared/ccjk.Bx_rmYfN.mjs +0 -69
  270. package/dist/shared/ccjk.C2jHOZVP.mjs +0 -52
  271. package/dist/shared/ccjk.CL4Yat0G.mjs +0 -303
  272. package/dist/shared/ccjk.COweQ1RR.mjs +0 -5
  273. package/dist/shared/ccjk.CePkJq2S.mjs +0 -223
  274. package/dist/shared/ccjk.CfKKcvWy.mjs +0 -126
  275. package/dist/shared/ccjk.Cjgrln_h.mjs +0 -297
  276. package/dist/shared/ccjk.Cjj8SVrn.mjs +0 -54
  277. package/dist/shared/ccjk.CxpGa6MC.mjs +0 -2724
  278. package/dist/shared/ccjk.D5MFQT7w.mjs +0 -400
  279. package/dist/shared/ccjk.D6ycHbak.mjs +0 -270
  280. package/dist/shared/ccjk.D8ZLYSZZ.mjs +0 -299
  281. package/dist/shared/ccjk.DG_o24cZ.mjs +0 -88
  282. package/dist/shared/ccjk.DLLw-h4Y.mjs +0 -460
  283. package/dist/shared/ccjk.DOwtZMk8.mjs +0 -4019
  284. package/dist/shared/ccjk.DS7UESmF.mjs +0 -2451
  285. package/dist/shared/ccjk.DTdjs-qK.mjs +0 -1447
  286. package/dist/shared/ccjk.DXRAZcix.mjs +0 -66
  287. package/dist/shared/ccjk.DsYaCCx4.mjs +0 -317
  288. package/dist/shared/ccjk.J8YiPsOw.mjs +0 -259
  289. package/dist/shared/ccjk.KfSWcGlE.mjs +0 -38
  290. package/dist/shared/ccjk.RyizuzOI.mjs +0 -21
  291. package/dist/shared/ccjk.SPoXMvZD.mjs +0 -1242
  292. package/dist/shared/ccjk.T_cX87dY.mjs +0 -15
  293. package/dist/shared/ccjk.UIvifqNE.mjs +0 -1486
  294. package/dist/shared/ccjk._dESH4Rk.mjs +0 -111
  295. package/dist/shared/ccjk.bQ7Dh1g4.mjs +0 -249
  296. package/dist/shared/ccjk.c-ETfBZ_.mjs +0 -617
  297. package/dist/shared/ccjk.gDEDGD_t.mjs +0 -38
  298. package/dist/shared/ccjk.hoqrwWdN.mjs +0 -333
  299. package/dist/shared/ccjk.waa2ikKJ.mjs +0 -351
@@ -1,187 +0,0 @@
1
- function generateBashCompletion(commands) {
2
- const commandNames = commands.map((c) => c.name).join(" ");
3
- const aliasMap = buildAliasMap(commands);
4
- return `#!/bin/bash
5
- # CCJK CLI Bash Completion
6
- # Generated automatically - do not edit manually
7
- # Install: source this file or add to ~/.bash_completion.d/
8
-
9
- _ccjk_completions() {
10
- local cur prev words cword
11
- _init_completion || return
12
-
13
- local commands="${commandNames}"
14
-
15
- # Alias to command mapping
16
- ${generateAliasMapping(aliasMap)}
17
-
18
- # Get the main command (first argument after ccjk)
19
- local cmd=""
20
- local cmd_index=1
21
- while [[ $cmd_index -lt $cword ]]; do
22
- local word="\${words[$cmd_index]}"
23
- if [[ "$word" != -* ]]; then
24
- cmd="$word"
25
- # Resolve alias to command
26
- if [[ -n "\${_ccjk_aliases[$cmd]}" ]]; then
27
- cmd="\${_ccjk_aliases[$cmd]}"
28
- fi
29
- break
30
- fi
31
- ((cmd_index++))
32
- done
33
-
34
- # Complete commands if no command specified yet
35
- if [[ -z "$cmd" ]] || [[ $cword -eq 1 ]]; then
36
- if [[ "$cur" == -* ]]; then
37
- COMPREPLY=($(compgen -W "--help --version --lang" -- "$cur"))
38
- else
39
- COMPREPLY=($(compgen -W "$commands" -- "$cur"))
40
- fi
41
- return
42
- fi
43
-
44
- # Command-specific completions
45
- case "$cmd" in
46
- ${generateBashCommandCases(commands)}
47
- *)
48
- # Default: complete with global options
49
- if [[ "$cur" == -* ]]; then
50
- COMPREPLY=($(compgen -W "--help --lang -l" -- "$cur"))
51
- fi
52
- ;;
53
- esac
54
- }
55
-
56
- # Helper function to get installed MCP services
57
- _ccjk_get_mcp_services() {
58
- ccjk mcp list --json 2>/dev/null | grep -oP '"name":\\s*"\\K[^"]+' 2>/dev/null || echo ""
59
- }
60
-
61
- # Helper function to get available skills
62
- _ccjk_get_skills() {
63
- ccjk skills list --format list 2>/dev/null | grep -v "^$" 2>/dev/null || echo ""
64
- }
65
-
66
- # Helper function to get available agents
67
- _ccjk_get_agents() {
68
- ccjk agent list --json 2>/dev/null | grep -oP '"id":\\s*"\\K[^"]+' 2>/dev/null || echo ""
69
- }
70
-
71
- # Register completion
72
- complete -F _ccjk_completions ccjk
73
- `;
74
- }
75
- function buildAliasMap(commands) {
76
- const map = /* @__PURE__ */ new Map();
77
- for (const cmd of commands) {
78
- if (cmd.aliases) {
79
- for (const alias of cmd.aliases) {
80
- map.set(alias, cmd.name);
81
- }
82
- }
83
- }
84
- return map;
85
- }
86
- function generateAliasMapping(aliasMap) {
87
- const lines = [" declare -A _ccjk_aliases=("];
88
- for (const [alias, cmd] of Array.from(aliasMap.entries())) {
89
- lines.push(` ["${alias}"]="${cmd}"`);
90
- }
91
- lines.push(" )");
92
- return lines.join("\n");
93
- }
94
- function generateBashCommandCases(commands) {
95
- const cases = [];
96
- for (const cmd of commands) {
97
- if (!cmd.subcommands && !cmd.options)
98
- continue;
99
- const subcommands = cmd.subcommands?.map((s) => s.name).join(" ") || "";
100
- const options = cmd.options?.map((o) => extractOptionFlags(o.flags)).flat().join(" ") || "";
101
- let caseBody = "";
102
- if (cmd.subcommands) {
103
- caseBody += `
104
- # Get subcommand
105
- local subcmd=""
106
- local i=$((cmd_index + 1))
107
- while [[ $i -lt $cword ]]; do
108
- local w="\${words[$i]}"
109
- if [[ "$w" != -* ]]; then
110
- subcmd="$w"
111
- break
112
- fi
113
- ((i++))
114
- done
115
-
116
- if [[ -z "$subcmd" ]]; then
117
- if [[ "$cur" == -* ]]; then
118
- COMPREPLY=($(compgen -W "${options} --help" -- "$cur"))
119
- else
120
- COMPREPLY=($(compgen -W "${subcommands}" -- "$cur"))
121
- fi
122
- else
123
- # Subcommand-specific options
124
- case "$subcmd" in
125
- ${generateSubcommandCases(cmd)}
126
- *)
127
- if [[ "$cur" == -* ]]; then
128
- COMPREPLY=($(compgen -W "${options} --help" -- "$cur"))
129
- fi
130
- ;;
131
- esac
132
- fi`;
133
- } else if (cmd.options) {
134
- caseBody = `
135
- if [[ "$cur" == -* ]]; then
136
- COMPREPLY=($(compgen -W "${options} --help" -- "$cur"))
137
- fi`;
138
- const optionsWithValues = cmd.options.filter((o) => o.values && Array.isArray(o.values));
139
- if (optionsWithValues.length > 0) {
140
- caseBody += `
141
- # Option value completion
142
- case "$prev" in
143
- ${generateOptionValueCases(optionsWithValues)}
144
- esac`;
145
- }
146
- }
147
- cases.push(` ${cmd.name})${caseBody}
148
- ;;`);
149
- }
150
- return cases.join("\n");
151
- }
152
- function generateSubcommandCases(cmd) {
153
- if (!cmd.subcommands)
154
- return "";
155
- const cases = [];
156
- for (const sub of cmd.subcommands) {
157
- const subOptions = sub.options?.map((o) => extractOptionFlags(o.flags)).flat().join(" ") || "";
158
- const parentOptions = cmd.options?.map((o) => extractOptionFlags(o.flags)).flat().join(" ") || "";
159
- const allOptions = `${subOptions} ${parentOptions}`.trim();
160
- cases.push(` ${sub.name})
161
- if [[ "$cur" == -* ]]; then
162
- COMPREPLY=($(compgen -W "${allOptions} --help" -- "$cur"))
163
- fi
164
- ;;`);
165
- }
166
- return cases.join("\n");
167
- }
168
- function generateOptionValueCases(options) {
169
- const cases = [];
170
- for (const opt of options) {
171
- if (!opt.values || typeof opt.values === "function")
172
- continue;
173
- const flags = extractOptionFlags(opt.flags);
174
- const values = opt.values.join(" ");
175
- for (const flag of flags) {
176
- cases.push(` ${flag})
177
- COMPREPLY=($(compgen -W "${values}" -- "$cur"))
178
- ;;`);
179
- }
180
- }
181
- return cases.join("\n");
182
- }
183
- function extractOptionFlags(flags) {
184
- return flags.split(",").map((f) => f.trim().split(/\s+/)[0]);
185
- }
186
-
187
- export { generateBashCompletion };
@@ -1,397 +0,0 @@
1
- import a from './index2.mjs';
2
- import { existsSync, readFileSync } from 'node:fs';
3
- import process__default from 'node:process';
4
- import { SETTINGS_FILE } from './constants.mjs';
5
- import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
6
- import { r as runHealthCheck } from '../shared/ccjk.D5MFQT7w.mjs';
7
- import '../shared/ccjk.BAGoDD49.mjs';
8
- import 'node:os';
9
- import './index5.mjs';
10
- import 'node:url';
11
-
12
- function analyzeProject(root) {
13
- const cwd = process__default.cwd();
14
- const profile = {
15
- language: "unknown",
16
- frameworks: [],
17
- packageManager: "unknown",
18
- hasCI: false,
19
- hasDocker: false,
20
- hasMCP: false,
21
- hasClaudeMd: false,
22
- isMonorepo: false,
23
- tags: []
24
- };
25
- const pkgPath = join(cwd, "package.json");
26
- let pkg = null;
27
- if (existsSync(pkgPath)) {
28
- try {
29
- pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
30
- profile.projectName = pkg?.name;
31
- } catch {
32
- }
33
- }
34
- profile.language = detectLanguage(cwd, pkg);
35
- profile.packageManager = detectPackageManager(cwd);
36
- profile.frameworks = detectFrameworks(cwd, pkg);
37
- profile.testFramework = detectTestFramework(cwd, pkg);
38
- profile.buildTool = detectBuildTool(cwd, pkg);
39
- profile.hasCI = existsSync(join(cwd, ".github/workflows")) || existsSync(join(cwd, ".gitlab-ci.yml")) || existsSync(join(cwd, ".circleci")) || existsSync(join(cwd, "Jenkinsfile"));
40
- profile.hasDocker = existsSync(join(cwd, "Dockerfile")) || existsSync(join(cwd, "docker-compose.yml")) || existsSync(join(cwd, "docker-compose.yaml"));
41
- profile.hasMCP = checkMcpConfigured();
42
- profile.hasClaudeMd = existsSync(join(cwd, "CLAUDE.md"));
43
- profile.isMonorepo = existsSync(join(cwd, "pnpm-workspace.yaml")) || existsSync(join(cwd, "lerna.json")) || pkg?.workspaces != null;
44
- profile.tags = generateTags(profile);
45
- return profile;
46
- }
47
- function detectLanguage(cwd, pkg) {
48
- if (existsSync(join(cwd, "tsconfig.json")) || pkg?.devDependencies?.typescript) return "typescript";
49
- if (existsSync(join(cwd, "pyproject.toml")) || existsSync(join(cwd, "setup.py"))) return "python";
50
- if (existsSync(join(cwd, "go.mod"))) return "go";
51
- if (existsSync(join(cwd, "Cargo.toml"))) return "rust";
52
- if (existsSync(join(cwd, "Gemfile"))) return "ruby";
53
- if (existsSync(join(cwd, "pom.xml")) || existsSync(join(cwd, "build.gradle"))) return "java";
54
- if (existsSync(join(cwd, "Package.swift"))) return "swift";
55
- if (pkg) return "javascript";
56
- return "unknown";
57
- }
58
- function detectPackageManager(cwd) {
59
- if (existsSync(join(cwd, "pnpm-lock.yaml")) || existsSync(join(cwd, "pnpm-workspace.yaml"))) return "pnpm";
60
- if (existsSync(join(cwd, "yarn.lock"))) return "yarn";
61
- if (existsSync(join(cwd, "bun.lockb")) || existsSync(join(cwd, "bun.lock"))) return "bun";
62
- if (existsSync(join(cwd, "package-lock.json"))) return "npm";
63
- return "unknown";
64
- }
65
- function detectFrameworks(_cwd, pkg) {
66
- const frameworks = [];
67
- const allDeps = { ...pkg?.dependencies, ...pkg?.devDependencies };
68
- if (allDeps?.react || allDeps?.["react-dom"]) frameworks.push("react");
69
- if (allDeps?.vue) frameworks.push("vue");
70
- if (allDeps?.svelte) frameworks.push("svelte");
71
- if (allDeps?.angular || allDeps?.["@angular/core"]) frameworks.push("angular");
72
- if (allDeps?.next) frameworks.push("nextjs");
73
- if (allDeps?.nuxt) frameworks.push("nuxt");
74
- if (allDeps?.astro) frameworks.push("astro");
75
- if (allDeps?.express) frameworks.push("express");
76
- if (allDeps?.fastify) frameworks.push("fastify");
77
- if (allDeps?.koa) frameworks.push("koa");
78
- if (allDeps?.hono) frameworks.push("hono");
79
- if (allDeps?.["@nestjs/core"]) frameworks.push("nestjs");
80
- if (allDeps?.electron) frameworks.push("electron");
81
- if (allDeps?.["@tauri-apps/api"]) frameworks.push("tauri");
82
- if (allDeps?.["react-native"]) frameworks.push("react-native");
83
- if (allDeps?.cac || allDeps?.commander || allDeps?.yargs) frameworks.push("cli");
84
- return frameworks;
85
- }
86
- function detectTestFramework(cwd, pkg) {
87
- const allDeps = { ...pkg?.dependencies, ...pkg?.devDependencies };
88
- if (allDeps?.vitest || existsSync(join(cwd, "vitest.config.ts"))) return "vitest";
89
- if (allDeps?.jest || existsSync(join(cwd, "jest.config.js"))) return "jest";
90
- if (allDeps?.mocha) return "mocha";
91
- if (allDeps?.playwright || allDeps?.["@playwright/test"]) return "playwright";
92
- if (allDeps?.cypress) return "cypress";
93
- if (existsSync(join(cwd, "pytest.ini")) || existsSync(join(cwd, "conftest.py"))) return "pytest";
94
- return void 0;
95
- }
96
- function detectBuildTool(cwd, pkg) {
97
- const allDeps = { ...pkg?.dependencies, ...pkg?.devDependencies };
98
- if (allDeps?.vite || existsSync(join(cwd, "vite.config.ts"))) return "vite";
99
- if (allDeps?.webpack) return "webpack";
100
- if (allDeps?.esbuild) return "esbuild";
101
- if (allDeps?.unbuild) return "unbuild";
102
- if (allDeps?.rollup) return "rollup";
103
- if (allDeps?.turbo || existsSync(join(cwd, "turbo.json"))) return "turbo";
104
- return void 0;
105
- }
106
- function checkMcpConfigured() {
107
- try {
108
- if (!existsSync(SETTINGS_FILE)) return false;
109
- const settings = JSON.parse(readFileSync(SETTINGS_FILE, "utf-8"));
110
- return Object.keys(settings.mcpServers || {}).length > 0;
111
- } catch {
112
- return false;
113
- }
114
- }
115
- function generateTags(profile) {
116
- const tags = [];
117
- tags.push(profile.language);
118
- tags.push(...profile.frameworks);
119
- if (profile.testFramework) tags.push(profile.testFramework);
120
- if (profile.buildTool) tags.push(profile.buildTool);
121
- if (profile.packageManager !== "unknown") tags.push(profile.packageManager);
122
- if (profile.hasCI) tags.push("ci");
123
- if (profile.hasDocker) tags.push("docker");
124
- if (profile.isMonorepo) tags.push("monorepo");
125
- if (profile.frameworks.some((f) => ["react", "vue", "svelte", "angular"].includes(f))) tags.push("frontend");
126
- if (profile.frameworks.some((f) => ["express", "fastify", "koa", "nestjs", "hono"].includes(f))) tags.push("backend");
127
- if (profile.frameworks.some((f) => ["nextjs", "nuxt", "astro"].includes(f))) tags.push("fullstack");
128
- if (profile.frameworks.includes("cli")) tags.push("cli-tool");
129
- return [...new Set(tags)];
130
- }
131
-
132
- const SKILL_RULES = [
133
- {
134
- tags: ["typescript", "javascript", "python", "go", "rust", "ruby", "java"],
135
- skill: { id: "git-commit", name: "Smart Git Commit", description: "AI-powered conventional commit messages", reason: "Every project needs good commits", category: "git" }
136
- },
137
- {
138
- tags: ["typescript", "javascript", "python", "go", "rust"],
139
- skill: { id: "code-review", name: "Code Review", description: "Two-phase deep code review", reason: "Catch bugs before they ship", category: "review" }
140
- },
141
- {
142
- tags: ["react", "vue", "svelte", "angular", "frontend"],
143
- skill: { id: "component-gen", name: "Component Generator", description: "Generate UI components with tests", reason: "Frontend framework detected", category: "dev" }
144
- },
145
- {
146
- tags: ["express", "fastify", "koa", "nestjs", "hono", "backend"],
147
- skill: { id: "api-design", name: "API Design", description: "Design RESTful/GraphQL APIs", reason: "Backend framework detected", category: "dev" }
148
- },
149
- {
150
- tags: ["backend", "fullstack"],
151
- skill: { id: "security-audit", name: "Security Audit", description: "Check for common vulnerabilities", reason: "Server-side code needs security review", category: "review" }
152
- },
153
- {
154
- tags: ["vitest", "jest", "pytest", "mocha"],
155
- skill: { id: "tdd-workflow", name: "TDD Workflow", description: "Test-driven development cycle", reason: "Test framework detected", category: "testing" }
156
- },
157
- {
158
- tags: ["playwright", "cypress"],
159
- skill: { id: "e2e-helper", name: "E2E Test Helper", description: "Generate end-to-end tests", reason: "E2E framework detected", category: "testing" }
160
- },
161
- {
162
- tags: ["docker"],
163
- skill: { id: "docker-optimize", name: "Docker Optimizer", description: "Optimize Dockerfile", reason: "Docker detected", category: "devops" }
164
- },
165
- {
166
- tags: ["ci"],
167
- skill: { id: "ci-pipeline", name: "CI Pipeline", description: "Optimize CI/CD pipeline", reason: "CI configuration detected", category: "devops" }
168
- },
169
- {
170
- tags: ["cli-tool", "cli"],
171
- skill: { id: "cli-ux", name: "CLI UX Design", description: "Better CLI interfaces", reason: "CLI tool detected", category: "dev" }
172
- },
173
- {
174
- tags: ["monorepo"],
175
- skill: { id: "monorepo-manage", name: "Monorepo Manager", description: "Manage packages and releases", reason: "Monorepo detected", category: "dev" }
176
- },
177
- {
178
- tags: ["typescript", "javascript", "python"],
179
- skill: { id: "doc-gen", name: "Documentation Generator", description: "Generate API docs and README", reason: "Good docs improve maintainability", category: "docs" }
180
- },
181
- {
182
- tags: ["react", "vue", "nextjs", "nuxt", "frontend"],
183
- skill: { id: "perf-audit", name: "Performance Audit", description: "Bundle size and Core Web Vitals", reason: "Frontend performance matters", category: "review" }
184
- },
185
- {
186
- tags: ["nextjs", "nuxt", "astro", "fullstack"],
187
- skill: { id: "fullstack-debug", name: "Fullstack Debugger", description: "Debug across client/server boundary", reason: "Fullstack framework detected", category: "debug" }
188
- }
189
- ];
190
- const MCP_RULES = [
191
- {
192
- tags: ["typescript", "javascript", "python", "go", "rust", "ruby", "java"],
193
- mcp: { id: "context7", name: "Context7", description: "Up-to-date library docs", reason: "Essential for accurate API usage" }
194
- },
195
- {
196
- tags: ["playwright", "frontend", "fullstack"],
197
- mcp: { id: "playwright", name: "Playwright MCP", description: "Browser automation", reason: "Frontend/E2E project detected" }
198
- },
199
- {
200
- tags: ["backend", "fullstack", "express", "fastify", "nestjs"],
201
- mcp: { id: "sqlite", name: "SQLite MCP", description: "Local database", reason: "Backend project detected" }
202
- },
203
- {
204
- tags: ["typescript", "javascript", "python", "go", "rust"],
205
- mcp: { id: "mcp-search", name: "Web Search", description: "Search for docs and solutions", reason: "Quick access to online resources" }
206
- }
207
- ];
208
- function matchSkills(profile) {
209
- const results = [];
210
- const seen = /* @__PURE__ */ new Set();
211
- for (const rule of SKILL_RULES) {
212
- if (seen.has(rule.skill.id)) continue;
213
- const matchingTags = rule.tags.filter((t) => profile.tags.includes(t));
214
- if (matchingTags.length === 0) continue;
215
- const matchScore = Math.min(100, Math.round(matchingTags.length / rule.tags.length * 100) + 20);
216
- results.push({ ...rule.skill, matchScore });
217
- seen.add(rule.skill.id);
218
- }
219
- results.sort((a, b) => b.matchScore - a.matchScore);
220
- return results;
221
- }
222
- function matchMcpServices(profile) {
223
- const results = [];
224
- const seen = /* @__PURE__ */ new Set();
225
- for (const rule of MCP_RULES) {
226
- if (seen.has(rule.mcp.id)) continue;
227
- const matchingTags = rule.tags.filter((t) => profile.tags.includes(t));
228
- if (matchingTags.length === 0) continue;
229
- const matchScore = Math.min(100, Math.round(matchingTags.length / rule.tags.length * 100) + 20);
230
- results.push({ ...rule.mcp, matchScore });
231
- seen.add(rule.mcp.id);
232
- }
233
- results.sort((a, b) => b.matchScore - a.matchScore);
234
- return results;
235
- }
236
- function getRecommendations(profile) {
237
- const skills = matchSkills(profile);
238
- const mcpServices = matchMcpServices(profile);
239
- const parts = [];
240
- if (profile.language !== "unknown") parts.push(profile.language);
241
- parts.push(...profile.frameworks.slice(0, 3));
242
- const stackDesc = parts.join(" + ") || "your project";
243
- return {
244
- skills,
245
- mcpServices,
246
- summary: `Found ${skills.length} skills and ${mcpServices.length} MCP services for ${stackDesc}`
247
- };
248
- }
249
-
250
- async function executeRecommendation(rec) {
251
- if (!rec.command) {
252
- return { success: false, message: "No command available" };
253
- }
254
- try {
255
- const parts = rec.command.split(" ");
256
- const cmd = parts[0];
257
- const args = parts.slice(1);
258
- if (cmd === "ccjk") {
259
- return await runCcjkCommand(args);
260
- }
261
- const { x } = await import('./main.mjs');
262
- const result = await x(cmd, args, { throwOnError: false });
263
- return {
264
- success: result.exitCode === 0,
265
- message: result.exitCode === 0 ? "Applied" : `Failed: ${result.stderr}`
266
- };
267
- } catch (error) {
268
- return { success: false, message: `Error: ${error instanceof Error ? error.message : String(error)}` };
269
- }
270
- }
271
- async function runCcjkCommand(args) {
272
- const sub = args[0];
273
- try {
274
- if (sub === "init") {
275
- const { init } = await import('./init.mjs').then(function (n) { return n.c; });
276
- await init({ skipBanner: true, skipPrompt: true });
277
- return { success: true, message: "Initialization complete" };
278
- }
279
- if (sub === "ccjk:mcp" || sub === "ccjk-mcp") {
280
- const { ccjkMcp } = await import('./ccjk-mcp.mjs');
281
- await ccjkMcp({ interactive: false, dryRun: false, json: false });
282
- return { success: true, message: "MCP services configured" };
283
- }
284
- if (sub === "ccjk:skills" || sub === "ccjk-skills") {
285
- const { ccjkSkills } = await import('./ccjk-skills.mjs');
286
- await ccjkSkills({ interactive: false, dryRun: false, json: false });
287
- return { success: true, message: "Skills installed" };
288
- }
289
- if (sub === "ccjk:agents" || sub === "ccjk-agents") {
290
- const { ccjkAgents } = await import('./ccjk-agents.mjs');
291
- await ccjkAgents({ list: false, json: false });
292
- return { success: true, message: "Agents configured" };
293
- }
294
- if (sub === "doctor") {
295
- const { doctor } = await import('./doctor.mjs');
296
- await doctor({});
297
- return { success: true, message: "Doctor check complete" };
298
- }
299
- const { x } = await import('./main.mjs');
300
- const result = await x("ccjk", args, { throwOnError: false });
301
- return { success: result.exitCode === 0, message: result.exitCode === 0 ? "Done" : "Failed" };
302
- } catch (error) {
303
- return { success: false, message: `Error: ${error instanceof Error ? error.message : String(error)}` };
304
- }
305
- }
306
- async function boost(options = {}) {
307
- console.log(a.cyan.bold("\n\u{1F680} CCJK Boost - One-Click Optimization\n"));
308
- const ora = (await import('./index7.mjs')).default;
309
- let spinner = ora("Analyzing your setup...").start();
310
- const [report, profile] = await Promise.all([
311
- runHealthCheck(),
312
- Promise.resolve(analyzeProject())
313
- ]);
314
- const { skills: recSkills } = getRecommendations(profile);
315
- spinner.succeed(`Current score: ${a.bold(String(report.totalScore))}/100 (Grade ${report.grade})`);
316
- const actions = [];
317
- for (const rec of report.recommendations) {
318
- if (rec.command) {
319
- actions.push({ label: `${rec.title}: ${rec.description}`, rec });
320
- }
321
- }
322
- if (recSkills.length > 0 && !report.results.find((r) => r.name === "Skills" && r.status === "pass")) {
323
- actions.push({
324
- label: `Install ${recSkills.length} recommended skills for ${profile.language}`,
325
- rec: { priority: "medium", title: "Install Skills", description: `${recSkills.length} skills match your project`, command: "ccjk ccjk:skills", category: "skills" }
326
- });
327
- }
328
- if (actions.length === 0) {
329
- console.log(a.green("\n\u2728 Your setup is already optimized! Score: ") + a.green.bold(`${report.totalScore}/100`));
330
- console.log(a.gray('Run "ccjk status" for detailed breakdown.\n'));
331
- return;
332
- }
333
- console.log(a.yellow(`
334
- \u{1F4CB} ${actions.length} optimization${actions.length > 1 ? "s" : ""} available:
335
- `));
336
- for (const a$1 of actions) {
337
- const priority = a$1.rec.priority === "high" ? a.red("[HIGH]") : a.yellow("[MED]");
338
- console.log(` ${priority} ${a$1.label}`);
339
- if (a$1.rec.command)
340
- console.log(` ${a.gray(a$1.rec.command)}`);
341
- }
342
- if (options.dryRun) {
343
- console.log(a.gray("\n--dry-run: No changes applied.\n"));
344
- return;
345
- }
346
- if (!options.yes) {
347
- const { default: inquirer } = await import('./index3.mjs').then(function (n) { return n.c; });
348
- const { confirm } = await inquirer.prompt([{
349
- type: "confirm",
350
- name: "confirm",
351
- message: `Apply ${actions.length} optimization${actions.length > 1 ? "s" : ""}?`,
352
- default: true
353
- }]);
354
- if (!confirm) {
355
- console.log(a.gray("\nCancelled.\n"));
356
- return;
357
- }
358
- }
359
- console.log("");
360
- let applied = 0;
361
- let failed = 0;
362
- for (const action of actions) {
363
- spinner = ora(action.label).start();
364
- try {
365
- const result = await executeRecommendation(action.rec);
366
- if (result.success) {
367
- spinner.succeed(action.label);
368
- applied++;
369
- } else {
370
- spinner.warn(`${action.label} ${a.gray(`(${result.message})`)}`);
371
- failed++;
372
- }
373
- } catch {
374
- spinner.fail(action.label);
375
- failed++;
376
- }
377
- }
378
- console.log("");
379
- spinner = ora("Recalculating score...").start();
380
- const newReport = await runHealthCheck();
381
- spinner.stop();
382
- const delta = newReport.totalScore - report.totalScore;
383
- const deltaStr = delta > 0 ? a.green(`+${delta}`) : delta < 0 ? a.red(String(delta)) : "\xB10";
384
- console.log(a.cyan.bold("\n\u{1F4CA} Results"));
385
- console.log(` Applied: ${a.green(String(applied))} Failed: ${failed > 0 ? a.red(String(failed)) : a.gray("0")}`);
386
- console.log(` Score: ${a.bold(String(report.totalScore))} \u2192 ${a.bold(String(newReport.totalScore))} (${deltaStr})`);
387
- console.log(` Grade: ${report.grade} \u2192 ${a.bold(newReport.grade)}`);
388
- if (newReport.totalScore >= 80) {
389
- console.log(a.green("\n \u2728 Excellent setup! Getting the most out of Claude Code.\n"));
390
- } else {
391
- console.log(a.yellow(`
392
- Run ${a.cyan("ccjk status")} for remaining recommendations.
393
- `));
394
- }
395
- }
396
-
397
- export { boost };