create-openclaw-bot 5.6.12 β†’ 5.6.13

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # 🦞 OpenClaw Setup
4
4
 
5
5
  <p align="center">
6
- <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.6.12-0EA5E9?style=for-the-badge" alt="Version 5.6.9" /></a>
6
+ <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.6.13-0EA5E9?style=for-the-badge" alt="Version 5.6.13" /></a>
7
7
  <a href="https://github.com/tuanminhhole/openclaw-setup?tab=MIT-1-ov-file"><img src="https://img.shields.io/badge/LICENSE-MIT-success?style=for-the-badge" alt="MIT License" /></a>
8
8
  <a href="https://www.npmjs.com/package/create-openclaw-bot"><img src="https://img.shields.io/npm/v/create-openclaw-bot?style=for-the-badge&label=CLI&color=2563EB&logo=npm&logoColor=white" alt="NPM Version" /></a>
9
9
  <a href="https://github.com/tuanminhhole/openclaw-setup/stargazers"><img src="https://img.shields.io/github/stars/tuanminhhole/openclaw-setup?style=for-the-badge&color=eab308&logo=github&logoColor=white" alt="GitHub Stars" /></a>
@@ -24,7 +24,7 @@ An interactive **CLI tool** and **Setup Wizard** to deploy your own free AI Bot
24
24
 
25
25
  ---
26
26
 
27
- ## πŸ†• What's new in v5.6.12
27
+ ## πŸ†• What's new in v5.6.13
28
28
 
29
29
  - πŸ”§ **OpenAI Codex provider fix** β€” Updated Codex model registry to match OpenAI's current API. Removed 6 deprecated models, retained 4 active ones: `gpt-5.4`, `gpt-5.3-codex`, `gpt-5.2`, `gpt-5.4-mini`.
30
30
  - πŸ”€ **9Router API mode switch** β€” Switched from `openai-completions` to `openai-responses` to align with OpenAI's Responses API.
package/README.vi.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # 🦞 OpenClaw Setup
4
4
 
5
5
  <p align="center">
6
- <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.6.12-0EA5E9?style=for-the-badge" alt="Version 5.6.9" /></a>
6
+ <a href="https://github.com/tuanminhhole/openclaw-setup/releases"><img src="https://img.shields.io/badge/RELEASE-v5.6.13-0EA5E9?style=for-the-badge" alt="Version 5.6.13" /></a>
7
7
  <a href="https://github.com/tuanminhhole/openclaw-setup?tab=MIT-1-ov-file"><img src="https://img.shields.io/badge/LICENSE-MIT-success?style=for-the-badge" alt="MIT License" /></a>
8
8
  <a href="https://www.npmjs.com/package/create-openclaw-bot"><img src="https://img.shields.io/npm/v/create-openclaw-bot?style=for-the-badge&label=CLI&color=2563EB&logo=npm&logoColor=white" alt="NPM Version" /></a>
9
9
  <a href="https://github.com/tuanminhhole/openclaw-setup/stargazers"><img src="https://img.shields.io/github/stars/tuanminhhole/openclaw-setup?style=for-the-badge&color=eab308&logo=github&logoColor=white" alt="GitHub Stars" /></a>
@@ -24,7 +24,7 @@ CΓ΄ng cα»₯ **CLI tΖ°Ζ‘ng tΓ‘c** vΓ  **Setup Wizard** để tα»± triển khai Bot
24
24
 
25
25
  ---
26
26
 
27
- ## πŸ†• CΓ³ gΓ¬ mα»›i trong v5.6.12
27
+ ## πŸ†• CΓ³ gΓ¬ mα»›i trong v5.6.13
28
28
 
29
29
  - πŸ”§ **Sα»­a provider OpenAI Codex** β€” CαΊ­p nhαΊ­t registry model Codex phΓΉ hợp API hiện tαΊ‘i cα»§a OpenAI. LoαΊ‘i 6 model Δ‘Γ£ dα»«ng, giα»― 4 model Δ‘ang hoαΊ‘t Δ‘α»™ng: `gpt-5.4`, `gpt-5.3-codex`, `gpt-5.2`, `gpt-5.4-mini`.
30
30
  - πŸ”€ **Chuyển chαΊΏ Δ‘α»™ API 9Router** β€” Đổi tα»« `openai-completions` sang `openai-responses` cho khα»›p vα»›i Responses API mα»›i cα»§a OpenAI.
@@ -268,7 +268,7 @@ If setup reported a plugin install error, run this after the bot is running:
268
268
  };
269
269
  }
270
270
 
