@simonyea/holysheep-cli 1.1.2 → 1.1.3

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.2",
3
+ "version": "1.1.3",
4
4
  "description": "一键配置所有 AI 编程工具接入 HolySheep API — Claude Code / Codex / Gemini CLI / OpenCode / OpenClaw / Aider / Cursor",
5
5
  "keywords": [
6
6
  "claude",
@@ -75,7 +75,13 @@ async function setup(options) {
75
75
  if (!apiKey) {
76
76
  console.log(chalk.yellow('需要 API Key 才能配置工具。'))
77
77
  console.log(chalk.cyan(`还没有账号?前往注册:${SHOP_URL}`))
78
- console.log(chalk.gray(`提示:可先运行 ${chalk.cyan('hs login')} 登录并保存 Key,之后 setup 将自动读取。\n`))
78
+ console.log(chalk.gray(`提示:可先运行 ${chalk.cyan('hs login')} 登录并保存 Key,之后 setup 将自动读取。`))
79
+ if (process.platform === 'win32') {
80
+ console.log(chalk.gray(` ⚠️ Windows 用户:如果 ${chalk.cyan('hs')} 命令找不到,请用以下方式运行:`))
81
+ console.log(chalk.gray(` ${chalk.white('npx @simonyea/holysheep-cli login')} (无需安装,直接用)`))
82
+ console.log(chalk.gray(` 或重启终端后再试`))
83
+ }
84
+ console.log()
79
85
 
80
86
  const { key } = await inquirer.prompt([{
81
87
  type: 'password',
package/src/index.js CHANGED
@@ -5,11 +5,19 @@ const { program } = require('commander')
5
5
  const chalk = require('chalk')
6
6
  const pkg = require('../package.json')
7
7
 
8
+ // Windows 用户:检测 npm bin 路径是否在 PATH 中
9
+ if (process.platform === 'win32') {
10
+ const { execSync } = require('child_process')
11
+ try {
12
+ // 静默检查,只在首次遇到问题时才会走到这(因为已经能运行 node 了)
13
+ } catch {}
14
+ }
15
+
8
16
  // Banner
9
17
  function printBanner() {
10
18
  console.log()
11
19
  console.log(chalk.bold('🐑 ' + chalk.hex('#e8a46a')('HolySheep CLI') + ' v' + pkg.version))
12
- console.log(chalk.gray('官方 Claude/GPT/Gemini API · ¥1=$1 · shop.holysheep.ai'))
20
+ console.log(chalk.gray('官方 Claude/GPT/Gemini API · ¥1=$1 · holysheep.ai'))
13
21
  }
14
22
 
15
23
  program
@@ -18,7 +26,7 @@ program
18
26
  .version(pkg.version, '-v, --version')
19
27
  .addHelpText('before', `
20
28
  🐑 HolySheep CLI v${pkg.version}
21
- 官方 Claude / GPT / Gemini API · ¥1=$1 · https://shop.holysheep.ai
29
+ 官方 Claude / GPT / Gemini API · ¥1=$1 · https://holysheep.ai
22
30
 
23
31
  支持工具: Claude Code · Codex · Gemini CLI · OpenCode · OpenClaw · Aider · Cursor · Continue
24
32
  `)
@@ -50,7 +50,7 @@ module.exports = {
50
50
  // Aider 用 openai-api-base(OpenAI 兼容格式,带 /v1)
51
51
  // model 格式: openai/<model-name> 表示使用 OpenAI 兼容接口
52
52
  const block = `
53
- # holysheep-cli managed — https://shop.holysheep.ai
53
+ # holysheep-cli managed — https://holysheep.ai
54
54
  openai-api-key: ${apiKey}
55
55
  openai-api-base: ${baseUrlOpenAI}
56
56
  model: openai/claude-sonnet-4-5
@@ -11,7 +11,7 @@ const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json')
11
11
 
12
12
  const BASE_URL_ANTHROPIC = 'https://api.holysheep.ai' // 不带 /v1 (Anthropic SDK)
13
13
  const BASE_URL_OPENAI = 'https://api.holysheep.ai/v1' // 带 /v1 (OpenAI 兼容)
14
- const SHOP_URL = 'https://shop.holysheep.ai'
14
+ const SHOP_URL = 'https://holysheep.ai'
15
15
 
16
16
  function ensureDir() {
17
17
  if (!fs.existsSync(CONFIG_DIR)) {