Files
openclaw/docs/cli/system.md
T

72 lines
2.0 KiB
Markdown
Raw Normal View History

2026-01-24 04:01:45 +00:00
---
2026-01-30 03:15:10 +01:00
summary: "CLI reference for `openclaw system` (system events, heartbeat, presence)"
2026-01-24 04:01:45 +00:00
read_when:
- You want to enqueue a system event without creating a cron job
- You need to enable or disable heartbeats
- You want to inspect system presence entries
2026-01-31 16:04:03 -05:00
title: "system"
2026-01-24 04:01:45 +00:00
---
2026-01-30 03:15:10 +01:00
# `openclaw system`
2026-01-24 04:01:45 +00:00
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:
- `--url <url>`
- `--token <token>`
- `--timeout <ms>`
- `--expect-final`
2026-01-24 04:01:45 +00:00
## Common commands
```bash
2026-01-30 03:15:10 +01:00
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"
2026-01-30 03:15:10 +01:00
openclaw system heartbeat enable
openclaw system heartbeat last
openclaw system presence
2026-01-24 04:01:45 +00:00
```
## `system event`
Enqueue a system event on the **main** session. The next heartbeat will inject
it as a `System:` line in the prompt. Use `--mode now` to trigger the heartbeat
immediately; `next-heartbeat` waits for the next scheduled tick.
Flags:
2026-01-31 21:13:13 +09:00
2026-01-24 04:01:45 +00:00
- `--text <text>`: required system event text.
- `--mode <mode>`: `now` or `next-heartbeat` (default).
- `--json`: machine-readable output.
- `--url`, `--token`, `--timeout`, `--expect-final`: shared Gateway RPC flags.
2026-01-24 04:01:45 +00:00
## `system heartbeat last|enable|disable`
Heartbeat controls:
2026-01-31 21:13:13 +09:00
2026-01-24 04:01:45 +00:00
- `last`: show the last heartbeat event.
- `enable`: turn heartbeats back on (use this if they were disabled).
- `disable`: pause heartbeats.
Flags:
2026-01-31 21:13:13 +09:00
2026-01-24 04:01:45 +00:00
- `--json`: machine-readable output.
- `--url`, `--token`, `--timeout`, `--expect-final`: shared Gateway RPC flags.
2026-01-24 04:01:45 +00:00
## `system presence`
List the current system presence entries the Gateway knows about (nodes,
instances, and similar status lines).
Flags:
2026-01-31 21:13:13 +09:00
2026-01-24 04:01:45 +00:00
- `--json`: machine-readable output.
- `--url`, `--token`, `--timeout`, `--expect-final`: shared Gateway RPC flags.
2026-01-24 04:01:45 +00:00
## Notes
- Requires a running Gateway reachable by your current config (local or remote).
- System events are ephemeral and not persisted across restarts.