xworkmate
v2026.3.27
Published
XWorkmate CLI wrapper for OpenClaw pairing
Maintainers
Readme
xworkmate
xworkmate is an npm CLI for pairing with OpenClaw gateways. It supports two modes:
- OpenClaw QR mode - Wraps
openclaw qrfor simple QR code generation - Relay mode - Direct WebSocket connection to gateway with background service support
Install
npm install -g xworkmatexworkmate expects a working openclaw CLI to already exist on the host. It resolves openclaw in this order:
OPENCLAW_BIN- local
openclaw/cli-entrywhen available openclawfromPATH
Usage
OpenClaw QR Mode
Generate a QR code and setup code:
xworkmate pairOnly print the setup code:
xworkmate pair --setup-code-onlyEmit JSON:
xworkmate pair --jsonRemote gateway mode:
xworkmate pair --remoteRelay Mode
Connect directly to a gateway via WebSocket:
xworkmate pair --server ws://localhost:18789With background service installation:
xworkmate pair --server ws://localhost:18789 --install-serviceRun the relay daemon manually:
xworkmate relay-daemonOptions
--server <url>- Connect to gateway directly (relay mode)--install-service- Install background service (requires--server)--remote- Remote gateway mode (OpenClaw QR mode)--url <url>- Custom gateway URL (OpenClaw QR mode)--public-url <url>- Custom public URL (OpenClaw QR mode)--token <token>- Auth token--password <password>- Auth password--setup-code-only- Only print setup code, no QR--json- Emit JSON output--no-ascii- Disable ASCII QR code
Approval
After the mobile device scans the QR, approve the pairing from an authorized OpenClaw operator device:
openclaw devices list
openclaw devices approve <requestId>Background Service
The relay mode can install a background service that maintains a persistent connection to the gateway:
- macOS: launchd agent at
~/Library/LaunchAgents/com.xworkmate.relay.plist - Linux: systemd user service at
~/.config/systemd/user/xworkmate-relay.service - Windows: Scheduled task named
XWorkmateRelay
Logs are written to ~/.xworkmate/relay.log.
Development
Install dependencies:
npm installRun tests:
npm test