@simonyea/holysheep-cli 1.1.7 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "一键配置所有 AI 编程工具接入 HolySheep API — Claude Code / Codex / Gemini CLI / OpenCode / OpenClaw / Aider / Cursor",
5
5
  "keywords": [
6
6
  "claude",
@@ -51,6 +51,9 @@ async function tryAutoInstall(tool) {
51
51
  if (process.platform !== 'win32' && !tool.checkInstalled()) {
52
52
  console.log(chalk.yellow(` ⚠ 安装后未检测到命令,尝试直接配置...`))
53
53
  }
54
+ if (process.platform === 'win32') {
55
+ tool._winJustInstalled = true // 标记为 Windows 刚装的,摘要里特殊处理
56
+ }
54
57
  return true // 安装成功就视为可配置
55
58
  } catch (e) {
56
59
  spinner.fail(`安装失败: ${e.message}`)
@@ -236,11 +239,20 @@ async function setup(options) {
236
239
  if (r.tool.hint) console.log(` ${chalk.gray('💡 ' + r.tool.hint)}`)
237
240
  // 显示启动命令
238
241
  if (r.tool.launchCmd) {
239
- console.log(` ${chalk.gray('▶ 启动命令:')} ${chalk.cyan.bold(r.tool.launchCmd)}`)
242
+ if (r.tool._winJustInstalled) {
243
+ // Windows 刚安装:PATH 未刷新,提示用 npx 或重开终端
244
+ console.log(` ${chalk.yellow('▶ Windows:新开一个终端后运行:')} ${chalk.cyan.bold(r.tool.launchCmd)}`)
245
+ const cmdBin = r.tool.launchCmd.split(' ')[0]
246
+ const cmdArgs = r.tool.launchCmd.split(' ').slice(1).join(' ')
247
+ console.log(` ${chalk.gray(' 或现在用 npx 直接运行:')} ${chalk.cyan.bold('npx ' + cmdBin + (cmdArgs ? ' ' + cmdArgs : ''))}`)
248
+ if (r.tool.launchNote) console.log(` ${chalk.gray(' ' + r.tool.launchNote)}`)
249
+ } else {
250
+ console.log(` ${chalk.gray('▶ 启动命令:')} ${chalk.cyan.bold(r.tool.launchCmd)}`)
251
+ }
240
252
  } else if (r.tool.launchNote) {
241
253
  console.log(` ${chalk.gray('▶ ' + r.tool.launchNote)}`)
242
254
  }
243
- if (r.tool.launchNote && r.tool.launchCmd) {
255
+ if (r.tool.launchNote && r.tool.launchCmd && !r.tool._winJustInstalled) {
244
256
  console.log(` ${chalk.gray(' ' + r.tool.launchNote)}`)
245
257
  }
246
258
  })