AI CLI channel plugin — centralized channel management service.
- Go 1.23+
- SQLite (via CGO)
| Variable | Required | Default | Description |
|---|---|---|---|
CHANNEL_MASTER_KEY |
Yes | — | Base64-encoded 32-byte key for AES-256-GCM credential encryption |
CHANNEL_DATA_DIR |
No | ~/.myclaw |
Root directory for default local data such as config files, SQLite, and bot workspaces |
CHANNEL_HTTP_ADDR |
No | :8080 |
HTTP listen address |
CHANNEL_SQLITE_PATH |
No | ~/.myclaw/myclaw.db |
SQLite database file path |
WECHAT_REFERENCE_BASE_URL |
No | http://localhost:9090 |
WeChat reference adapter base URL |
WECHAT_AUTH_TOKEN |
No | — | Optional auth token for WeChat adapter |
# Generate a master key
export CHANNEL_MASTER_KEY=$(openssl rand -base64 32)
# Start the server
go run .
# Or explicitly run the server command
go run . servergo test ./...All endpoints are under /api/v1 and use GET/POST only.
curl -X POST http://localhost:8080/api/v1/channel-bindings/create \
-H "Content-Type: application/json" \
-d '{"user_id":"u_123","channel_type":"wechat"}'curl http://localhost:8080/api/v1/channel-bindings/detail?binding_id=bind_xxxcurl http://localhost:8080/api/v1/channel-accounts/list?user_id=u_123&channel_type=wechatcurl http://localhost:8080/api/v1/runtime/config \
-H "Authorization: Bearer <token>"