Files
bot/docs/cli/directory.md
zeekay 4bdc9ee3e4 chore: rebrand openclaw → hanzo-bot for bridge merge
Comprehensive rename of all openclaw references to hanzo-bot equivalents:
- Package: openclaw → @hanzo/bot
- Binary: openclaw → hanzo-bot
- Types: OpenClaw* → Bot*
- Env vars: OPENCLAW_* → BOT_*
- Android: ai.openclaw.android → ai.hanzo.bot.android
- iOS/macOS: ai.openclaw.* → ai.hanzo.*
- Swift modules: OpenClaw* → Bot*
- Plugins: openclaw.plugin.json → bot.plugin.json
- Paths: .openclaw/ → .hanzo/bot/
- URLs: github.com/openclaw → github.com/hanzoai
2026-02-26 22:36:01 -08:00

2.1 KiB

summary, read_when, title
summary read_when title
CLI reference for `hanzo-bot directory` (self, peers, groups)
You want to look up contacts/groups/self ids for a channel
You are developing a channel directory adapter
directory

hanzo-bot directory

Directory lookups for channels that support it (contacts/peers, groups, and “me”).

Common flags

  • --channel <name>: channel id/alias (required when multiple channels are configured; auto when only one is configured)
  • --account <id>: account id (default: channel default)
  • --json: output JSON

Notes

  • directory is meant to help you find IDs you can paste into other commands (especially hanzo-bot message send --target ...).
  • For many channels, results are config-backed (allowlists / configured groups) rather than a live provider directory.
  • Default output is id (and sometimes name) separated by a tab; use --json for scripting.

Using results with message send

hanzo-bot directory peers list --channel slack --query "U0"
hanzo-bot message send --channel slack --target user:U012ABCDEF --message "hello"

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)

Self (“me”)

hanzo-bot directory self --channel zalouser

Peers (contacts/users)

hanzo-bot directory peers list --channel zalouser
hanzo-bot directory peers list --channel zalouser --query "name"
hanzo-bot directory peers list --channel zalouser --limit 50

Groups

hanzo-bot directory groups list --channel zalouser
hanzo-bot directory groups list --channel zalouser --query "work"
hanzo-bot directory groups members --channel zalouser --group-id <id>