@simonyea/holysheep-cli 1.1.9 → 1.2.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/package.json +1 -1
- package/src/commands/setup.js +8 -6
- package/src/tools/openclaw.js +6 -2
package/package.json
CHANGED
package/src/commands/setup.js
CHANGED
|
@@ -238,23 +238,25 @@ async function setup(options) {
|
|
|
238
238
|
console.log(` ✓ ${r.tool.name}${hot}`)
|
|
239
239
|
if (r.tool.hint) console.log(` ${chalk.gray('💡 ' + r.tool.hint)}`)
|
|
240
240
|
// 显示启动命令
|
|
241
|
-
if (r.tool.
|
|
241
|
+
if (r.tool.launchSteps) {
|
|
242
|
+
// 多步骤启动(如 openclaw)
|
|
243
|
+
console.log(` ${chalk.gray('▶ 启动步骤:')}`)
|
|
244
|
+
r.tool.launchSteps.forEach((s, i) => {
|
|
245
|
+
console.log(` ${chalk.gray(` ${i + 1}.`)} ${chalk.cyan.bold(s.cmd)} ${chalk.gray(s.note)}`)
|
|
246
|
+
})
|
|
247
|
+
} else if (r.tool.launchCmd) {
|
|
242
248
|
if (r.tool._winJustInstalled) {
|
|
243
|
-
// Windows 刚安装:PATH 未刷新,统一用 npx 运行
|
|
244
249
|
const cmdBin = r.tool.launchCmd.split(' ')[0]
|
|
245
250
|
const cmdArgs = r.tool.launchCmd.split(' ').slice(1).join(' ')
|
|
246
251
|
const npxCmd = 'npx ' + cmdBin + (cmdArgs ? ' ' + cmdArgs : '')
|
|
247
252
|
console.log(` ${chalk.gray('▶ 启动命令:')} ${chalk.cyan.bold(npxCmd)}`)
|
|
248
|
-
if (r.tool.launchNote) console.log(` ${chalk.gray(' ' + r.tool.launchNote)}`)
|
|
249
253
|
} else {
|
|
250
254
|
console.log(` ${chalk.gray('▶ 启动命令:')} ${chalk.cyan.bold(r.tool.launchCmd)}`)
|
|
251
255
|
}
|
|
256
|
+
if (r.tool.launchNote) console.log(` ${chalk.gray(' ' + r.tool.launchNote)}`)
|
|
252
257
|
} else if (r.tool.launchNote) {
|
|
253
258
|
console.log(` ${chalk.gray('▶ ' + r.tool.launchNote)}`)
|
|
254
259
|
}
|
|
255
|
-
if (r.tool.launchNote && r.tool.launchCmd && !r.tool._winJustInstalled) {
|
|
256
|
-
console.log(` ${chalk.gray(' ' + r.tool.launchNote)}`)
|
|
257
|
-
}
|
|
258
260
|
})
|
|
259
261
|
console.log()
|
|
260
262
|
}
|
package/src/tools/openclaw.js
CHANGED
|
@@ -98,8 +98,12 @@ module.exports = {
|
|
|
98
98
|
},
|
|
99
99
|
getConfigPath() { return CONFIG_FILE },
|
|
100
100
|
hint: '切换后重启 OpenClaw 生效;支持 /model 命令切换模型',
|
|
101
|
-
launchCmd:
|
|
102
|
-
|
|
101
|
+
launchCmd: null,
|
|
102
|
+
launchSteps: [
|
|
103
|
+
{ cmd: 'npx openclaw onboard', note: '首次初始化(设置模型、鉴权等)' },
|
|
104
|
+
{ cmd: 'npx openclaw gateway start', note: '启动后台 Gateway 服务' },
|
|
105
|
+
{ cmd: 'npx openclaw dashboard', note: '打开 WebUI → http://127.0.0.1:18789/' },
|
|
106
|
+
],
|
|
103
107
|
installCmd: 'npm install -g openclaw@latest',
|
|
104
108
|
docsUrl: 'https://docs.openclaw.ai',
|
|
105
109
|
}
|