nbclaw
v0.3.5
Published
A macOS CLI for managing OpenClaw under a dedicated local service user.
Maintainers
Readme
NeighborClaw
中文说明
NeighborClaw 是一个面向 macOS 的命令行工具,用来把 OpenClaw 放到一个独立的本地服务用户下运行,同时让你继续在当前管理员用户下完成安装、恢复、查看状态和执行命令。
这个工具适合什么场景
- 你想让 OpenClaw 运行在独立的本地用户下
- 你想从当前管理员用户统一管理 OpenClaw 环境
- 你希望安装、修复、卸载和排障都有明确命令
前置条件
开始前请确认:
- 你正在使用 macOS
- 你已经准备好一个现有的本地 macOS 用户,用于托管 OpenClaw
- 当前桌面用户具备管理员权限
安装
npm install -g nbclaw快速开始
运行安装命令:
nbclaw install按提示输入一个已经存在的本地服务用户名。
如果安装流程提示需要完成服务用户侧的 OpenClaw 初始化,请登录该服务用户的 GUI 会话后执行:
openclaw onboard --install-daemon用下面的命令检查状态:
nbclaw status
常用命令
nbclaw help
查看可用命令和每个命令的用途。
nbclaw version
查看当前安装的 NeighborClaw 版本。
nbclaw status
查看当前状态,以及下一步应该做什么。
nbclaw en
将 NeighborClaw 输出切换为英文。
nbclaw cn
将 NeighborClaw 输出切换为简体中文。
nbclaw clear
只清理当前用户里的 OpenClaw 残留,不会卸载服务用户侧的 OpenClaw 环境。
nbclaw install
首次接入 NeighborClaw 时使用。它会引导你选择服务用户并建立受管环境。
nbclaw repair
当安装中断、环境不完整,或者状态异常时使用,用来把环境恢复到可继续使用的状态。
nbclaw uninstall
移除 NeighborClaw 管理的 OpenClaw 环境。
nbclaw exec -- <cmd> [args...]
在真实的服务用户环境中执行命令。需要指定工作目录时,可以使用:
nbclaw exec --cwd <path> -- <cmd> [args...]nbclaw self update
通过 npm 更新 nbclaw。
nbclaw self uninstall
通过 npm 卸载 nbclaw。
常见问题
安装后为什么找不到 nbclaw 命令?
如果你使用的是:
npm install nbclaw这只是本地安装,不会把 nbclaw 放到全局 PATH。
请改用:
npm install -g nbclaw或者直接运行:
npx nbclaw status当前管理员用户已经装过真实 openclaw,怎么办?
先备份你当前用户里的 OpenClaw 配置,再运行:
nbclaw clear清理完成后,再重新执行:
nbclaw install安装中断了,或者环境已经半完成,怎么办?
优先尝试:
nbclaw repair什么时候该用 clear,什么时候该用 uninstall?
nbclaw clear:只清理当前用户的 OpenClaw 残留nbclaw uninstall:移除 NeighborClaw 管理的整套 OpenClaw 环境
第三方安装器或脚本必须在真实服务用户环境里运行,怎么办?
直接使用:
nbclaw exec -- <cmd> [args...]例如:
nbclaw exec -- npx -y @tencent-weixin/openclaw-weixin-cli@latest install为什么 openclaw onboard --install-daemon 还要求服务用户先登录 GUI?
如果服务用户当前没有活动中的 GUI 会话,某些依赖该会话的 OpenClaw 操作就不能继续。
先登录服务用户的 GUI,会话准备好后再重试原命令。
English
NeighborClaw is a macOS CLI that runs OpenClaw under a dedicated local service user while still letting you install, recover, inspect, and operate the setup from your current admin account.
When to use it
- You want OpenClaw to run under a separate local user
- You want to manage the setup from your current admin account
- You want clear commands for install, repair, uninstall, and troubleshooting
Requirements
Before you start, make sure:
- You are on macOS
- You already have an existing local macOS user for hosting OpenClaw
- Your current desktop account has admin privileges
Install
npm install -g nbclawQuick start
Run the install command:
nbclaw installEnter the name of an existing local service user when prompted.
If the flow tells you to finish OpenClaw setup in the service account, sign into that user's GUI session and run:
openclaw onboard --install-daemonCheck the current status:
nbclaw status
Common commands
nbclaw help
Show available commands and what each command does.
nbclaw version
Show the installed NeighborClaw version.
nbclaw status
Show the current status and the recommended next step.
nbclaw en
Switch NeighborClaw output to English.
nbclaw cn
Switch NeighborClaw output to Simplified Chinese.
nbclaw clear
Remove OpenClaw residue from the current user only. This does not uninstall the service-user OpenClaw setup.
nbclaw install
Use this for first-time setup. It guides you through choosing a service user and creating the managed environment.
nbclaw repair
Use this when setup was interrupted, the environment is incomplete, or the current state needs recovery.
nbclaw uninstall
Remove the OpenClaw environment managed by NeighborClaw.
nbclaw exec -- <cmd> [args...]
Run a command inside the real service-user environment. If you need a working directory, use:
nbclaw exec --cwd <path> -- <cmd> [args...]nbclaw self update
Update nbclaw with npm.
nbclaw self uninstall
Uninstall nbclaw with npm.
FAQ
Why can't I find the nbclaw command after install?
If you used:
npm install nbclawthat was a local install, not a global one.
Use:
npm install -g nbclawor run it directly with:
npx nbclaw statusWhat if my current admin account already has a real openclaw installed?
Back up your current-user OpenClaw configuration first, then run:
nbclaw clearAfter that, run:
nbclaw installWhat if setup was interrupted or only partially completed?
Try this first:
nbclaw repairWhen should I use clear instead of uninstall?
nbclaw clear: only cleans current-user OpenClaw residuenbclaw uninstall: removes the full OpenClaw environment managed by NeighborClaw
What if a third-party installer or script must run in the real service-user environment?
Use:
nbclaw exec -- <cmd> [args...]Example:
nbclaw exec -- npx -y @tencent-weixin/openclaw-weixin-cli@latest installWhy does openclaw onboard --install-daemon still require the service user to log into the GUI?
If the service user does not currently have an active GUI session, some OpenClaw actions that depend on that session cannot continue.
Sign into the service user's GUI session first, then retry the same command.
