node官方1. 安装 node 虚拟环境
openclaw 官方1. 使用 npm 安装 openclaw
| 选项 | 作用 | 解释 |
| boot-md | 启动时运行 BOOT.md 当 Gateway 启动且内部钩子启用时,此钩子会执行工作区根目录下的 BOOT.md 文件里的指令。 | 适合放一些启动时需要自动执行的任务。比如,在 BOOT.md 里写上发送一条“我上线了”的消息,或者初始化某个服务的指令。 |
| bootstrap-extra-files | 注入额外的启动文件 在 Agent 启动流程 (agent:bootstrap 事件) 中,这个钩子可以将你额外指定的文件注入到 Agent 的工作区上下文中。 | 适合让每次对话都自动加载一些特定文件。比如一些固定的参考文档、代码片段等,不用每次手动/load。 |
| command-logger | 记录所有指令日志 它会监听所有的命令事件,并将记录保存到 ~/.openclaw/logs/commands.log 文件中。 | 相当于一个操作记录员。开启后,在 OpenClaw 里执行过的所有命令都会被记录下来,方便日后排查问题或审计。 |
| session-memory | 保存会话记忆 当你执行 /new 命令开始一个新会话时,它会自动将当前会话的上下文保存到你的 Agent 工作区中。 | 可以让OpenClaw拥有跨会话的长期记忆。即使你开启了新对话,它也能回忆起之前聊过的重要信息,让交互更有连续性。 |
| 路径 | 类型 | 作用 |
| openclaw.json | 主配置 | OpenClaw 主配置文件,包含 gateway 端口、token、provider API、models、agents 配置 |
| update-check.json | 更新记录 | 记录 OpenClaw 是否检查过新版本 |
| memory/main.sqlite | 数据库 | Agent 长期记忆数据库(对话、上下文、状态) |
| logs/gateway.log | 日志 | Gateway 正常运行日志 |
| logs/gateway.err.log | 日志 | Gateway 错误日志 |
| logs/config-audit.jsonl | 日志 | 记录配置文件修改历史 |
| workspace/ | 工作区 | Agent 执行任务、生成代码、存放文件的目录 |
| workspace/AGENTS.md | Prompt | 定义 Agent 类型和行为 |
| workspace/BOOTSTRAP.md | Prompt | Agent 启动时的 system prompt |
| workspace/HEARTBEAT.md | Prompt | Agent 心跳 / 状态更新规则 |
| workspace/IDENTITY.md | Prompt | Agent 身份定义 |
| workspace/SOUL.md | Prompt | Agent 行为哲学 / 规则 |
| workspace/TOOLS.md | Prompt | Agent 可用工具说明 |
| workspace/USER.md | Prompt | 用户信息与偏好 |
| identity/ | 认证 | 身份认证 |
| identity/device-auth.json | 认证 | 设备 / 客户端认证信息 |
| identity/device.json | 设备信息 | 记录当前设备标识 |
| cron/ | 调度系统 | OpenClaw 内置 cron scheduler 的配置目录 |
| cron/jobs.json | 定时任务配置 | 存储 OpenClaw 的 定时任务(cron jobs) |
| devices/ | 设备管理 | OpenClaw 的 设备配对系统 |
| devices/paired.json | 设备列表 | 已经授权的设备(Dashboard / CLI / Remote) |
| devices/pending.json | 配对队列 | 等待授权的设备 |
| 配置 | 作用 |
| gateway.port | Dashboard 端口 |
| gateway.auth.token | 登录 token |
| models.providers | AI 模型提供商 |
| agents.defaults.workspace | Agent 工作目录 |
| tools.profile | 模型权限,full 系统所有权限 |
ClawHub 是 OpenClaw 生态里的 插件 / 模块仓库管理工具。1. 安装 clawhub
| 命令 | 作用 | 示例 |
| clawhub search | 搜索模块 | clawhub search discord |
| clawhub install | 安装模块 | clawhub install discord |
| clawhub remove | 删除模块 | clawhub remove discord |
| clawhub list | 查看已安装模块 | clawhub list |
| clawhub info | 查看模块信息 | clawhub info discord |
| clawhub update | 更新模块 | clawhub update discord |
| clawhub upgrade | 更新所有模块 | clawhub upgrade |
| clawhub enable | 启用模块 | clawhub enable discord |
| clawhub disable | 禁用模块 | clawhub disable discord |
| clawhub doctor | 检查模块问题 | clawhub doctor |
| clawhub repo add | 添加仓库 | clawhub repo add <url> |
| clawhub repo list | 查看仓库 | clawhub repo list |
| clawhub repo remove | 删除仓库 | clawhub repo remove <url> |
| 命令 | 作用 | 示例 |
| openclaw | 显示帮助 | openclaw |
| openclaw version | 查看版本 | openclaw version |
| openclaw help | 查看帮助 | openclaw help |
| openclaw status | 查看运行状态 | openclaw status |
| 命令 | 作用 | 示例 |
| openclaw onboard --install-daemon | 完整安装向导和安装系统服务 | openclaw onboard --install-daemon |
| openclaw onboard | 安装向导 | openclaw onboard |
| openclaw start | 启动 gateway + agent | openclaw start |
| openclaw stop | 停止 OpenClaw | openclaw stop |
| openclaw restart | 重启服务 | openclaw restart |
| 命令 | 作用 | 示例 |
| openclaw logs | 查看日志 | openclaw logs |
| openclaw logs --follow | 实时日志 | openclaw logs --follow |
| openclaw logs --errors | 只看错误日志 | openclaw logs --errors |
| 命令 | 作用 | 示例 |
| openclaw models list | 查看可用模型 | openclaw models list |
| openclaw models auth login | 登录模型 provider | openclaw models auth login |
| openclaw models auth logout | 退出登录 | openclaw models auth logout |
| openclaw models test | 测试模型连接 | openclaw models test |
| 命令 | 作用 | 示例 |
| openclaw plugins list | 查看插件 | openclaw plugins list |
| openclaw plugins install | 安装插件 | openclaw plugins install discord |
| openclaw plugins remove | 删除插件 | openclaw plugins remove discord |
| openclaw plugins update | 更新插件 | openclaw plugins update |
| 命令 | 作用 | 示例 |
| openclaw agents list | 查看 agent | openclaw agents list |
| openclaw agents add | 添加 agent | openclaw agents add coder |
| openclaw agents remove | 删除 agent | openclaw agents remove coder |
| openclaw agents restart | 重启 agent | openclaw agents restart |
| 命令 | 作用 | 示例 |
| openclaw devices list | 查看已配对设备 | openclaw devices list |
| openclaw devices approve | 批准设备 | openclaw devices approve |
| openclaw devices remove | 移除设备 | openclaw devices remove |
| 命令 | 作用 | 示例 |
| openclaw config show | 查看配置 | openclaw config show |
| openclaw config edit | 编辑配置 | openclaw config edit |
| openclaw config reset | 重置配置 | openclaw config reset |
| 命令 | 作用 | 示例 |
| openclaw doctor | 检查系统问题 | openclaw doctor |
| openclaw debug | 调试模式 | openclaw debug |
| openclaw env | 查看环境信息 | openclaw env |
| 命令 | 作用 | 示例 |
| openclaw run | 运行 agent 任务 | openclaw run |
| openclaw exec | 执行命令 | openclaw exec |
| openclaw shell | 打开 agent shell | openclaw shell |
| 命令 | 作用 | 示例 |
| openclaw update | 更新 OpenClaw | openclaw update |
| openclaw upgrade | 升级组件 | openclaw upgrade |
| 欢迎光临 AI创想 (https://llms-ai.com/) | Powered by Discuz! X3.4 |