New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

openclawsetup

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openclawsetup

OpenClaw 安装向导 - 智能安装、诊断、自动修复

latest
Source
npmnpm
Version
2.8.15
Version published
Maintainers
1
Created
Source

openclawsetup

OpenClaw 智能安装向导 - 调用官方 openclaw onboard 交互界面,自动选择推荐配置。

特点

  • 真实体验:调用官方 openclaw onboard 命令,用户看到完整的原版安装界面
  • 智能自动化:自动选择推荐配置,无需手动操作
  • 可观看过程:用户可以看到每一步的选择过程,了解发生了什么
  • 随时接管:按任意键立刻切换为手动操作
  • 手动模式--manual 参数可切换到完全手动模式
  • 三系统支持:macOS、Linux、Windows

快速开始

方式一:一键脚本(推荐,自动安装 Node.js)

macOS / Linux:

curl -fsSL https://unpkg.com/openclawsetup@latest/install.sh | bash

Windows PowerShell:

irm https://unpkg.com/openclawsetup@latest/install.ps1 | iex

方式二:npx(需要已安装 Node.js 18+)

npx openclawsetup@latest

安装模式

智能模式(默认,自动应答)

npx openclawsetup@latest

自动完成以下选择(按任意键可接管):

  • ✓ 选择 QuickStart 模式
  • ✓ 跳过模型配置(后续用 npx openclawapi 配置)
  • ✓ 跳过渠道配置(后续用 npx openclawdcnpx openclaw-chat-cn@latest feishu 配置)
  • ✓ 安装后台服务(开机自启)
  • ✓ 选择 Web Dashboard

手动模式

npx openclawsetup@latest --manual

完全交互,自己选择所有配置项。

强制自动模式

npx openclawsetup@latest --auto

自动应答不可用时将直接退出(适合脚本化场景)。

命令行参数

参数说明
--manual手动模式,不自动选择
--auto强制自动模式(不可用则退出)
--with-model检测到模型配置时暂停自动选择
--with-channel检测到渠道配置时暂停自动选择
--optimize-token一键优化输入 token(记忆/召回瘦身)
--strong--check/--fix 组合,启用强力检查策略
--strong-fix直接执行强力检查修复(多轮深度修复)
--collect-evidence / --evidence一键导出脱敏排障证据包(给技术支持)
--evidence-quick快速证据包(跳过深度检查)
--update检查并更新已安装的 OpenClaw
--reinstall卸载后重新安装(清除配置)
--uninstall卸载 OpenClaw
--help, -h显示帮助信息

强力修复模式(极致检查/修复)

# 一步进入强力修复(推荐)
npx openclawsetup@latest --strong-fix

# 或在常规命令上叠加强力策略
npx openclawsetup@latest --fix --strong
npx openclawsetup@latest --check --strong

强力模式会额外执行:

  • 多轮检查修复(最多 3 轮)
  • CLI 命令损坏自动恢复(含重装、重试、多源 registry)
  • 配置文件损坏自动备份并重建
  • 端口冲突自动寻找可用端口并切换
  • Gateway 启停链路强恢复(start/restart/stop+start)
  • 官方 doctor --fix + onboard 深度回收
  • 模型连通性探测(检测到异常会给出明确修复入口)

管理菜单也提供 3. 强力检查修复

Token 优化(降低每次输入 token)

# 命令行直接执行
npx openclawsetup@latest --optimize-token

也可在菜单里显式选择:

  • 4. Token 优化(降低输入 token)

默认会自动优化:

  • memory.collections.conversations.retention_days = 14
  • memory.collections.conversations.max_entries = 2000
  • memory.collections.conversations.summarize_threshold = 25
  • memory.retrieval.default_limit = 4
  • memory.retrieval.similarity_threshold = 0.82

脚本会先备份原配置,再写入新配置并尝试重启 Gateway。

给小白用户的一键取证(推荐客服话术)

可直接复制发送给用户:

请复制执行:npx openclawsetup@latest --collect-evidence,完成后把桌面上 openclaw-evidence-... 文件夹或 .tar.gz 发给我即可。

让用户只执行一条命令:

npx openclawsetup@latest --collect-evidence

脚本会自动:

  • 收集环境、状态、端口、health、doctor、gateway logs
  • 自动脱敏 token / apiKey / bearer / URL token 参数
  • 生成证据目录(默认在桌面)
  • 自动打包为 .tar.gz(macOS/Linux)

你只需要让用户把生成的目录或压缩包发回来即可。

若用户机器性能较弱,可用快速模式:

npx openclawsetup@latest --evidence-quick

使用示例

默认安装(智能模式)

# macOS/Linux - 一键脚本
curl -fsSL https://unpkg.com/openclawsetup@latest/install.sh | bash

# 或者 npx
npx openclawsetup@latest

手动模式(完全交互)

npx openclawsetup@latest --manual

更新或重装

# 检查并更新
npx openclawsetup@latest --update

# 卸载后重新安装(会清除配置)
npx openclawsetup@latest --reinstall

# 直接卸载
npx openclawsetup@latest --uninstall

安装后

安装完成后,需要配置 AI 模型才能使用:

# 配置 Claude 模型(推荐)
npx openclawapi@latest preset-claude

# 或交互式配置
npx openclawapi@latest

Dashboard 访问

安装完成后会自动显示:

  • 本机访问地址(含 token)
  • 云服务器场景下的 SSH 隧道命令与说明

配置聊天渠道

# Discord
npx openclawdc

# 飞书
npx openclaw-chat-cn@latest feishu

常用命令

# 查看状态
openclaw status

# 查看日志
openclaw gateway logs

# 重启服务
openclaw gateway restart

# 诊断问题
openclaw doctor

工作原理

  • 安装 openclaw npm 包
  • 优先检测官方 openclaw onboard 的非交互参数(可用时直接自动完成)
  • 如不支持,则使用 node-pty 创建伪终端进行自动应答(按任意键接管)
  • 若自动应答不可用,退回手动模式

自动应答规则(兜底)

提示类型自动选择
安全确认同意 (y)
Setup 模式QuickStart
Model Provider跳过 (s)
API Key跳过
Channel 配置跳过 (s)
Skills跳过 (s)
Daemon/Service安装 (y)
UI 选择Web Dashboard

使用 --with-model / --with-channel 时,自动模式会在对应步骤暂停并交给用户操作。

卸载

# 1. 停止服务
openclaw gateway stop

# 2. 卸载 CLI
npm uninstall -g openclaw

# 3. 删除配置
rm -rf ~/.openclaw

# 4. 删除服务配置
# macOS
rm ~/Library/LaunchAgents/com.openclaw.gateway.plist

# Linux
rm ~/.config/systemd/user/openclaw.service
systemctl --user daemon-reload

系统要求

  • macOS / Linux / Windows
  • Node.js 18+(一键脚本会自动安装)

License

MIT

Keywords

openclaw

FAQs

Package last updated on 07 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts