diff --git a/README.md b/README.md index f0acd5d..b84f01a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenClaw Manager (OCM) -A zero-dependency, single-file web dashboard for [OpenClaw](https://github.com/anthropics/openclaw). Manage agents, monitor token usage, and run commands — all from your browser, no `npm install` required. +A zero-dependency local control panel for [OpenClaw](https://github.com/anthropics/openclaw). Manage agents, bindings, logs, commands, and rollback from your browser — no `npm install` required. [中文说明](#中文说明) · [中文使用说明(含截图)](docs/USAGE_GUIDE.zh-CN.md) · [English Guide (with screenshots)](docs/USAGE_GUIDE.en.md) @@ -31,6 +31,16 @@ Open [http://localhost:3333](http://localhost:3333) in your browser. For remote - Changelog: docs/CHANGELOG.md +## Why OCM + +OCM is best thought of as an **OpenClaw control panel**, not just a config editor. + +It helps with three things that become painful fast in raw JSON / terminal workflows: + +- **Agent topology** — see which agent is bound to which chat/channel/thread +- **Everyday operations** — run CLI commands, inspect health/logs, restart gateway +- **Safer changes** — update config with backups and rollback nearby + ## Features
@@ -67,7 +77,11 @@ Open [http://localhost:3333](http://localhost:3333) in your browser. For remote - **Built-in CLI terminal**: run OpenClaw commands from any page with streaming output, presets, favorites, and Tab completion. - **Ops actions**: restart gateway, view logs, health check, backups (local + NAS), and cron management. - **Telegram-first workflow**: safer sub-agent setup flow + allowlist helper + warnings for group privacy. -## Telegram Workflow & Safety +## Recommended Workflows + +OCM is **Telegram-first, not Telegram-only**. Telegram is the smoothest path today, but OCM is also useful for local ops, Discord routing, model/auth management, and backups. + +### Telegram Workflow & Safety OCM is designed primarily for **Telegram-based OpenClaw workflows**: @@ -113,6 +127,18 @@ You can also create `manager-config.json` manually: `manager-config.json` is gitignored and won't be committed. +## First-Run Experience + +The first thing new users need is confidence that OCM is pointed at the right OpenClaw directory and that the gateway is healthy. The Dashboard, built-in CLI, and health/ops actions are intended to make that first-run check fast and visible. + +Recommended first demo flow: + +1. Start OCM +2. Open Dashboard and confirm gateway health +3. Open Agents / Routing and inspect bindings +4. Run one CLI command from the built-in terminal +5. Try backup / rollback from Ops + ## Remote Access By default OCM binds to `0.0.0.0` (all interfaces). Access it from another device on your LAN using the IP shown at startup. To restrict to localhost only: diff --git a/docs/USAGE_GUIDE.en.md b/docs/USAGE_GUIDE.en.md index f803c55..5b08988 100644 --- a/docs/USAGE_GUIDE.en.md +++ b/docs/USAGE_GUIDE.en.md @@ -2,7 +2,7 @@ > Audience: People who already have OpenClaw running locally (you can run `openclaw status` and read `openclaw gateway logs`). > -> Goal: Use **OpenClaw Manager (OCM)** to make agent/sub-agent setup and day-to-day ops **visual, safer, and easier to audit**. +> Goal: Use **OpenClaw Manager (OCM)** as an **OpenClaw control panel** for agent setup, routing, health checks, built-in CLI, and safer config changes. --- @@ -60,7 +60,18 @@ Recommended rule: --- -## 2) Start OCM (macOS) +## 2) First-run mindset + +For new users, the first win is not “configure everything” — it is: + +1. Confirm OCM found the right OpenClaw directory +2. Confirm the gateway is healthy +3. Confirm you can inspect agents / bindings +4. Confirm the built-in CLI works + +That is why Dashboard + Routing + built-in CLI are the most important first-run surfaces. + +## 3) Start OCM (macOS) From the repo directory: @@ -78,7 +89,7 @@ bash start.sh --host 127.0.0.1 --- -## 3) Dashboard: check health first +## 4) Dashboard: check health first The Dashboard is your “sanity check”: @@ -92,7 +103,7 @@ Screenshot: --- -## 4) Create a main agent (with its own Telegram bot) +## 5) Create a main agent (with its own Telegram bot) > Your `main` agent usually exists already. This section is for creating an additional **root agent** that owns its own Telegram bot/account. @@ -132,7 +143,7 @@ OCM writes the agent + Telegram account/binding into `openclaw.json`. --- -## 5) Create a sub-agent (recommended workflow) +## 6) Create a sub-agent (recommended workflow) ### 5.1 Why a new group per sub-agent @@ -202,7 +213,7 @@ Steps: 2) If it is a private thread, add the bot to the thread 3) Right-click thread → **Copy Link** → paste into the form (auto-parses threadId) -## 6) Verify bindings (Channels) +## 7) Verify bindings (Channels) Go to **Channels**: @@ -214,7 +225,7 @@ Here you can quickly validate: --- -## 7) Model settings (Models) +## 8) Model settings (Models) Go to **Models**: diff --git a/docs/USAGE_GUIDE.zh-CN.md b/docs/USAGE_GUIDE.zh-CN.md index 7c2cd15..267f214 100644 --- a/docs/USAGE_GUIDE.zh-CN.md +++ b/docs/USAGE_GUIDE.zh-CN.md @@ -2,7 +2,7 @@ > 面向:已经在本机安装并跑通 OpenClaw 的用户(至少会用 `openclaw status` / `openclaw gateway logs`) > -> 目标:用 **OpenClaw Manager (OCM)** 把“创建 Agent / Sub-Agent、绑定 Telegram 群、管理模型/认证、看用量、看 cron”这套流程做成可视化、可回溯、低风险。 +> 目标:把 **OpenClaw Manager (OCM)** 当成 **OpenClaw 控制台** 来用:管理 Agent、查看 Routing、做健康检查、运行内置 CLI,并更安全地修改配置。 --- @@ -54,7 +54,18 @@ OCM 的定位:**把配置变更“可视化 + 可检查 + 可回滚(配合 --- -## 2) 启动与进入 OCM +## 2) 第一次使用时最该确认什么 + +对新用户来说,第一步不是“先把所有配置都改完”,而是先确认四件事: + +1. OCM 找到的是正确的 OpenClaw 目录 +2. Gateway 是健康的 +3. Agent / Routing 能正常查看 +4. 内置终端可以正常跑命令 + +所以第一次使用时,最重要的页面其实是 Dashboard、Routing 和内置终端。 + +## 3) 启动与进入 OCM ### 2.1 启动(macOS) @@ -81,7 +92,7 @@ bash start.sh --- -## 3) 创建主 Agent(Main Agent / 独立 Bot) +## 4) 创建主 Agent(Main Agent / 独立 Bot) > 你的 `main` 一般是默认存在的;这里重点讲“新增一个 **拥有独立 Telegram bot 的主 Agent**”。 @@ -117,7 +128,7 @@ bash start.sh --- -## 4) 创建 Sub-Agent(最常用) +## 5) 创建 Sub-Agent(最常用) ### 4.1 为什么 Sub-Agent 要用“新群” @@ -157,7 +168,7 @@ OCM 的表单里可以填 “Your Telegram User ID”,让它自动把你的 us -## 5) Discord 工作流(主 Agent + Sub-Agent) +## 6) Discord 工作流(主 Agent + Sub-Agent) OCM 也支持 Discord: @@ -185,7 +196,7 @@ OCM 也支持 Discord: 2) 如果是 private thread,需要把 bot 拉进 thread 3) 右键 Thread → **Copy Link** → 粘贴到表单(自动解析 threadId) -## 5) 绑定检查(Channels 页) +## 7) 绑定检查(Channels 页) 进入 **Channels**: @@ -199,7 +210,7 @@ OCM 也支持 Discord: --- -## 6) 模型管理(Models 页) +## 8) 模型管理(Models 页) 进入 **模型**: @@ -211,7 +222,7 @@ OCM 也支持 Discord: --- -## 7) 认证管理(Auth 页) +## 9) 认证管理(Auth 页) 进入 **认证**: diff --git a/openclaw-manager.js b/openclaw-manager.js index d4224b2..6fd8659 100644 --- a/openclaw-manager.js +++ b/openclaw-manager.js @@ -4376,7 +4376,7 @@ document.querySelectorAll('.tab').forEach(t=>{ (function() { LS.del('ocm_mode'); applyLang(); - checkStatus().then(() => { loadAll(); loadDashboard(); }).catch(e => console.error('Init error:', e)); + checkStatus().then(() => { loadAll(); setTimeout(() => loadDashboard(), 0); }).catch(e => console.error('Init error:', e)); startHealthPolling(); })();`; diff --git a/package.json b/package.json index 28ede4d..5822b08 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "openclaw-manager", - "version": "0.8.2", - "description": "A local web UI for managing OpenClaw AI agents — no npm install required", + "version": "0.9.0", + "description": "A local web UI for managing OpenClaw AI agents \u2014 no npm install required", "main": "openclaw-manager.js", "scripts": { "start": "node openclaw-manager.js",