mirror of
https://github.com/openclaw/openclaw.git
synced 2026-09-28 14:12:28 +08:00
## What Problem This Solves The `openclaw system` reference promises to list the shared Gateway client flags but omits `--port` and `--password`. ## Why This Change Was Made Add the two existing options to the shared table: the local Gateway port and the Gateway password when required. Neither option has an explicit registration default. Preserve the other flags, the detailed JSON behavior, and the existing command sections. ## User Impact Operators can find all shared connection options in the system reference. CLI behavior, authentication, transport, and configuration do not change. ## Evidence - Traced the shared option helper through `event`, `heartbeat last`, `heartbeat enable`, `heartbeat disable`, and `presence`. - Generated the baseline and candidate with the official documentation publisher and renderer. - Browser proof confirms the original omission, both added rows, and preservation of the full reference. - Native documentation checks, the commit hook, exact-head review, and hosted CI provide the finishing gates. - No Gateway command or credential was used. Thanks to @qingminglong for the original contribution. Co-authored-by: Ayaan Zaidi <hi@obviy.us>
4.8 KiB
4.8 KiB
summary, read_when, title
| summary | read_when | title | |||
|---|---|---|---|---|---|
| CLI reference for `openclaw system` (system events, heartbeat, presence) |
|
System |
openclaw system
System-level helpers for the Gateway: enqueue system events, control heartbeats, and view presence.
All system subcommands use Gateway RPC and accept the shared client flags:
| Flag | Default | Description |
|---|---|---|
--url <url> |
gateway.remote.url when configured |
Gateway WebSocket URL. |
--port <port> |
none | Local Gateway port. |
--token <token> |
none | Gateway token (if required). |
--password <password> |
none | Gateway password (if required). |
--timeout <ms> |
30000 |
RPC timeout in milliseconds. |
--expect-final |
off | Wait for final response (agent). |
--json |
off | Output JSON. heartbeat last/enable/disable and system presence always print the raw RPC JSON payload regardless of this flag; system event uses it to switch between JSON and a plain ok line. |
Common commands
openclaw system event --text "Check for urgent follow-ups" --mode now
openclaw system event --text "Check for urgent follow-ups" --url ws://127.0.0.1:18789 --token "$OPENCLAW_GATEWAY_TOKEN"
openclaw system heartbeat enable
openclaw system heartbeat last
openclaw system presence
system event
Enqueue a system event on the main session by default. The next
heartbeat injects it as a System: line in the prompt. Use --mode now to
trigger the heartbeat immediately; next-heartbeat (default) waits for the
next scheduled tick.
Pass --session-key to target a specific session, for example to relay an
async-task completion back to the channel that started it.
Flags:
--text <text>: required system event text.--mode <mode>:nowornext-heartbeat(default).--session-key <sessionKey>: optional; target a specific agent session instead of the agent's main session. Keys that do not belong to the resolved agent fall back to the agent's main session.
system heartbeat last|enable|disable
last: show the last heartbeat event.enable: turn heartbeats back on (use this if they were disabled).disable: pause heartbeats.
system presence
List the current system presence entries the Gateway knows about (nodes, instances, and similar status lines).
Notes
- Requires a running Gateway reachable by your current config (local or remote).
- System events are ephemeral and not persisted across restarts.