OpenClawSkills
GitHub
CLI Reference • TutorialHeader.readTime

Directory

CLI reference for openclaw directory (self, peers, groups).

Directory lookup for channels that support it (contacts/peers, groups, and "me").

Tutorial.step

Common flags

- ''--channel <name>'': Channel ID/alias (required when multiple channels configured; auto when only one)

- ''--account <id>'': Account ID (default: channel default)

- ''--json'': Output JSON

Tutorial.step

Notes

- ''directory'' is meant to help you find IDs you can paste into other commands (especially ''openclaw message send --target ...'').

- For many channels, results are config-backed (allowlist/configured groups), not live provider directories.

- Default output is ''id'' (sometimes ''name''), tab-separated; use ''--json'' for scripting.

Tutorial.step

Using results with `message send`

Bash
openclaw directory peers list --channel slack --query "U0"
openclaw message send --channel slack --target user:U012ABCDEF --message "hello"
Tutorial.step

ID formats (by channel)

- WhatsApp: ''+15551234567'' (DM), ''[email protected]'' (group)

- Telegram: ''@username'' or numeric chat ID; groups are numeric IDs

- Slack: ''user:U…'' and ''channel:C…''

- Discord: ''user:<id>'' and ''channel:<id>''

- Matrix (plugin): ''user:@user:server'', ''room:!roomId:server'' or ''#alias:server''

- Microsoft Teams (plugin): ''user:<id>'' and ''conversation:<id>''

- Zalo (plugin): User ID (Bot API)

- Zalo Personal / ''zalouser'' (plugin): Thread ID (DM/group) from ''zca'' (''me'', ''friend list'', ''group list'')

Tutorial.step

Self ("me")

Bash
openclaw directory self --channel zalouser
Tutorial.step

Peers (contacts/users)

Bash
openclaw directory peers list --channel zalouser
openclaw directory peers list --channel zalouser --query "name"
openclaw directory peers list --channel zalouser --limit 50
Tutorial.step

Groups

Bash
openclaw directory groups list --channel zalouser
openclaw directory groups list --channel zalouser --query "work"
openclaw directory groups members --channel zalouser --group-id <id>