Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

Repository files navigation

myclaw

AI CLI channel plugin — centralized channel management service.

Requirements

  • Go 1.23+
  • SQLite (via CGO)

Environment Variables

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

Run Locally

# 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 . server

Run Tests

go test ./...

API Endpoints

All endpoints are under /api/v1 and use GET/POST only.

Create Binding Session

curl -X POST http://localhost:8080/api/v1/channel-bindings/create \
  -H "Content-Type: application/json" \
  -d '{"user_id":"u_123","channel_type":"wechat"}'

Poll Binding Detail

curl http://localhost:8080/api/v1/channel-bindings/detail?binding_id=bind_xxx

List Channel Accounts

curl http://localhost:8080/api/v1/channel-accounts/list?user_id=u_123&channel_type=wechat

Fetch Runtime Configuration

curl http://localhost:8080/api/v1/runtime/config \
  -H "Authorization: Bearer <token>"

About

AI cli channel plugin

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages