ccjk 14.2.2 → 15.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.
- package/LICENSE +1 -1
- package/README.md +58 -341
- package/dist/cli.js +59 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/detect.js +15 -0
- package/dist/commands/detect.js.map +1 -0
- package/dist/commands/doctor.js +68 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/git-install.js +50 -0
- package/dist/commands/git-install.js.map +1 -0
- package/dist/commands/init.js +102 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mcp.js +66 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/menu.js +33 -0
- package/dist/commands/menu.js.map +1 -0
- package/dist/core/detect.js +24 -0
- package/dist/core/detect.js.map +1 -0
- package/dist/core/lint.js +49 -0
- package/dist/core/lint.js.map +1 -0
- package/dist/core/mcp.js +41 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/core/paths.js +9 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/providers.js +53 -0
- package/dist/core/providers.js.map +1 -0
- package/dist/core/settings.js +31 -0
- package/dist/core/settings.js.map +1 -0
- package/dist/core/slash-templates.js +56 -0
- package/dist/core/slash-templates.js.map +1 -0
- package/dist/core/tools.js +27 -0
- package/dist/core/tools.js.map +1 -0
- package/package.json +43 -164
- package/README.HONEST.md +0 -176
- package/README.en.md +0 -67
- package/README.ja.md +0 -67
- package/README.ko.md +0 -67
- package/README.zh-CN.md +0 -86
- package/bin/ccjk.mjs +0 -5
- package/bin/ccjk.ts +0 -222
- package/dist/chunks/agent-teams.mjs +0 -145
- package/dist/chunks/agent.mjs +0 -1439
- package/dist/chunks/agents.mjs +0 -3783
- package/dist/chunks/api-cli.mjs +0 -135
- package/dist/chunks/api-config-selector.mjs +0 -159
- package/dist/chunks/api-providers.mjs +0 -144
- package/dist/chunks/api.mjs +0 -115
- package/dist/chunks/auto-bootstrap.mjs +0 -358
- package/dist/chunks/auto-fixer.mjs +0 -95
- package/dist/chunks/auto-updater.mjs +0 -507
- package/dist/chunks/banner.mjs +0 -173
- package/dist/chunks/bash.mjs +0 -187
- package/dist/chunks/boost.mjs +0 -474
- package/dist/chunks/brain-config.mjs +0 -75
- package/dist/chunks/brain-status.mjs +0 -89
- package/dist/chunks/ccjk-agents.mjs +0 -416
- package/dist/chunks/ccjk-all.mjs +0 -1046
- package/dist/chunks/ccjk-config.mjs +0 -445
- package/dist/chunks/ccjk-hooks.mjs +0 -1074
- package/dist/chunks/ccjk-mcp.mjs +0 -763
- package/dist/chunks/ccjk-setup.mjs +0 -765
- package/dist/chunks/ccjk-skills.mjs +0 -518
- package/dist/chunks/ccr.mjs +0 -109
- package/dist/chunks/ccu.mjs +0 -40
- package/dist/chunks/check-updates.mjs +0 -117
- package/dist/chunks/claude-code-incremental-manager.mjs +0 -761
- package/dist/chunks/claude-config.mjs +0 -606
- package/dist/chunks/claude-config2.mjs +0 -62
- package/dist/chunks/claude-wrapper.mjs +0 -85
- package/dist/chunks/clavue-config.mjs +0 -1454
- package/dist/chunks/cleanup-migration.mjs +0 -20
- package/dist/chunks/cli-hook.mjs +0 -4096
- package/dist/chunks/cloud-sync.mjs +0 -29
- package/dist/chunks/code-type-resolver.mjs +0 -880
- package/dist/chunks/codex-config-switch.mjs +0 -452
- package/dist/chunks/codex-provider-manager.mjs +0 -238
- package/dist/chunks/codex-uninstaller.mjs +0 -404
- package/dist/chunks/codex.mjs +0 -2141
- package/dist/chunks/commands.mjs +0 -108
- package/dist/chunks/commands2.mjs +0 -421
- package/dist/chunks/commit.mjs +0 -140
- package/dist/chunks/completion.mjs +0 -517
- package/dist/chunks/config-consolidator.mjs +0 -172
- package/dist/chunks/config-switch.mjs +0 -334
- package/dist/chunks/config.mjs +0 -558
- package/dist/chunks/config2.mjs +0 -484
- package/dist/chunks/config3.mjs +0 -486
- package/dist/chunks/constants.mjs +0 -323
- package/dist/chunks/context-opt.mjs +0 -444
- package/dist/chunks/context.mjs +0 -974
- package/dist/chunks/dashboard.mjs +0 -481
- package/dist/chunks/doctor.mjs +0 -1301
- package/dist/chunks/eval.mjs +0 -502
- package/dist/chunks/evolution.mjs +0 -322
- package/dist/chunks/features.mjs +0 -715
- package/dist/chunks/fish.mjs +0 -181
- package/dist/chunks/fs-operations.mjs +0 -180
- package/dist/chunks/health-alerts.mjs +0 -830
- package/dist/chunks/help.mjs +0 -341
- package/dist/chunks/hook-installer.mjs +0 -48
- package/dist/chunks/impact.mjs +0 -651
- package/dist/chunks/index.mjs +0 -23
- package/dist/chunks/index10.mjs +0 -19
- package/dist/chunks/index11.mjs +0 -1171
- package/dist/chunks/index12.mjs +0 -218
- package/dist/chunks/index13.mjs +0 -679
- package/dist/chunks/index14.mjs +0 -1009
- package/dist/chunks/index15.mjs +0 -194
- package/dist/chunks/index2.mjs +0 -7637
- package/dist/chunks/index3.mjs +0 -171
- package/dist/chunks/index4.mjs +0 -26
- package/dist/chunks/index5.mjs +0 -19
- package/dist/chunks/index6.mjs +0 -19092
- package/dist/chunks/index7.mjs +0 -616
- package/dist/chunks/index8.mjs +0 -1602
- package/dist/chunks/index9.mjs +0 -5384
- package/dist/chunks/init.mjs +0 -1911
- package/dist/chunks/installer.mjs +0 -757
- package/dist/chunks/installer2.mjs +0 -103
- package/dist/chunks/interview.mjs +0 -2927
- package/dist/chunks/json-config.mjs +0 -60
- package/dist/chunks/linux.mjs +0 -3863
- package/dist/chunks/macos.mjs +0 -69
- package/dist/chunks/main.mjs +0 -635
- package/dist/chunks/manager.mjs +0 -1048
- package/dist/chunks/marketplace.mjs +0 -265
- package/dist/chunks/mcp-cli.mjs +0 -205
- package/dist/chunks/mcp-performance.mjs +0 -187
- package/dist/chunks/mcp.mjs +0 -667
- package/dist/chunks/memory-check.mjs +0 -2973
- package/dist/chunks/memory-paths.mjs +0 -259
- package/dist/chunks/memory-sync.mjs +0 -209
- package/dist/chunks/memory.mjs +0 -354
- package/dist/chunks/metrics-display.mjs +0 -153
- package/dist/chunks/monitor.mjs +0 -1856
- package/dist/chunks/notification.mjs +0 -1864
- package/dist/chunks/onboarding.mjs +0 -386
- package/dist/chunks/package.mjs +0 -3
- package/dist/chunks/paradigm.mjs +0 -74
- package/dist/chunks/permission-manager.mjs +0 -250
- package/dist/chunks/permissions.mjs +0 -265
- package/dist/chunks/persistence-manager.mjs +0 -801
- package/dist/chunks/persistence.mjs +0 -707
- package/dist/chunks/platform.mjs +0 -395
- package/dist/chunks/plugin.mjs +0 -1936
- package/dist/chunks/powershell.mjs +0 -213
- package/dist/chunks/prompts.mjs +0 -244
- package/dist/chunks/providers.mjs +0 -263
- package/dist/chunks/quick-actions.mjs +0 -335
- package/dist/chunks/quick-provider.mjs +0 -755
- package/dist/chunks/quick-setup.mjs +0 -421
- package/dist/chunks/remote.mjs +0 -497
- package/dist/chunks/research.mjs +0 -1904
- package/dist/chunks/rollback.mjs +0 -38
- package/dist/chunks/session-manager.mjs +0 -1371
- package/dist/chunks/session.mjs +0 -878
- package/dist/chunks/sessions.mjs +0 -106
- package/dist/chunks/silent-updater.mjs +0 -396
- package/dist/chunks/simple-config.mjs +0 -122
- package/dist/chunks/skill.mjs +0 -117
- package/dist/chunks/skill2.mjs +0 -9052
- package/dist/chunks/skills-sync.mjs +0 -1343
- package/dist/chunks/skills.mjs +0 -577
- package/dist/chunks/slash-commands.mjs +0 -208
- package/dist/chunks/smart-guide.mjs +0 -247
- package/dist/chunks/snapshot.mjs +0 -58
- package/dist/chunks/startup.mjs +0 -487
- package/dist/chunks/stats.mjs +0 -191
- package/dist/chunks/status.mjs +0 -471
- package/dist/chunks/team.mjs +0 -63
- package/dist/chunks/thinking.mjs +0 -626
- package/dist/chunks/trace.mjs +0 -57
- package/dist/chunks/uninstall.mjs +0 -852
- package/dist/chunks/update.mjs +0 -174
- package/dist/chunks/upgrade-manager.mjs +0 -204
- package/dist/chunks/upgrade.mjs +0 -133
- package/dist/chunks/version-checker.mjs +0 -891
- package/dist/chunks/vim.mjs +0 -903
- package/dist/chunks/windows.mjs +0 -14
- package/dist/chunks/workflows.mjs +0 -633
- package/dist/chunks/wsl.mjs +0 -129
- package/dist/chunks/zero-config.mjs +0 -871
- package/dist/chunks/zsh.mjs +0 -182
- package/dist/cli.d.mts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.mjs +0 -2684
- package/dist/i18n/locales/en/agent-teams.json +0 -18
- package/dist/i18n/locales/en/agentBrowser.json +0 -80
- package/dist/i18n/locales/en/agents.json +0 -135
- package/dist/i18n/locales/en/api.json +0 -63
- package/dist/i18n/locales/en/ccjk-agents.json +0 -33
- package/dist/i18n/locales/en/ccjk-all.json +0 -23
- package/dist/i18n/locales/en/ccjk-skills.json +0 -22
- package/dist/i18n/locales/en/ccjk.json +0 -276
- package/dist/i18n/locales/en/ccr.json +0 -65
- package/dist/i18n/locales/en/claude-md.json +0 -73
- package/dist/i18n/locales/en/cli.json +0 -148
- package/dist/i18n/locales/en/cloud-setup.json +0 -31
- package/dist/i18n/locales/en/cloud-sync.json +0 -147
- package/dist/i18n/locales/en/cloud.json +0 -40
- package/dist/i18n/locales/en/cloudPlugins.json +0 -118
- package/dist/i18n/locales/en/codex.json +0 -184
- package/dist/i18n/locales/en/cometix.json +0 -29
- package/dist/i18n/locales/en/common.json +0 -68
- package/dist/i18n/locales/en/config.json +0 -108
- package/dist/i18n/locales/en/configuration.json +0 -236
- package/dist/i18n/locales/en/context.json +0 -85
- package/dist/i18n/locales/en/dashboard.json +0 -78
- package/dist/i18n/locales/en/errors.json +0 -26
- package/dist/i18n/locales/en/evolution.json +0 -54
- package/dist/i18n/locales/en/hooks.json +0 -74
- package/dist/i18n/locales/en/hooksSync.json +0 -133
- package/dist/i18n/locales/en/installation.json +0 -83
- package/dist/i18n/locales/en/interview.json +0 -104
- package/dist/i18n/locales/en/language.json +0 -19
- package/dist/i18n/locales/en/lsp.json +0 -78
- package/dist/i18n/locales/en/marketplace.json +0 -116
- package/dist/i18n/locales/en/mcp.json +0 -180
- package/dist/i18n/locales/en/memory.json +0 -23
- package/dist/i18n/locales/en/menu.json +0 -299
- package/dist/i18n/locales/en/multi-config.json +0 -79
- package/dist/i18n/locales/en/notification.json +0 -307
- package/dist/i18n/locales/en/permissions.json +0 -95
- package/dist/i18n/locales/en/persistence.json +0 -127
- package/dist/i18n/locales/en/plugins.json +0 -146
- package/dist/i18n/locales/en/quick-actions.json +0 -78
- package/dist/i18n/locales/en/registry.json +0 -54
- package/dist/i18n/locales/en/remote.json +0 -93
- package/dist/i18n/locales/en/sandbox.json +0 -44
- package/dist/i18n/locales/en/setup.json +0 -44
- package/dist/i18n/locales/en/shencha.json +0 -14
- package/dist/i18n/locales/en/skills.json +0 -100
- package/dist/i18n/locales/en/skillsSync.json +0 -74
- package/dist/i18n/locales/en/smartGuide.json +0 -49
- package/dist/i18n/locales/en/stats.json +0 -20
- package/dist/i18n/locales/en/subagent.json +0 -69
- package/dist/i18n/locales/en/superpowers.json +0 -117
- package/dist/i18n/locales/en/team.json +0 -7
- package/dist/i18n/locales/en/thinking.json +0 -65
- package/dist/i18n/locales/en/tools.json +0 -42
- package/dist/i18n/locales/en/uninstall.json +0 -56
- package/dist/i18n/locales/en/updater.json +0 -29
- package/dist/i18n/locales/en/vim.json +0 -169
- package/dist/i18n/locales/en/workflow.json +0 -55
- package/dist/i18n/locales/en/workspace.json +0 -108
- package/dist/i18n/locales/zh-CN/agent-teams.json +0 -18
- package/dist/i18n/locales/zh-CN/agentBrowser.json +0 -80
- package/dist/i18n/locales/zh-CN/agents.json +0 -135
- package/dist/i18n/locales/zh-CN/api.json +0 -63
- package/dist/i18n/locales/zh-CN/ccjk-agents.json +0 -33
- package/dist/i18n/locales/zh-CN/ccjk-all.json +0 -23
- package/dist/i18n/locales/zh-CN/ccjk-skills.json +0 -22
- package/dist/i18n/locales/zh-CN/ccjk.json +0 -276
- package/dist/i18n/locales/zh-CN/ccr.json +0 -65
- package/dist/i18n/locales/zh-CN/claude-md.json +0 -73
- package/dist/i18n/locales/zh-CN/cli.json +0 -148
- package/dist/i18n/locales/zh-CN/cloud-setup.json +0 -31
- package/dist/i18n/locales/zh-CN/cloud-sync.json +0 -147
- package/dist/i18n/locales/zh-CN/cloud.json +0 -40
- package/dist/i18n/locales/zh-CN/cloudPlugins.json +0 -118
- package/dist/i18n/locales/zh-CN/codex.json +0 -184
- package/dist/i18n/locales/zh-CN/cometix.json +0 -29
- package/dist/i18n/locales/zh-CN/common.json +0 -68
- package/dist/i18n/locales/zh-CN/config.json +0 -108
- package/dist/i18n/locales/zh-CN/configuration.json +0 -234
- package/dist/i18n/locales/zh-CN/context.json +0 -85
- package/dist/i18n/locales/zh-CN/dashboard.json +0 -78
- package/dist/i18n/locales/zh-CN/errors.json +0 -26
- package/dist/i18n/locales/zh-CN/evolution.json +0 -54
- package/dist/i18n/locales/zh-CN/hooks.json +0 -74
- package/dist/i18n/locales/zh-CN/hooksSync.json +0 -133
- package/dist/i18n/locales/zh-CN/installation.json +0 -83
- package/dist/i18n/locales/zh-CN/interview.json +0 -104
- package/dist/i18n/locales/zh-CN/language.json +0 -19
- package/dist/i18n/locales/zh-CN/lsp.json +0 -78
- package/dist/i18n/locales/zh-CN/marketplace.json +0 -116
- package/dist/i18n/locales/zh-CN/mcp.json +0 -180
- package/dist/i18n/locales/zh-CN/memory.json +0 -23
- package/dist/i18n/locales/zh-CN/menu.json +0 -299
- package/dist/i18n/locales/zh-CN/multi-config.json +0 -79
- package/dist/i18n/locales/zh-CN/notification.json +0 -307
- package/dist/i18n/locales/zh-CN/permissions.json +0 -95
- package/dist/i18n/locales/zh-CN/persistence.json +0 -127
- package/dist/i18n/locales/zh-CN/plugins.json +0 -146
- package/dist/i18n/locales/zh-CN/quick-actions.json +0 -78
- package/dist/i18n/locales/zh-CN/registry.json +0 -54
- package/dist/i18n/locales/zh-CN/remote.json +0 -93
- package/dist/i18n/locales/zh-CN/sandbox.json +0 -44
- package/dist/i18n/locales/zh-CN/setup.json +0 -44
- package/dist/i18n/locales/zh-CN/shencha.json +0 -14
- package/dist/i18n/locales/zh-CN/skills.json +0 -100
- package/dist/i18n/locales/zh-CN/skillsSync.json +0 -74
- package/dist/i18n/locales/zh-CN/smartGuide.json +0 -49
- package/dist/i18n/locales/zh-CN/stats.json +0 -20
- package/dist/i18n/locales/zh-CN/subagent.json +0 -69
- package/dist/i18n/locales/zh-CN/superpowers.json +0 -117
- package/dist/i18n/locales/zh-CN/team.json +0 -7
- package/dist/i18n/locales/zh-CN/thinking.json +0 -65
- package/dist/i18n/locales/zh-CN/tools.json +0 -42
- package/dist/i18n/locales/zh-CN/uninstall.json +0 -56
- package/dist/i18n/locales/zh-CN/updater.json +0 -29
- package/dist/i18n/locales/zh-CN/vim.json +0 -169
- package/dist/i18n/locales/zh-CN/workflow.json +0 -55
- package/dist/i18n/locales/zh-CN/workspace.json +0 -108
- package/dist/index.d.mts +0 -5658
- package/dist/index.d.ts +0 -5658
- package/dist/index.mjs +0 -3732
- package/dist/shared/ccjk.5bEolFrk.mjs +0 -254
- package/dist/shared/ccjk.8oaxX4iR.mjs +0 -90
- package/dist/shared/ccjk.B2U7DsPy.mjs +0 -31
- package/dist/shared/ccjk.B2f-cwUP.mjs +0 -468
- package/dist/shared/ccjk.BAGoDD49.mjs +0 -36
- package/dist/shared/ccjk.BBtCGd_g.mjs +0 -899
- package/dist/shared/ccjk.BFQ7yr5S.mjs +0 -16
- package/dist/shared/ccjk.BLsIiTqO.mjs +0 -449
- package/dist/shared/ccjk.BXv8aYs1.mjs +0 -170
- package/dist/shared/ccjk.BnsY5WxD.mjs +0 -171
- package/dist/shared/ccjk.BoApaI4j.mjs +0 -28
- package/dist/shared/ccjk.Bq8TqZG_.mjs +0 -189
- package/dist/shared/ccjk.BtrioX1Z.mjs +0 -25
- package/dist/shared/ccjk.Bx_rmYfN.mjs +0 -69
- package/dist/shared/ccjk.BzPbSEP2.mjs +0 -115
- package/dist/shared/ccjk.C0WLUnFV.mjs +0 -293
- package/dist/shared/ccjk.C1hANZTu.mjs +0 -19
- package/dist/shared/ccjk.C2jHOZVP.mjs +0 -52
- package/dist/shared/ccjk.CNhnT6uQ.mjs +0 -636
- package/dist/shared/ccjk.COweQ1RR.mjs +0 -5
- package/dist/shared/ccjk.CfKKcvWy.mjs +0 -126
- package/dist/shared/ccjk.Cjgrln_h.mjs +0 -297
- package/dist/shared/ccjk.CoCHVXl3.mjs +0 -3951
- package/dist/shared/ccjk.CwGZSTAK.mjs +0 -319
- package/dist/shared/ccjk.CxpGa6MC.mjs +0 -2724
- package/dist/shared/ccjk.D-magaEx.mjs +0 -763
- package/dist/shared/ccjk.D0g2ABGg.mjs +0 -171
- package/dist/shared/ccjk.D6ycHbak.mjs +0 -270
- package/dist/shared/ccjk.D75wivnp.mjs +0 -142
- package/dist/shared/ccjk.DDL-4C-k.mjs +0 -100
- package/dist/shared/ccjk.DFRPtmK_.mjs +0 -75
- package/dist/shared/ccjk.DMV3x5Sd.mjs +0 -299
- package/dist/shared/ccjk.DZ2LLOa-.mjs +0 -2195
- package/dist/shared/ccjk.DbigonEQ.mjs +0 -698
- package/dist/shared/ccjk.DcMvE7lf.mjs +0 -618
- package/dist/shared/ccjk.DeWpAShp.mjs +0 -1828
- package/dist/shared/ccjk.DhJ1kyDR.mjs +0 -30
- package/dist/shared/ccjk.DlTXS9rP.mjs +0 -224
- package/dist/shared/ccjk.DopKzo3z.mjs +0 -305
- package/dist/shared/ccjk.DsZsc4LR.mjs +0 -1280
- package/dist/shared/ccjk.DuzJZlgj.mjs +0 -418
- package/dist/shared/ccjk.Dxgd2vjc.mjs +0 -444
- package/dist/shared/ccjk.J8YiPsOw.mjs +0 -259
- package/dist/shared/ccjk.KfSWcGlE.mjs +0 -38
- package/dist/shared/ccjk.L7yC58_i.mjs +0 -225
- package/dist/shared/ccjk.MwtjAULc.mjs +0 -1447
- package/dist/shared/ccjk.OJKHVSOb.mjs +0 -2005
- package/dist/shared/ccjk.OTnevPNE.mjs +0 -225
- package/dist/shared/ccjk.RyizuzOI.mjs +0 -21
- package/dist/shared/ccjk.T_cX87dY.mjs +0 -15
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +0 -249
- package/dist/shared/ccjk.gDEDGD_t.mjs +0 -38
- package/dist/shared/ccjk.hoqrwWdN.mjs +0 -333
- package/dist/shared/ccjk.i_vn-9C3.mjs +0 -317
- package/dist/shared/ccjk.lG3ccFjm.mjs +0 -885
- package/dist/shared/ccjk.wLJHO0Af.mjs +0 -244
- package/dist/shared/ccjk.y-a_1vK4.mjs +0 -5127
- package/dist/templates/agents/README.md +0 -78
- package/dist/templates/agents/fullstack-developer.json +0 -70
- package/dist/templates/agents/go-expert.json +0 -69
- package/dist/templates/agents/index.json +0 -64
- package/dist/templates/agents/python-expert.json +0 -69
- package/dist/templates/agents/react-specialist.json +0 -69
- package/dist/templates/agents/testing-automation-expert.json +0 -70
- package/dist/templates/agents/typescript-architect.json +0 -69
- package/dist/templates/claude-code/common/settings.json +0 -109
- package/dist/templates/common/error-prevention.md +0 -267
- package/dist/templates/common/karpathy-baseline.md +0 -83
- package/dist/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
- package/dist/templates/common/output-styles/zh-CN/codex-rigor-mode.md +0 -114
- package/dist/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
- package/dist/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
- package/dist/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
- package/dist/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
- package/dist/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
- package/dist/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
- package/dist/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
- package/dist/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
- package/dist/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
- package/dist/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
- package/dist/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
- package/dist/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
- package/dist/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
- package/dist/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
- package/dist/templates/common/workflow/essential/en/feat.md +0 -92
- package/dist/templates/common/workflow/essential/en/goal.md +0 -147
- package/dist/templates/common/workflow/essential/en/init-project.md +0 -53
- package/dist/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
- package/dist/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
- package/dist/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
- package/dist/templates/common/workflow/essential/zh-CN/feat.md +0 -315
- package/dist/templates/common/workflow/essential/zh-CN/goal.md +0 -146
- package/dist/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
- package/dist/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
- package/dist/templates/common/workflow/git/en/git-commit.md +0 -205
- package/dist/templates/common/workflow/git/en/git-rollback.md +0 -90
- package/dist/templates/common/workflow/git/en/git-worktree.md +0 -276
- package/dist/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
- package/dist/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
- package/dist/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
- package/dist/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
- package/dist/templates/common/workflow/interview/en/interview.md +0 -67
- package/dist/templates/common/workflow/interview/zh-CN/interview.md +0 -67
- package/dist/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
- package/dist/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
- package/dist/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
- package/dist/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
- package/dist/templates/common/workflow/sixStep/en/workflow.md +0 -83
- package/dist/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
- package/dist/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
- package/dist/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
- package/dist/templates/hooks/README.md +0 -212
- package/dist/templates/hooks/git-workflow-hooks.md +0 -551
- package/dist/templates/hooks/post-test/coverage.json +0 -21
- package/dist/templates/hooks/post-test/summary.json +0 -21
- package/dist/templates/hooks/post-test-coverage.md +0 -434
- package/dist/templates/hooks/pre-commit/eslint.json +0 -22
- package/dist/templates/hooks/pre-commit/prettier.json +0 -22
- package/dist/templates/hooks/pre-commit-black.md +0 -274
- package/dist/templates/hooks/pre-commit-eslint.md +0 -153
- package/dist/templates/hooks/pre-commit-gofmt.md +0 -284
- package/dist/templates/hooks/pre-commit-prettier.md +0 -212
- package/dist/templates/hooks/pre-commit-type-check.md +0 -377
- package/dist/templates/skills/ccjk-init.md +0 -154
- package/dist/templates/skills/ccjk-mcp-setup.md +0 -205
- package/dist/templates/skills/ccjk-troubleshoot.md +0 -228
- package/dist/templates/skills/django-patterns.md +0 -1016
- package/dist/templates/skills/git-workflow.md +0 -748
- package/dist/templates/skills/go-idioms.md +0 -963
- package/dist/templates/skills/index.json +0 -132
- package/dist/templates/skills/nextjs-optimization.md +0 -694
- package/dist/templates/skills/python-pep8.md +0 -852
- package/dist/templates/skills/react-patterns.md +0 -686
- package/dist/templates/skills/rust-patterns.md +0 -1057
- package/dist/templates/skills/security-best-practices.md +0 -1413
- package/dist/templates/skills/testing-best-practices.md +0 -1315
- package/dist/templates/skills/ts-best-practices.md +0 -354
- package/templates/agents/README.md +0 -78
- package/templates/agents/fullstack-developer.json +0 -70
- package/templates/agents/go-expert.json +0 -69
- package/templates/agents/index.json +0 -64
- package/templates/agents/python-expert.json +0 -69
- package/templates/agents/react-specialist.json +0 -69
- package/templates/agents/testing-automation-expert.json +0 -70
- package/templates/agents/typescript-architect.json +0 -69
- package/templates/claude-code/common/settings.json +0 -109
- package/templates/common/error-prevention.md +0 -267
- package/templates/common/karpathy-baseline.md +0 -83
- package/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
- package/templates/common/output-styles/zh-CN/codex-rigor-mode.md +0 -114
- package/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
- package/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
- package/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
- package/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
- package/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
- package/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
- package/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
- package/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
- package/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
- package/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
- package/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
- package/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
- package/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
- package/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
- package/templates/common/workflow/essential/en/feat.md +0 -92
- package/templates/common/workflow/essential/en/goal.md +0 -147
- package/templates/common/workflow/essential/en/init-project.md +0 -53
- package/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
- package/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
- package/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
- package/templates/common/workflow/essential/zh-CN/feat.md +0 -315
- package/templates/common/workflow/essential/zh-CN/goal.md +0 -146
- package/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
- package/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
- package/templates/common/workflow/git/en/git-commit.md +0 -205
- package/templates/common/workflow/git/en/git-rollback.md +0 -90
- package/templates/common/workflow/git/en/git-worktree.md +0 -276
- package/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
- package/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
- package/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
- package/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
- package/templates/common/workflow/interview/en/interview.md +0 -67
- package/templates/common/workflow/interview/zh-CN/interview.md +0 -67
- package/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
- package/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
- package/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
- package/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
- package/templates/common/workflow/sixStep/en/workflow.md +0 -83
- package/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
- package/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
- package/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
- package/templates/hooks/README.md +0 -212
- package/templates/hooks/git-workflow-hooks.md +0 -551
- package/templates/hooks/post-test/coverage.json +0 -21
- package/templates/hooks/post-test/summary.json +0 -21
- package/templates/hooks/post-test-coverage.md +0 -434
- package/templates/hooks/pre-commit/eslint.json +0 -22
- package/templates/hooks/pre-commit/prettier.json +0 -22
- package/templates/hooks/pre-commit-black.md +0 -274
- package/templates/hooks/pre-commit-eslint.md +0 -153
- package/templates/hooks/pre-commit-gofmt.md +0 -284
- package/templates/hooks/pre-commit-prettier.md +0 -212
- package/templates/hooks/pre-commit-type-check.md +0 -377
- package/templates/skills/basic.hbs +0 -72
- package/templates/skills/ccjk-init.md +0 -154
- package/templates/skills/ccjk-mcp-setup.md +0 -205
- package/templates/skills/ccjk-troubleshoot.md +0 -228
- package/templates/skills/code-refactor.hbs +0 -133
- package/templates/skills/code-review.hbs +0 -141
- package/templates/skills/django-patterns.md +0 -1016
- package/templates/skills/git-workflow.md +0 -748
- package/templates/skills/go-idioms.md +0 -963
- package/templates/skills/index.json +0 -132
- package/templates/skills/nextjs-optimization.md +0 -694
- package/templates/skills/python-pep8.md +0 -852
- package/templates/skills/react-patterns.md +0 -686
- package/templates/skills/rust-patterns.md +0 -1057
- package/templates/skills/security-best-practices.md +0 -1413
- package/templates/skills/testing-best-practices.md +0 -1315
- package/templates/skills/ts-best-practices.md +0 -354
- package/templates/skills/type-fix.hbs +0 -132
|
@@ -1,757 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
|
-
import process__default from 'node:process';
|
|
4
|
-
import a from './index5.mjs';
|
|
5
|
-
import { i as inquirer } from './index6.mjs';
|
|
6
|
-
import ora from './index8.mjs';
|
|
7
|
-
import { exec as q } from './main.mjs';
|
|
8
|
-
import { getCodeToolRuntimeCommand, CODE_TOOL_INFO, isClaudeFamilyCodeTool } from './constants.mjs';
|
|
9
|
-
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
10
|
-
import { updateClaudeCode } from './auto-updater.mjs';
|
|
11
|
-
import { exists } from './fs-operations.mjs';
|
|
12
|
-
import { f as findCommandPath, a as getPlatform, b as getHomebrewCommandPaths, d as isTermux, e as getTermuxPrefix, w as wrapCommandWithSudo, h as isWSL, j as getWSLInfo, c as commandExists, k as getRecommendedInstallMethods } from './platform.mjs';
|
|
13
|
-
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
14
|
-
import '../shared/ccjk.BAGoDD49.mjs';
|
|
15
|
-
import 'node:readline';
|
|
16
|
-
import 'stream';
|
|
17
|
-
import 'node:tty';
|
|
18
|
-
import 'node:async_hooks';
|
|
19
|
-
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
20
|
-
import 'node:util';
|
|
21
|
-
import 'tty';
|
|
22
|
-
import 'fs';
|
|
23
|
-
import 'child_process';
|
|
24
|
-
import 'node:path';
|
|
25
|
-
import 'node:crypto';
|
|
26
|
-
import 'buffer';
|
|
27
|
-
import 'string_decoder';
|
|
28
|
-
import '../shared/ccjk.DeWpAShp.mjs';
|
|
29
|
-
import 'module';
|
|
30
|
-
import 'node:child_process';
|
|
31
|
-
import 'node:stream';
|
|
32
|
-
import 'node:url';
|
|
33
|
-
import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
34
|
-
import './version-checker.mjs';
|
|
35
|
-
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
36
|
-
import 'node:fs/promises';
|
|
37
|
-
|
|
38
|
-
async function isClaudeCodeInstalled() {
|
|
39
|
-
return await commandExists("claude");
|
|
40
|
-
}
|
|
41
|
-
async function installClaudeCode(skipMethodSelection = false) {
|
|
42
|
-
ensureI18nInitialized();
|
|
43
|
-
const codeType = "claude-code";
|
|
44
|
-
const installed = await isClaudeCodeInstalled();
|
|
45
|
-
if (installed) {
|
|
46
|
-
console.log(a.green(`\u2714 ${i18n.t("installation:alreadyInstalled")}`));
|
|
47
|
-
const version = await detectInstalledVersion(codeType);
|
|
48
|
-
if (version) {
|
|
49
|
-
console.log(a.gray(` ${i18n.t("installation:detectedVersion", { version })}`));
|
|
50
|
-
}
|
|
51
|
-
const verification = await verifyInstallation(codeType);
|
|
52
|
-
if (verification.symlinkCreated) {
|
|
53
|
-
displayVerificationResult(verification, codeType);
|
|
54
|
-
}
|
|
55
|
-
await updateClaudeCode();
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (isTermux()) {
|
|
59
|
-
console.log(a.yellow(`\u2139 ${i18n.t("installation:termuxDetected")}`));
|
|
60
|
-
const termuxPrefix = getTermuxPrefix();
|
|
61
|
-
console.log(a.gray(i18n.t("installation:termuxPathInfo", { path: termuxPrefix })));
|
|
62
|
-
console.log(a.gray(`Node.js: ${termuxPrefix}/bin/node`));
|
|
63
|
-
console.log(a.gray(`npm: ${termuxPrefix}/bin/npm`));
|
|
64
|
-
}
|
|
65
|
-
if (isWSL()) {
|
|
66
|
-
const wslInfo = getWSLInfo();
|
|
67
|
-
if (wslInfo?.distro) {
|
|
68
|
-
console.log(a.yellow(`\u2139 ${i18n.t("installation:wslDetected", { distro: wslInfo.distro })}`));
|
|
69
|
-
} else {
|
|
70
|
-
console.log(a.yellow(`\u2139 ${i18n.t("installation:wslDetectedGeneric")}`));
|
|
71
|
-
}
|
|
72
|
-
console.log(a.gray(i18n.t("installation:wslPathInfo", { path: `${homedir()}/.claude/` })));
|
|
73
|
-
}
|
|
74
|
-
if (skipMethodSelection) {
|
|
75
|
-
console.log(i18n.t("installation:installing"));
|
|
76
|
-
try {
|
|
77
|
-
const { command, args, usedSudo } = wrapCommandWithSudo("npm", ["install", "-g", "@anthropic-ai/claude-code", "--force"]);
|
|
78
|
-
if (usedSudo) {
|
|
79
|
-
console.log(a.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
|
|
80
|
-
}
|
|
81
|
-
await q(command, args);
|
|
82
|
-
console.log(`\u2714 ${i18n.t("installation:installSuccess")}`);
|
|
83
|
-
await setInstallMethod("npm");
|
|
84
|
-
const verification = await verifyInstallation(codeType);
|
|
85
|
-
displayVerificationResult(verification, codeType);
|
|
86
|
-
if (isTermux()) {
|
|
87
|
-
console.log(a.gray(`
|
|
88
|
-
Claude Code installed to: ${getTermuxPrefix()}/bin/claude`));
|
|
89
|
-
}
|
|
90
|
-
if (isWSL()) {
|
|
91
|
-
console.log(a.gray(`
|
|
92
|
-
${i18n.t("installation:wslInstallSuccess")}`));
|
|
93
|
-
}
|
|
94
|
-
} catch (error) {
|
|
95
|
-
console.error(`\u2716 ${i18n.t("installation:installFailed")}`);
|
|
96
|
-
if (isTermux()) {
|
|
97
|
-
console.error(a.yellow(`
|
|
98
|
-
${i18n.t("installation:termuxInstallHint")}
|
|
99
|
-
`));
|
|
100
|
-
}
|
|
101
|
-
throw error;
|
|
102
|
-
}
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
const method = await selectInstallMethod(codeType);
|
|
106
|
-
if (!method) {
|
|
107
|
-
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
const success = await executeInstallMethod(method, codeType);
|
|
111
|
-
if (!success) {
|
|
112
|
-
const retrySuccess = await handleInstallFailure(codeType, [method]);
|
|
113
|
-
if (!retrySuccess) {
|
|
114
|
-
console.error(a.red(`\u2716 ${i18n.t("installation:installFailed")}`));
|
|
115
|
-
throw new Error(i18n.t("installation:installFailed"));
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
if (isTermux()) {
|
|
119
|
-
console.log(a.gray(`
|
|
120
|
-
Claude Code installed to: ${getTermuxPrefix()}/bin/claude`));
|
|
121
|
-
}
|
|
122
|
-
if (isWSL()) {
|
|
123
|
-
console.log(a.gray(`
|
|
124
|
-
${i18n.t("installation:wslInstallSuccess")}`));
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
async function isMyclaudeInstalled() {
|
|
128
|
-
return await commandExists("clavue");
|
|
129
|
-
}
|
|
130
|
-
async function installMyclaude(skipMethodSelection = false) {
|
|
131
|
-
ensureI18nInitialized();
|
|
132
|
-
const codeType = "clavue";
|
|
133
|
-
const codeTypeName = CODE_TOOL_INFO.clavue.name;
|
|
134
|
-
const installed = await isMyclaudeInstalled();
|
|
135
|
-
if (installed) {
|
|
136
|
-
console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:alreadyInstalled")}`));
|
|
137
|
-
const version = await detectInstalledVersion(codeType);
|
|
138
|
-
if (version) {
|
|
139
|
-
console.log(a.gray(` ${i18n.t("installation:detectedVersion", { version })}`));
|
|
140
|
-
}
|
|
141
|
-
const verification = await verifyInstallation(codeType);
|
|
142
|
-
displayVerificationResult(verification, codeType);
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (skipMethodSelection) {
|
|
146
|
-
console.log(i18n.t("installation:installingWith", { method: "npm", codeType: codeTypeName }));
|
|
147
|
-
try {
|
|
148
|
-
const { command, args, usedSudo } = wrapCommandWithSudo("npm", ["install", "-g", "clavue", "--force"]);
|
|
149
|
-
if (usedSudo) {
|
|
150
|
-
console.log(a.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
|
|
151
|
-
}
|
|
152
|
-
await q(command, args);
|
|
153
|
-
await setInstallMethod("npm", codeType);
|
|
154
|
-
console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:installSuccess")}`));
|
|
155
|
-
const verification = await verifyInstallation(codeType);
|
|
156
|
-
displayVerificationResult(verification, codeType);
|
|
157
|
-
} catch (error) {
|
|
158
|
-
console.error(a.red(`\u2716 ${codeTypeName} ${i18n.t("installation:installFailed")}`));
|
|
159
|
-
throw error;
|
|
160
|
-
}
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
const success = await executeInstallMethod("npm", codeType);
|
|
164
|
-
if (!success) {
|
|
165
|
-
throw new Error(i18n.t("installation:installFailed"));
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
async function isCodexInstalled() {
|
|
169
|
-
return await commandExists("codex");
|
|
170
|
-
}
|
|
171
|
-
async function installCodex(skipMethodSelection = false) {
|
|
172
|
-
ensureI18nInitialized();
|
|
173
|
-
const codeType = "codex";
|
|
174
|
-
const codeTypeName = i18n.t("common:codex");
|
|
175
|
-
const installed = await isCodexInstalled();
|
|
176
|
-
if (installed) {
|
|
177
|
-
console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:alreadyInstalled")}`));
|
|
178
|
-
const version = await detectInstalledVersion(codeType);
|
|
179
|
-
if (version) {
|
|
180
|
-
console.log(a.gray(` ${i18n.t("installation:detectedVersion", { version })}`));
|
|
181
|
-
}
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
if (skipMethodSelection) {
|
|
185
|
-
console.log(i18n.t("installation:installingWith", { method: "npm", codeType: codeTypeName }));
|
|
186
|
-
try {
|
|
187
|
-
const { command, args, usedSudo } = wrapCommandWithSudo("npm", ["install", "-g", "@openai/codex", "--force"]);
|
|
188
|
-
if (usedSudo) {
|
|
189
|
-
console.log(a.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
|
|
190
|
-
}
|
|
191
|
-
await q(command, args);
|
|
192
|
-
console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:installSuccess")}`));
|
|
193
|
-
const verification = await verifyInstallation(codeType);
|
|
194
|
-
displayVerificationResult(verification, codeType);
|
|
195
|
-
} catch (error) {
|
|
196
|
-
console.error(a.red(`\u2716 ${codeTypeName} ${i18n.t("installation:installFailed")}`));
|
|
197
|
-
throw error;
|
|
198
|
-
}
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
const method = await selectInstallMethod(codeType);
|
|
202
|
-
if (!method) {
|
|
203
|
-
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
const success = await executeInstallMethod(method, codeType);
|
|
207
|
-
if (!success) {
|
|
208
|
-
const retrySuccess = await handleInstallFailure(codeType, [method]);
|
|
209
|
-
if (!retrySuccess) {
|
|
210
|
-
console.error(a.red(`\u2716 ${codeTypeName} ${i18n.t("installation:installFailed")}`));
|
|
211
|
-
throw new Error(i18n.t("installation:installFailed"));
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
async function getInstallationStatus(codeType = "claude-code") {
|
|
216
|
-
const hasGlobal = codeType === "claude-code" ? await isClaudeCodeInstalled() : codeType === "clavue" ? await isMyclaudeInstalled() : await isCodexInstalled();
|
|
217
|
-
return {
|
|
218
|
-
hasGlobal,
|
|
219
|
-
hasLocal: false,
|
|
220
|
-
localPath: ""
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
async function getInstallMethodFromConfig(codeType) {
|
|
224
|
-
try {
|
|
225
|
-
if (isClaudeFamilyCodeTool(codeType)) {
|
|
226
|
-
const { readMcpConfig } = await import('./claude-config.mjs').then(function (n) { return n.n; });
|
|
227
|
-
const config = readMcpConfig();
|
|
228
|
-
return config?.installMethod || null;
|
|
229
|
-
}
|
|
230
|
-
} catch {
|
|
231
|
-
}
|
|
232
|
-
return null;
|
|
233
|
-
}
|
|
234
|
-
async function uninstallCodeTool(codeType) {
|
|
235
|
-
ensureI18nInitialized();
|
|
236
|
-
const codeTypeName = CODE_TOOL_INFO[codeType]?.name || codeType;
|
|
237
|
-
let method = await getInstallMethodFromConfig(codeType);
|
|
238
|
-
if (!method) {
|
|
239
|
-
if (codeType === "claude-code") {
|
|
240
|
-
try {
|
|
241
|
-
const result = await q("brew", ["list", "--cask", "claude-code"]);
|
|
242
|
-
if (result.exitCode === 0) {
|
|
243
|
-
method = "homebrew";
|
|
244
|
-
}
|
|
245
|
-
} catch {
|
|
246
|
-
}
|
|
247
|
-
} else if (codeType === "clavue") {
|
|
248
|
-
try {
|
|
249
|
-
const result = await q("brew", ["list", "--cask", "clavue"]);
|
|
250
|
-
if (result.exitCode === 0) {
|
|
251
|
-
method = "homebrew";
|
|
252
|
-
}
|
|
253
|
-
} catch {
|
|
254
|
-
}
|
|
255
|
-
} else if (codeType === "codex") {
|
|
256
|
-
try {
|
|
257
|
-
const result = await q("brew", ["list", "--cask", "codex"]);
|
|
258
|
-
if (result.exitCode === 0) {
|
|
259
|
-
method = "homebrew";
|
|
260
|
-
}
|
|
261
|
-
} catch {
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
if (!method) {
|
|
265
|
-
method = "npm";
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
if (method === "native") {
|
|
269
|
-
const platform = getPlatform();
|
|
270
|
-
if (platform === "macos" || platform === "linux") {
|
|
271
|
-
try {
|
|
272
|
-
const testResult = codeType === "claude-code" ? await q("brew", ["list", "--cask", "claude-code"]) : codeType === "clavue" ? await q("brew", ["list", "--cask", "clavue"]) : await q("brew", ["list", "--cask", "codex"]);
|
|
273
|
-
if (testResult.exitCode === 0) {
|
|
274
|
-
method = "homebrew";
|
|
275
|
-
}
|
|
276
|
-
} catch {
|
|
277
|
-
method = "manual";
|
|
278
|
-
}
|
|
279
|
-
} else {
|
|
280
|
-
method = "manual";
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
const spinner = ora(i18n.t("installation:uninstallingWith", { method, codeType: codeTypeName })).start();
|
|
284
|
-
try {
|
|
285
|
-
switch (method) {
|
|
286
|
-
case "npm":
|
|
287
|
-
case "npm-global": {
|
|
288
|
-
const packageName = codeType === "claude-code" ? "@anthropic-ai/claude-code" : codeType === "clavue" ? "clavue" : "@openai/codex";
|
|
289
|
-
const { command, args, usedSudo } = wrapCommandWithSudo("npm", ["uninstall", "-g", packageName]);
|
|
290
|
-
if (usedSudo) {
|
|
291
|
-
spinner.info(i18n.t("installation:usingSudo"));
|
|
292
|
-
spinner.start();
|
|
293
|
-
}
|
|
294
|
-
await q(command, args);
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
case "homebrew": {
|
|
298
|
-
if (codeType === "claude-code") {
|
|
299
|
-
await q("brew", ["uninstall", "--cask", "claude-code"]);
|
|
300
|
-
} else if (codeType === "clavue") {
|
|
301
|
-
await q("brew", ["uninstall", "--cask", "clavue"]);
|
|
302
|
-
} else {
|
|
303
|
-
await q("brew", ["uninstall", "--cask", "codex"]);
|
|
304
|
-
}
|
|
305
|
-
break;
|
|
306
|
-
}
|
|
307
|
-
case "manual":
|
|
308
|
-
default: {
|
|
309
|
-
spinner.warn(i18n.t("installation:manualUninstallRequired", { codeType: codeTypeName }));
|
|
310
|
-
const command = getCodeToolRuntimeCommand(codeType);
|
|
311
|
-
try {
|
|
312
|
-
const whichCmd = getPlatform() === "windows" ? "where" : "which";
|
|
313
|
-
const result = await q(whichCmd, [command]);
|
|
314
|
-
if (result.stdout) {
|
|
315
|
-
const binaryPath = result.stdout.trim().split("\n")[0];
|
|
316
|
-
spinner.info(i18n.t("installation:binaryLocation", { path: binaryPath }));
|
|
317
|
-
const platform = getPlatform();
|
|
318
|
-
if (platform === "windows") {
|
|
319
|
-
const quotedBinaryPath = `"${binaryPath}"`;
|
|
320
|
-
await q("cmd", ["/c", "del", "/f", "/q", quotedBinaryPath]);
|
|
321
|
-
} else {
|
|
322
|
-
const { command: rmCmd, args: rmArgs } = wrapCommandWithSudo("rm", ["-f", binaryPath]);
|
|
323
|
-
if (rmCmd === "sudo") {
|
|
324
|
-
spinner.info(i18n.t("installation:usingSudo"));
|
|
325
|
-
spinner.start();
|
|
326
|
-
}
|
|
327
|
-
await q(rmCmd, rmArgs);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
} catch {
|
|
331
|
-
spinner.fail(i18n.t("installation:failedToLocateBinary", { command }));
|
|
332
|
-
return false;
|
|
333
|
-
}
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
spinner.succeed(i18n.t("installation:uninstallSuccess", { method, codeType: codeTypeName }));
|
|
338
|
-
return true;
|
|
339
|
-
} catch (error) {
|
|
340
|
-
spinner.fail(i18n.t("installation:uninstallFailed", { method, codeType: codeTypeName }));
|
|
341
|
-
if (error instanceof Error) {
|
|
342
|
-
console.error(a.gray(error.message));
|
|
343
|
-
}
|
|
344
|
-
return false;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
async function setInstallMethod(method, codeType = "claude-code") {
|
|
348
|
-
try {
|
|
349
|
-
if (isClaudeFamilyCodeTool(codeType)) {
|
|
350
|
-
const {
|
|
351
|
-
readMcpConfig,
|
|
352
|
-
writeMcpConfig
|
|
353
|
-
} = await import('./claude-config.mjs').then(function (n) { return n.n; });
|
|
354
|
-
const {
|
|
355
|
-
readClavueConfig,
|
|
356
|
-
writeClavueConfig
|
|
357
|
-
} = await import('./clavue-config.mjs').then(function (n) { return n.g; });
|
|
358
|
-
const readConfig = codeType === "clavue" ? readClavueConfig : readMcpConfig;
|
|
359
|
-
const writeConfig = codeType === "clavue" ? writeClavueConfig : writeMcpConfig;
|
|
360
|
-
let config = readConfig();
|
|
361
|
-
if (!config) {
|
|
362
|
-
config = { mcpServers: {} };
|
|
363
|
-
}
|
|
364
|
-
config.installMethod = method === "npm" ? "npm-global" : method;
|
|
365
|
-
writeConfig(config);
|
|
366
|
-
}
|
|
367
|
-
} catch (error) {
|
|
368
|
-
console.error("Failed to set installMethod:", error);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
async function detectInstalledVersion(codeType) {
|
|
372
|
-
try {
|
|
373
|
-
const command = getCodeToolRuntimeCommand(codeType);
|
|
374
|
-
const result = await q(command, ["--version"]);
|
|
375
|
-
if (result.exitCode === 0 && result.stdout) {
|
|
376
|
-
const versionMatch = result.stdout.match(/(\d+\.\d+\.\d+)/);
|
|
377
|
-
return versionMatch ? versionMatch[1] : result.stdout.trim();
|
|
378
|
-
}
|
|
379
|
-
} catch {
|
|
380
|
-
}
|
|
381
|
-
return null;
|
|
382
|
-
}
|
|
383
|
-
function getInstallMethodLabel(method) {
|
|
384
|
-
switch (method) {
|
|
385
|
-
case "npm":
|
|
386
|
-
return i18n.t("installation:installMethodNpm");
|
|
387
|
-
case "homebrew":
|
|
388
|
-
return i18n.t("installation:installMethodHomebrew");
|
|
389
|
-
case "curl":
|
|
390
|
-
return i18n.t("installation:installMethodCurl");
|
|
391
|
-
case "powershell":
|
|
392
|
-
return i18n.t("installation:installMethodPowershell");
|
|
393
|
-
case "cmd":
|
|
394
|
-
return i18n.t("installation:installMethodCmd");
|
|
395
|
-
default:
|
|
396
|
-
return method;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
function getInstallMethodOptions(codeType, recommendedMethods) {
|
|
400
|
-
const allMethods = ["npm", "homebrew", "curl", "powershell", "cmd"];
|
|
401
|
-
const platform = getPlatform();
|
|
402
|
-
const availableMethods = allMethods.filter((method) => {
|
|
403
|
-
if (codeType === "codex" && !["npm", "homebrew"].includes(method)) {
|
|
404
|
-
return false;
|
|
405
|
-
}
|
|
406
|
-
if (codeType === "clavue" && method !== "npm") {
|
|
407
|
-
return false;
|
|
408
|
-
}
|
|
409
|
-
if (method === "homebrew")
|
|
410
|
-
return platform === "macos" || platform === "linux";
|
|
411
|
-
if (method === "curl")
|
|
412
|
-
return platform !== "windows" || isWSL();
|
|
413
|
-
if (method === "powershell" || method === "cmd")
|
|
414
|
-
return platform === "windows";
|
|
415
|
-
return true;
|
|
416
|
-
});
|
|
417
|
-
const topRecommended = recommendedMethods.length > 0 ? recommendedMethods[0] : null;
|
|
418
|
-
return availableMethods.map((method) => {
|
|
419
|
-
const isTopRecommended = method === topRecommended;
|
|
420
|
-
const methodLabel = getInstallMethodLabel(method);
|
|
421
|
-
const title = isTopRecommended ? `${methodLabel} ${a.green(`[${i18n.t("installation:recommendedMethod")}]`)}` : methodLabel;
|
|
422
|
-
return {
|
|
423
|
-
title,
|
|
424
|
-
value: method
|
|
425
|
-
};
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
async function selectInstallMethod(codeType, excludeMethods = []) {
|
|
429
|
-
ensureI18nInitialized();
|
|
430
|
-
const codeTypeName = CODE_TOOL_INFO[codeType]?.name || codeType;
|
|
431
|
-
const recommendedMethods = getRecommendedInstallMethods(codeType);
|
|
432
|
-
const methodOptions = getInstallMethodOptions(codeType, recommendedMethods).filter((option) => !excludeMethods.includes(option.value));
|
|
433
|
-
if (methodOptions.length === 0) {
|
|
434
|
-
console.log(a.yellow(i18n.t("installation:noMoreMethods")));
|
|
435
|
-
return null;
|
|
436
|
-
}
|
|
437
|
-
const response = await inquirer.prompt({
|
|
438
|
-
type: "list",
|
|
439
|
-
name: "method",
|
|
440
|
-
message: i18n.t("installation:selectInstallMethod", { codeType: codeTypeName }),
|
|
441
|
-
choices: methodOptions.map((opt) => ({
|
|
442
|
-
name: opt.title,
|
|
443
|
-
value: opt.value
|
|
444
|
-
}))
|
|
445
|
-
});
|
|
446
|
-
return response.method || null;
|
|
447
|
-
}
|
|
448
|
-
async function executeInstallMethod(method, codeType) {
|
|
449
|
-
ensureI18nInitialized();
|
|
450
|
-
const codeTypeName = CODE_TOOL_INFO[codeType]?.name || codeType;
|
|
451
|
-
const spinner = ora(i18n.t("installation:installingWith", { method, codeType: codeTypeName })).start();
|
|
452
|
-
try {
|
|
453
|
-
switch (method) {
|
|
454
|
-
case "npm": {
|
|
455
|
-
const packageName = codeType === "claude-code" ? "@anthropic-ai/claude-code" : codeType === "clavue" ? "clavue" : "@openai/codex";
|
|
456
|
-
const { command, args, usedSudo } = wrapCommandWithSudo("npm", ["install", "-g", packageName, "--force"]);
|
|
457
|
-
if (usedSudo) {
|
|
458
|
-
spinner.info(i18n.t("installation:usingSudo"));
|
|
459
|
-
spinner.start();
|
|
460
|
-
}
|
|
461
|
-
await q(command, args);
|
|
462
|
-
await setInstallMethod("npm", codeType);
|
|
463
|
-
break;
|
|
464
|
-
}
|
|
465
|
-
case "homebrew": {
|
|
466
|
-
if (codeType === "claude-code") {
|
|
467
|
-
await q("brew", ["install", "--cask", "claude-code"]);
|
|
468
|
-
} else if (codeType === "clavue") {
|
|
469
|
-
spinner.stop();
|
|
470
|
-
return await executeInstallMethod("npm", codeType);
|
|
471
|
-
} else {
|
|
472
|
-
await q("brew", ["install", "--cask", "codex"]);
|
|
473
|
-
}
|
|
474
|
-
await setInstallMethod("homebrew", codeType);
|
|
475
|
-
break;
|
|
476
|
-
}
|
|
477
|
-
case "curl": {
|
|
478
|
-
if (codeType === "claude-code") {
|
|
479
|
-
await q("bash", ["-c", "curl -fsSL https://claude.ai/install.sh | bash"]);
|
|
480
|
-
} else {
|
|
481
|
-
spinner.stop();
|
|
482
|
-
return await executeInstallMethod("npm", codeType);
|
|
483
|
-
}
|
|
484
|
-
await setInstallMethod("curl", codeType);
|
|
485
|
-
break;
|
|
486
|
-
}
|
|
487
|
-
case "powershell": {
|
|
488
|
-
if (codeType === "claude-code") {
|
|
489
|
-
await q("powershell", ["-Command", "irm https://claude.ai/install.ps1 | iex"]);
|
|
490
|
-
} else {
|
|
491
|
-
spinner.stop();
|
|
492
|
-
return await executeInstallMethod("npm", codeType);
|
|
493
|
-
}
|
|
494
|
-
await setInstallMethod("powershell", codeType);
|
|
495
|
-
break;
|
|
496
|
-
}
|
|
497
|
-
case "cmd": {
|
|
498
|
-
if (codeType === "claude-code") {
|
|
499
|
-
await q("cmd", ["/c", "curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd"]);
|
|
500
|
-
} else {
|
|
501
|
-
spinner.stop();
|
|
502
|
-
return await executeInstallMethod("npm", codeType);
|
|
503
|
-
}
|
|
504
|
-
await setInstallMethod("cmd", codeType);
|
|
505
|
-
break;
|
|
506
|
-
}
|
|
507
|
-
default:
|
|
508
|
-
throw new Error(`Unsupported install method: ${method}`);
|
|
509
|
-
}
|
|
510
|
-
spinner.succeed(i18n.t("installation:installMethodSuccess", { method }));
|
|
511
|
-
const verification = await verifyInstallation(codeType);
|
|
512
|
-
displayVerificationResult(verification, codeType);
|
|
513
|
-
return true;
|
|
514
|
-
} catch (error) {
|
|
515
|
-
spinner.fail(i18n.t("installation:installMethodFailed", { method }));
|
|
516
|
-
if (error instanceof Error) {
|
|
517
|
-
console.error(a.gray(error.message));
|
|
518
|
-
}
|
|
519
|
-
return false;
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
async function handleInstallFailure(codeType, failedMethods) {
|
|
523
|
-
ensureI18nInitialized();
|
|
524
|
-
const response = await inquirer.prompt({
|
|
525
|
-
type: "confirm",
|
|
526
|
-
name: "retry",
|
|
527
|
-
message: i18n.t("installation:tryAnotherMethod"),
|
|
528
|
-
default: true
|
|
529
|
-
});
|
|
530
|
-
if (!response.retry) {
|
|
531
|
-
return false;
|
|
532
|
-
}
|
|
533
|
-
const newMethod = await selectInstallMethod(codeType, failedMethods);
|
|
534
|
-
if (!newMethod) {
|
|
535
|
-
return false;
|
|
536
|
-
}
|
|
537
|
-
const success = await executeInstallMethod(newMethod, codeType);
|
|
538
|
-
if (success) {
|
|
539
|
-
return true;
|
|
540
|
-
}
|
|
541
|
-
return await handleInstallFailure(codeType, [...failedMethods, newMethod]);
|
|
542
|
-
}
|
|
543
|
-
async function isCommandInPath(command) {
|
|
544
|
-
try {
|
|
545
|
-
const cmd = getPlatform() === "windows" ? "where" : "which";
|
|
546
|
-
const res = await q(cmd, [command]);
|
|
547
|
-
return res.exitCode === 0;
|
|
548
|
-
} catch {
|
|
549
|
-
return false;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
async function verifyInstallation(codeType) {
|
|
553
|
-
const command = getCodeToolRuntimeCommand(codeType);
|
|
554
|
-
const commandInPath = await isCommandInPath(command);
|
|
555
|
-
if (commandInPath) {
|
|
556
|
-
const version = await detectInstalledVersion(codeType);
|
|
557
|
-
return {
|
|
558
|
-
success: true,
|
|
559
|
-
commandPath: await findCommandPath(command),
|
|
560
|
-
version,
|
|
561
|
-
needsSymlink: false,
|
|
562
|
-
symlinkCreated: false
|
|
563
|
-
};
|
|
564
|
-
}
|
|
565
|
-
if (getPlatform() === "macos") {
|
|
566
|
-
const homebrewPaths = await getHomebrewCommandPaths(command);
|
|
567
|
-
let foundPath = null;
|
|
568
|
-
for (const path of homebrewPaths) {
|
|
569
|
-
if (exists(path)) {
|
|
570
|
-
foundPath = path;
|
|
571
|
-
break;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
if (foundPath) {
|
|
575
|
-
const symlinkResult = await createHomebrewSymlink(command, foundPath);
|
|
576
|
-
if (symlinkResult.success) {
|
|
577
|
-
const version = await detectInstalledVersion(codeType);
|
|
578
|
-
return {
|
|
579
|
-
success: true,
|
|
580
|
-
commandPath: symlinkResult.symlinkPath,
|
|
581
|
-
version,
|
|
582
|
-
needsSymlink: true,
|
|
583
|
-
symlinkCreated: true
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
return {
|
|
587
|
-
success: false,
|
|
588
|
-
commandPath: foundPath,
|
|
589
|
-
version: null,
|
|
590
|
-
needsSymlink: true,
|
|
591
|
-
symlinkCreated: false,
|
|
592
|
-
error: symlinkResult.error
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
if (isTermux()) {
|
|
597
|
-
const termuxPrefix = getTermuxPrefix();
|
|
598
|
-
const termuxPaths = [
|
|
599
|
-
`${termuxPrefix}/bin/${command}`,
|
|
600
|
-
`${termuxPrefix}/usr/bin/${command}`
|
|
601
|
-
];
|
|
602
|
-
for (const path of termuxPaths) {
|
|
603
|
-
if (exists(path)) {
|
|
604
|
-
const version = await detectInstalledVersion(codeType);
|
|
605
|
-
return {
|
|
606
|
-
success: true,
|
|
607
|
-
commandPath: path,
|
|
608
|
-
version,
|
|
609
|
-
needsSymlink: false,
|
|
610
|
-
symlinkCreated: false
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
if (getPlatform() === "linux") {
|
|
616
|
-
const home = homedir();
|
|
617
|
-
const linuxPaths = [
|
|
618
|
-
`${home}/.local/bin/${command}`,
|
|
619
|
-
// Standard XDG user bin (curl install default)
|
|
620
|
-
`${home}/.claude/bin/${command}`,
|
|
621
|
-
// Claude-specific bin directory
|
|
622
|
-
`/usr/local/bin/${command}`,
|
|
623
|
-
// System-wide installation
|
|
624
|
-
`/usr/bin/${command}`
|
|
625
|
-
// System package manager
|
|
626
|
-
];
|
|
627
|
-
for (const path of linuxPaths) {
|
|
628
|
-
if (exists(path)) {
|
|
629
|
-
const version = await detectInstalledVersion(codeType);
|
|
630
|
-
const needsPathUpdate = path.includes(".local/bin") && !process__default.env.PATH?.includes(".local/bin");
|
|
631
|
-
return {
|
|
632
|
-
success: true,
|
|
633
|
-
commandPath: path,
|
|
634
|
-
version,
|
|
635
|
-
needsSymlink: false,
|
|
636
|
-
symlinkCreated: false,
|
|
637
|
-
error: needsPathUpdate ? "PATH_UPDATE_NEEDED" : void 0
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
return {
|
|
643
|
-
success: false,
|
|
644
|
-
commandPath: null,
|
|
645
|
-
version: null,
|
|
646
|
-
needsSymlink: false,
|
|
647
|
-
symlinkCreated: false,
|
|
648
|
-
error: "Command not found in any known location"
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
async function createHomebrewSymlink(command, sourcePath) {
|
|
652
|
-
const homebrewBinPaths = [
|
|
653
|
-
"/opt/homebrew/bin",
|
|
654
|
-
// Apple Silicon (M1/M2)
|
|
655
|
-
"/usr/local/bin"
|
|
656
|
-
// Intel Mac
|
|
657
|
-
];
|
|
658
|
-
let targetDir = null;
|
|
659
|
-
for (const binPath of homebrewBinPaths) {
|
|
660
|
-
if (fs.existsSync(binPath)) {
|
|
661
|
-
targetDir = binPath;
|
|
662
|
-
break;
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
if (!targetDir) {
|
|
666
|
-
return {
|
|
667
|
-
success: false,
|
|
668
|
-
symlinkPath: null,
|
|
669
|
-
error: "No suitable Homebrew bin directory found"
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
const symlinkPath = join(targetDir, command);
|
|
673
|
-
try {
|
|
674
|
-
const stats = fs.lstatSync(symlinkPath);
|
|
675
|
-
if (stats.isSymbolicLink()) {
|
|
676
|
-
const existingTarget = fs.readlinkSync(symlinkPath);
|
|
677
|
-
if (existingTarget === sourcePath) {
|
|
678
|
-
return {
|
|
679
|
-
success: true,
|
|
680
|
-
symlinkPath
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
fs.unlinkSync(symlinkPath);
|
|
684
|
-
} else {
|
|
685
|
-
return {
|
|
686
|
-
success: false,
|
|
687
|
-
symlinkPath: null,
|
|
688
|
-
error: `File already exists at ${symlinkPath} and is not a symlink`
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
} catch (error) {
|
|
692
|
-
if (error.code !== "ENOENT") {
|
|
693
|
-
return {
|
|
694
|
-
success: false,
|
|
695
|
-
symlinkPath: null,
|
|
696
|
-
error: `Failed to check existing file: ${error}`
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
try {
|
|
701
|
-
fs.symlinkSync(sourcePath, symlinkPath);
|
|
702
|
-
return {
|
|
703
|
-
success: true,
|
|
704
|
-
symlinkPath
|
|
705
|
-
};
|
|
706
|
-
} catch (error) {
|
|
707
|
-
if (error.code === "EACCES") {
|
|
708
|
-
return {
|
|
709
|
-
success: false,
|
|
710
|
-
symlinkPath: null,
|
|
711
|
-
error: `Permission denied. Try running: sudo ln -sf ${sourcePath} ${symlinkPath}`
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
return {
|
|
715
|
-
success: false,
|
|
716
|
-
symlinkPath: null,
|
|
717
|
-
error: `Failed to create symlink: ${error.message}`
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
function displayVerificationResult(result, codeType) {
|
|
722
|
-
ensureI18nInitialized();
|
|
723
|
-
const codeTypeName = CODE_TOOL_INFO[codeType]?.name || codeType;
|
|
724
|
-
if (result.success) {
|
|
725
|
-
if (result.symlinkCreated) {
|
|
726
|
-
console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:verificationSuccess")}`));
|
|
727
|
-
console.log(a.gray(` ${i18n.t("installation:symlinkCreated", { path: result.commandPath })}`));
|
|
728
|
-
} else if (result.commandPath) {
|
|
729
|
-
console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:verificationSuccess")}`));
|
|
730
|
-
console.log(a.gray(` ${i18n.t("installation:foundAtPath", { path: result.commandPath })}`));
|
|
731
|
-
}
|
|
732
|
-
if (result.version) {
|
|
733
|
-
console.log(a.gray(` ${i18n.t("installation:detectedVersion", { version: result.version })}`));
|
|
734
|
-
}
|
|
735
|
-
if (result.error === "PATH_UPDATE_NEEDED") {
|
|
736
|
-
console.log(a.yellow(`
|
|
737
|
-
\u26A0 ${i18n.t("installation:pathUpdateNeeded")}`));
|
|
738
|
-
console.log(a.gray(` ${i18n.t("installation:pathUpdateHint")}`));
|
|
739
|
-
console.log(a.green(` export PATH="$HOME/.local/bin:$PATH"`));
|
|
740
|
-
console.log(a.gray(` ${i18n.t("installation:pathUpdatePermanent")}`));
|
|
741
|
-
console.log(a.green(` echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc`));
|
|
742
|
-
}
|
|
743
|
-
} else {
|
|
744
|
-
console.log(a.yellow(`\u26A0 ${codeTypeName} ${i18n.t("installation:verificationFailed")}`));
|
|
745
|
-
if (result.commandPath) {
|
|
746
|
-
console.log(a.gray(` ${i18n.t("installation:foundAtPath", { path: result.commandPath })}`));
|
|
747
|
-
}
|
|
748
|
-
if (result.error && result.error !== "PATH_UPDATE_NEEDED") {
|
|
749
|
-
console.log(a.gray(` ${result.error}`));
|
|
750
|
-
}
|
|
751
|
-
if (result.needsSymlink && !result.symlinkCreated) {
|
|
752
|
-
console.log(a.yellow(` ${i18n.t("installation:manualSymlinkHint")}`));
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
export { createHomebrewSymlink, detectInstalledVersion, displayVerificationResult, executeInstallMethod, getInstallationStatus, handleInstallFailure, installClaudeCode, installCodex, installMyclaude, isClaudeCodeInstalled, isCodexInstalled, isMyclaudeInstalled, selectInstallMethod, setInstallMethod, uninstallCodeTool, verifyInstallation };
|