271
- function buildGatewayConfig(port = 18791, deployMode = 'native', allowedOrigins = []) {
271
+ function buildGatewayConfig(port = 18791, deployMode = 'native', allowedOrigins = [], osChoice = '') {
272
272
  const normalizedPort = Number(port) || 18791;
273
273
  const cfg = {
274
274
  port: normalizedPort,
@@ -276,7 +276,7 @@ If setup reported a plugin install error, run this after the bot is running:
276
276
  controlUi: { allowedOrigins },
277
277
  auth: { mode: 'token', token: crypto.randomUUID().replace(/-/g, '') },
278
278
  };
279
- if (deployMode === 'docker') {
279
+ if (deployMode === 'docker' || osChoice === 'vps') {
280
280
  cfg.bind = 'custom';
281
281
  cfg.customBindHost = '0.0.0.0';
282
282
  } else {
@@ -283,7 +283,11 @@ fi
283
283
  } else {
284
284
  L.push(isVi ? 'echo "[2] Khoi dong lai OpenClaw gateway qua PM2..."' : 'echo "[2] Restarting OpenClaw gateway via PM2..."');
285
285
  L.push('pm2 delete "$APP_NAME" >/dev/null 2>&1 || true');
286
- L.push('OPENCLAW_HOME="$PROJECT_DIR/.openclaw" OPENCLAW_STATE_DIR="$PROJECT_DIR/.openclaw" pm2 start --name "$APP_NAME" --cwd "$PROJECT_DIR" -- sh -c "export OPENCLAW_HOME=$PROJECT_DIR/.openclaw OPENCLAW_STATE_DIR=$PROJECT_DIR/.openclaw && openclaw gateway run"');
286
+ L.push('if [ -f "$PROJECT_DIR/.openclaw/start-gateway.sh" ]; then');
287
+ L.push(' pm2 start "$PROJECT_DIR/.openclaw/start-gateway.sh" --name "$APP_NAME" --interpreter bash');
288
+ L.push('else');
289
+ L.push(' OPENCLAW_HOME="$PROJECT_DIR/.openclaw" OPENCLAW_STATE_DIR="$PROJECT_DIR/.openclaw" pm2 start "$(command -v openclaw)" --name "$APP_NAME" --interpreter "$(command -v node)" -- gateway run');
290
+ L.push('fi');
287
291
  }
288
292
  L.push('pm2 save >/dev/null 2>&1 || true');
289
293
  L.push('echo ""');
package/dist/setup.js CHANGED
@@ -892,7 +892,7 @@
892
892
  };
893
893
  }
894
894
 
895
- function buildGatewayConfig(port = 18791, deployMode = 'native', allowedOrigins = []) {
895
+ function buildGatewayConfig(port = 18791, deployMode = 'native', allowedOrigins = [], osChoice = '') {
896
896
  const normalizedPort = Number(port) || 18791;
897
897
  const cfg = {
898
898
  port: normalizedPort,
@@ -900,7 +900,7 @@
900
900
  controlUi: { allowedOrigins },
901
901
  auth: { mode: 'token', token: crypto.randomUUID().replace(/-/g, '') },
902
902
  };
903
- if (deployMode === 'docker') {
903
+ if (deployMode === 'docker' || osChoice === 'vps') {
904
904
  cfg.bind = 'custom';
905
905
  cfg.customBindHost = '0.0.0.0';
906
906
  } else {
@@ -1586,7 +1586,11 @@
1586
1586
  } else {
1587
1587
  L.push(isVi ? 'echo "[2] Khoi dong lai OpenClaw gateway qua PM2..."' : 'echo "[2] Restarting OpenClaw gateway via PM2..."');
1588
1588
  L.push('pm2 delete "$APP_NAME" >/dev/null 2>&1 || true');
1589
- L.push('OPENCLAW_HOME="$PROJECT_DIR/.openclaw" OPENCLAW_STATE_DIR="$PROJECT_DIR/.openclaw" pm2 start --name "$APP_NAME" --cwd "$PROJECT_DIR" -- sh -c "export OPENCLAW_HOME=$PROJECT_DIR/.openclaw OPENCLAW_STATE_DIR=$PROJECT_DIR/.openclaw && openclaw gateway run"');
1589
+ L.push('if [ -f "$PROJECT_DIR/.openclaw/start-gateway.sh" ]; then');
1590
+ L.push(' pm2 start "$PROJECT_DIR/.openclaw/start-gateway.sh" --name "$APP_NAME" --interpreter bash');
1591
+ L.push('else');
1592
+ L.push(' OPENCLAW_HOME="$PROJECT_DIR/.openclaw" OPENCLAW_STATE_DIR="$PROJECT_DIR/.openclaw" pm2 start "$(command -v openclaw)" --name "$APP_NAME" --interpreter "$(command -v node)" -- gateway run');
1593
+ L.push('fi');
1590
1594
  }
1591
1595
  L.push('pm2 save >/dev/null 2>&1 || true');
1592
1596
  L.push('echo ""');
@@ -2568,7 +2572,8 @@
2568
2572
  gateway: {
2569
2573
  port: 18791,
2570
2574
  mode: 'local',
2571
- bind: 'loopback',
2575
+ bind: state.nativeOs === 'vps' ? 'custom' : 'loopback',
2576
+ ...(state.nativeOs === 'vps' ? { customBindHost: '0.0.0.0' } : {}),
2572
2577
  controlUi: {
2573
2578
  allowedOrigins: getGatewayAllowedOrigins(18791),
2574
2579
  },
@@ -2741,7 +2746,7 @@
2741
2746
  commands: { native: 'auto', nativeSkills: 'auto', restart: true, ownerDisplay: 'raw' },
2742
2747
  channels: {},
2743
2748
  tools: { profile: 'full', exec: { host: 'gateway', security: 'full', ask: 'off' } },
2744
- gateway: common.buildGatewayConfig(basePort, state.deployMode, getGatewayAllowedOrigins(basePort)),
2749
+ gateway: common.buildGatewayConfig(basePort, state.deployMode, getGatewayAllowedOrigins(basePort), state.nativeOs || ''),
2745
2750
  };
2746
2751
 
2747
2752
  if (hasBrowser) {
@@ -3618,6 +3623,7 @@
3618
3623
  let scriptContent;
3619
3624
 
3620
3625
  const scriptName = 'setup-openclaw-vps.sh';
3626
+ const appName = isMultiBot ? 'openclaw-multibot' : 'openclaw';
3621
3627
  const vps = [
3622
3628
  '#!/usr/bin/env bash', 'set -e',
3623
3629
  `echo "=== OpenClaw Setup β€” Ubuntu/VPS${isMultiBot ? ` Multi-Bot (${state.botCount} bots)` : ''} ==="`,
@@ -3643,37 +3649,79 @@
3643
3649
  if (pluginCmd) vps.push(pluginCmd);
3644
3650
  vps.push('if [ -f ".env" ]; then set -a; . ./.env; set +a; fi');
3645
3651
 
3652
+ // ── Write bot runtime files ──────────────────────────────────────────────
3646
3653
  if (isMultiBot) {
3647
3654
  vps.push('echo "--- Creating shared multi-agent runtime ---"');
3648
3655
  appendShWriteCommands(vps, sharedNativeFileMap());
3649
3656
  const _uninstallVpsMulti = generateUninstallScript();
3650
3657
  if (_uninstallVpsMulti) appendShWriteCommands(vps, { [_uninstallVpsMulti.name]: _uninstallVpsMulti.content });
3651
- vps.push('echo "--- Starting shared gateway via PM2 ---"');
3652
- if (is9Router) {
3653
- vps.push(`NINE_ROUTER_ENTRY="$(${native9RouterServerEntryLookup()})"`);
3654
- vps.push('PORT=20128 HOSTNAME=0.0.0.0 pm2 start "$NINE_ROUTER_ENTRY" --name openclaw-multibot-9router --interpreter "$(command -v node)"');
3655
- vps.push('pm2 start --name openclaw-multibot-9router-sync -- sh -c "node ./.9router/9router-smart-route-sync.js"');
3656
- }
3657
- vps.push('OPENCLAW_HOME="$OPENCLAW_HOME" OPENCLAW_STATE_DIR="$OPENCLAW_STATE_DIR" pm2 start --name openclaw-multibot -- sh -c "export OPENCLAW_HOME=$OPENCLAW_HOME OPENCLAW_STATE_DIR=$OPENCLAW_STATE_DIR && openclaw gateway run"');
3658
- vps.push('pm2 save && pm2 startup');
3659
- vps.push(`echo ""`);
3660
- vps.push(`echo "=== βœ… Shared multi-bot gateway running via PM2 ==="`);
3661
- vps.push(`echo "Commands:"`);
3662
- vps.push(`echo " pm2 status # Status gateway"`);
3663
- vps.push(`echo " pm2 logs openclaw-multibot"`);
3664
3658
  } else {
3665
3659
  appendShWriteCommands(vps, botFiles(0));
3666
3660
  const _uninstallVps = generateUninstallScript();
3667
3661
  if (_uninstallVps) appendShWriteCommands(vps, { [_uninstallVps.name]: _uninstallVps.content });
3668
- if (is9Router) {
3669
- vps.push(`NINE_ROUTER_ENTRY="$(${native9RouterServerEntryLookup()})"`);
3670
- vps.push('PORT=20128 HOSTNAME=0.0.0.0 pm2 start "$NINE_ROUTER_ENTRY" --name openclaw-9router --interpreter "$(command -v node)"');
3671
- vps.push('pm2 start --name openclaw-9router-sync -- sh -c "node ./.9router/9router-smart-route-sync.js"');
3672
- }
3673
- vps.push('OPENCLAW_HOME="$OPENCLAW_HOME" OPENCLAW_STATE_DIR="$OPENCLAW_STATE_DIR" pm2 start --name openclaw -- sh -c "export OPENCLAW_HOME=$OPENCLAW_HOME OPENCLAW_STATE_DIR=$OPENCLAW_STATE_DIR && openclaw gateway run"');
3674
- vps.push('pm2 save && pm2 startup');
3675
- vps.push('echo "Bot dang chay! Xem log: pm2 logs openclaw"');
3676
3662
  }
3663
+
3664
+ // ── Create start-bot.sh restart script ─────────────────────────────────
3665
+ const startScript = globalThis.__openclawInstall.buildStartBotSh({
3666
+ projectDir,
3667
+ is9Router,
3668
+ isVi,
3669
+ osChoice: 'vps',
3670
+ isMultiBot,
3671
+ appName,
3672
+ });
3673
+ appendShWriteCommands(vps, { 'start-bot.sh': startScript });
3674
+ vps.push('chmod +x start-bot.sh');
3675
+
3676
+ // ── Create PM2 entrypoint wrapper ──────────────────────────────────────
3677
+ // PM2 needs a proper script file with env setup to survive restarts.
3678
+ // Inline `-- sh -c` loses env vars on pm2 restart/reboot.
3679
+ vps.push('echo "--- Creating PM2 entrypoint wrapper ---"');
3680
+ vps.push(`cat > "$PROJECT_DIR/.openclaw/start-gateway.sh" << 'GWEOF'
3681
+ #!/bin/bash
3682
+ set -e
3683
+ cd "${projectDir.replace(/"/g, '\\"')}"
3684
+ export OPENCLAW_HOME="$PWD/.openclaw"
3685
+ export OPENCLAW_STATE_DIR="$PWD/.openclaw"
3686
+ export DATA_DIR="$PWD/.9router"
3687
+ export PATH="$HOME/.local/bin:$PATH"
3688
+ if [ -f ".env" ]; then set -a; . ./.env; set +a; fi
3689
+ exec openclaw gateway run
3690
+ GWEOF`);
3691
+ vps.push('chmod +x "$PROJECT_DIR/.openclaw/start-gateway.sh"');
3692
+
3693
+ // ── Start services via PM2 ─────────────────────────────────────────────
3694
+ vps.push('echo "--- Starting services via PM2 ---"');
3695
+ vps.push('NODE_BIN="$(command -v node)"');
3696
+
3697
+ if (is9Router) {
3698
+ vps.push(`NINE_ROUTER_ENTRY="$(${native9RouterServerEntryLookup()})"`);
3699
+ vps.push(`PORT=20128 HOSTNAME=0.0.0.0 DATA_DIR="$DATA_DIR" pm2 start "$NINE_ROUTER_ENTRY" --name ${appName}-9router --interpreter "$NODE_BIN"`);
3700
+ // 9Router sync: start the actual JS file directly with node interpreter
3701
+ vps.push(`pm2 start "$PROJECT_DIR/.9router/9router-smart-route-sync.js" --name ${appName}-9router-sync --interpreter "$NODE_BIN" --env DATA_DIR="$DATA_DIR"`);
3702
+ }
3703
+
3704
+ // Gateway: start the bash wrapper script (has all env setup baked in)
3705
+ vps.push(`pm2 start "$PROJECT_DIR/.openclaw/start-gateway.sh" --name ${appName} --interpreter bash`);
3706
+ vps.push('pm2 save && pm2 startup');
3707
+
3708
+ if (isMultiBot) {
3709
+ vps.push('echo ""');
3710
+ vps.push(`echo "=== βœ… Shared multi-bot gateway running via PM2 ==="`);
3711
+ vps.push('echo "Commands:"');
3712
+ vps.push(`echo " pm2 status # Status gateway"`);
3713
+ vps.push(`echo " pm2 logs ${appName}"`);
3714
+ } else {
3715
+ vps.push(`echo "Bot dang chay! Xem log: pm2 logs ${appName}"`);
3716
+ }
3717
+
3718
+ vps.push('echo ""');
3719
+ vps.push('echo "Dashboard: http://127.0.0.1:18791"');
3720
+ if (is9Router) vps.push('echo "9Router: http://127.0.0.1:20128/dashboard"');
3721
+ vps.push('echo ""');
3722
+ vps.push(`echo "Restart: bash start-bot.sh"`);
3723
+ vps.push(`echo "Logs: pm2 logs ${appName}"`);
3724
+
3677
3725
  scriptContent = vps.filter(Boolean).join('\n');
3678
3726
 
3679
3727
  return { scriptName, scriptContent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-openclaw-bot",
3
- "version": "5.6.12",
3
+ "version": "5.6.13",
4
4
  "description": "Interactive CLI installer for OpenClaw Bot",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {