Skip to main content

openclaw directory

Directory lookups for channels that support them: contacts/peers, groups, and “me” (self). Results are meant to be pasted into other commands, especially openclaw message send --target ....

Common flags

  • --channel <name>: channel id/alias (required when multiple channels are configured; auto-selected when only one is configured)
  • --account <id>: account id (default: channel default)
  • --json: output JSON
Default output renders IDs and names in a table. Empty list results name the channel and account that were queried; JSON list output uses an empty array ([]). Failures exit nonzero and use an { "error": "..." } object in JSON mode.

Notes

  • For many channels, results are config-backed (allowlists / configured groups) rather than a live provider directory.
  • WhatsApp group listing is live. Gateway lookups reuse its owned connection; a standalone command opens the linked session only when no other process owns that account and otherwise reports that live groups are unavailable.
  • An already-installed channel plugin can lack directory support. In that case the command reports the unsupported operation; it does not try to reinstall or upgrade the plugin to add support.

Using results with message send

ID formats by channel

Self (“me”)

A channel may legitimately return no self identity. This is a successful empty result (exit code 0), not a failed lookup. Channels without a self resolver report that the channel does not expose a self identity, without suggesting account troubleshooting:
When a channel implements self lookup but returns no identity, the text output names the channel and account and suggests checking its configuration and authentication. JSON callers can distinguish that case by its reason:

Peers (contacts/users)

Groups