Skip to content

Commit 43176fe

Browse files
committed
Update README.md to document the use of NemoClaw API client over fetch
1 parent 315026a commit 43176fe

1 file changed

Lines changed: 40 additions & 9 deletions

File tree

README.md

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,30 @@ cd gui && npm install && npm start
228228

229229
The dashboard is accessible at `http://localhost:3000` (or your LAN IP).
230230

231+
**Authentication:**
232+
233+
The dashboard is protected by a bearer token. On first start, a random token is generated and displayed in the server logs:
234+
235+
```
236+
[INFO] Token: abc123def456...
237+
```
238+
239+
Use the token in one of three ways:
240+
1. **URL parameter:** `http://localhost:3000?token=abc123...` (stores in session)
241+
2. **HTTP header:** `Authorization: Bearer abc123...`
242+
3. **Environment variable:** Set `NEMOCLAW_DASHBOARD_TOKEN=your-token` before starting the server
243+
244+
The token is persisted in `~/.nemoclaw/config.json` and reused across restarts.
245+
246+
**Environment Variables:**
247+
248+
| Variable | Description | Default |
249+
| --- | --- | --- |
250+
| `GUI_PORT` | Dashboard port | `3000` |
251+
| `NEMOCLAW_DASHBOARD_TOKEN` | Override dashboard auth token | Auto-generated |
252+
| `NEMOCLAW_CORS_ORIGIN` | Comma-separated CORS origins | Same-origin only |
253+
| `NEMOCLAW_LOG_LEVEL` | Log level (debug/info/warn/error) | `info` |
254+
231255
**Dashboard Pages:**
232256

233257
| Page | URL | Description |
@@ -252,27 +276,34 @@ All GUI functions are also available as REST endpoints:
252276
| `/api/sandboxes` | POST | Create a new sandbox |
253277
| `/api/sandboxes/:name` | GET | Sandbox detail with live status |
254278
| `/api/sandboxes/:name` | DELETE | Destroy a sandbox |
279+
| `/api/sandboxes/:name/start` | POST | Start a stopped sandbox |
280+
| `/api/sandboxes/:name/stop` | POST | Stop a running sandbox |
255281
| `/api/sandboxes/:name/logs` | GET (SSE) | Real-time log streaming |
282+
| `/api/health` | GET | Public health check (no auth required) |
256283
| `/api/policies/presets` | GET | List available policy presets |
257284
| `/api/policies/apply` | POST | Apply presets to a sandbox |
258285
| `/api/policies/baseline` | GET | Get full baseline policy |
259286
| `/api/policies/validate` | POST | Validate all policy files |
287+
| `/api/policies/custom` | POST | Apply raw YAML policy to a running sandbox |
288+
| `/api/policies/:sandbox/presets/:preset` | DELETE | Remove a specific preset from a sandbox |
289+
| `/api/policies/:sandbox/reset` | POST | Reset sandbox to baseline policy |
260290
| `/api/inference/providers` | GET | Provider catalogue |
261291
| `/api/inference/switch` | POST | Switch active inference provider |
262292
| `/api/inference/credentials` | GET/POST | Manage credential vault |
263293
| `/api/workspace/:sandbox/files` | GET | List workspace files |
264294
| `/api/workspace/:sandbox/backup` | POST | Create workspace backup |
265295
| `/api/system/preflight` | GET | Docker, OpenShell, port checks |
266-
| `/api/system/health` | GET | System health status |
267-
| `/api/system/telegram` | POST | Manage Telegram Bridge configurations (token + allowed chat IDs) |
268-
| `/api/system/services/start` | POST | Start auxiliary services (Telegram bridge + Cloudflared tunnel) |
296+
| `/api/system/telegram` | POST | Manage Telegram Bridge configurations |
297+
| `/api/system/services/start` | POST | Start auxiliary services |
269298
| `/api/system/services/stop` | POST | Stop all auxiliary services |
270-
| `/api/system/services/status` | GET | Auxiliary service health (Telegram, Cloudflared) |
271-
| `/api/policies/custom` | POST | Apply raw YAML policy to a running sandbox |
272-
| `/api/policies/:sandbox/presets/:preset` | DELETE | Remove a specific preset from a sandbox |
273-
| `/api/policies/:sandbox/reset` | POST | Reset sandbox to baseline policy |
274-
| `/api/chat/:sandbox` | POST | Stream chat message directly to sandboxed CLI agent |
275-
| `/api/monitoring/:sandbox/network`| GET (SSE) | Stream network intercepts and proxy logs |
299+
| `/api/system/services/status` | GET | Auxiliary service health |
300+
| `/api/chat/:sandbox` | POST | Chat with sandboxed agent |
301+
| `/api/monitoring/:sandbox/network` | GET (SSE) | Stream network intercepts |
302+
| `/api/monitoring/:sandbox/approvals` | GET | List blocked network requests |
303+
| `/api/monitoring/:sandbox/approvals/:id/approve` | POST | Approve a blocked request |
304+
| `/api/monitoring/:sandbox/approvals/:id/deny` | POST | Deny a blocked request |
305+
306+
**Note**: When developing GUI components, always use `NemoClaw.api.get`/`post` in favor of raw `fetch()` to ensure authorization tokens are automatically appended.
276307

277308
The `nemoclaw` CLI is the primary user-facing tool for sandbox lifecycle management.
278309

0 commit comments

Comments
 (0)