Tools
Pairing
Cross-platform device pairing plugin for OpenClaw (Android/HarmonyOS/iOS)
Install
npm install
npm
README
# OpenClaw Pairing Plugin / OpenClaw ่ฎพๅค้
ๅฏนๆไปถ
<p align="center">
<b>Cross-platform device pairing plugin for OpenClaw</b><br>
<b>OpenClaw ่ทจๅนณๅฐ่ฎพๅค้
ๅฏนๆไปถ</b>
</p>
<p align="center">
Supports Android, HarmonyOS, and iOS feiclaw apps<br>
ๆฏๆ Androidใ้ธฟ่ใiOS ไธ็ซฏ้ฃ่พๅบ็จ
</p>
---
## Features / ๅ่ฝ็นๆง
| English | ไธญๆ |
|---------|------|
| ๐ **One-command pairing** - No QR codes or manual setup codes | ๐ **ไธ้ฎ้
ๅฏน** - ๆ ้ไบ็ปด็ ๆๆๅจ่พๅ
ฅ setup code |
| ๐ฑ **Multi-platform** - Android, HarmonyOS, iOS support | ๐ฑ **ๅคๅนณๅฐๆฏๆ** - Androidใ้ธฟ่ใiOS ไธ็ซฏ้็จ |
| ๐ **Secure** - Public key cryptography, time-limited claims | ๐ **ๅฎๅ
จๅฏ้ ** - ๅ
ฌ้ฅๅ ๅฏใ้ๆถไปค็ |
| โก **Fast** - Complete pairing in 10-30 seconds | โก **ๆ้้
ๅฏน** - 10-30 ็งๅฎๆ้
ๅฏน |
---
## Visual Guide / ๅพ่งฃๆ็จ
### Pairing Flow / ้
ๅฏนๆต็จๅพ
```
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ ้ฃ่พ App โ โ ้
ๅฏนๆไปถ โ โ OpenClaw โ
โ (ๆๆบ็ซฏ) โ โ (็ต่็ซฏ) โ โ (็ฝๅ
ณ) โ
โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ
โ โ โ
โ 1. ็นๅป"ไธ้ฎ้
ๅฏน" โ โ
โ ็ๆ Claim โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ>โ โ
โ โ โ
โ 2. ๆพ็คบ้
ๅฏนๆไปค โ โ
โ<โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โ 3. ๅคๅถๅฐ็ต่ๆง่ก โ
โ โ openclaw pair-android โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ>โ
โ โ โ
โ โ 4. ็ๆ Setup Code โ
โ โ<โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โ 5. App ่ชๅจ่ทๅ Setup Code โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ>โ โ
โ โ โ
โ 6. ๅฎๆ้
ๅฏน๏ผ่ฟๆฅๆๅ๏ผ โ โ
โ<โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
```
### App Screenshots / App ็้ข็คบๆๅพ
> Currently only Android client is available. HarmonyOS and iOS clients are in development.<br>
> ็ฎๅไป
ๆฏๆ Android ๅฎขๆท็ซฏใ้ธฟ่ๅ iOS ๅฎขๆท็ซฏๆญฃๅจๅผๅไธญใ
<details>
<summary>๐ฑ Android ๅฎๅ็ซฏ๏ผ็นๅปๅฑๅผ๏ผ</summary>
#### Step 1: Start Pairing / ๅผๅง้
ๅฏน
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โก ้ฃ่พ FeiClaw โ๏ธ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ๐ฑ ่ฎพๅค่ฟๆฅ โ โ
โ โ โ โ
โ โ [ ๐ ๅผๅง้
ๅฏน ] โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
#### Step 2: Copy Command / ๅคๅถๆไปค
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ ไธ้ฎ้
ๅฏน โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โ
้
ๅฏนๆไปคๅทฒ็ๆ๏ผ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ openclaw pair-andro โ โ
โ โ id --claim "eyJ... โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ [ ๐ ๅคๅถๆไปค ] โ
โ โ
โ ็ถๆ: โณ ็ญๅพ
ๆง่ก... โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
#### Step 3: Success / ้
ๅฏนๆๅ
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ้
ๅฏนๆๅ๏ผ โ
โ โ
โ
โ ่ฎพๅคๅทฒ่ฟๆฅๅฐ OpenClaw โ
โ [ ๐ ่ฟๅ้ฆ้กต ] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
</details>
### Computer Terminal / ็ต่็ป็ซฏ
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ป ็ต่็ซฏ - ็ป็ซฏ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ $ openclaw pair-android --claim "eyJ2IjoxLCJjbGFpbVRv โ
โ a2VuIjo..." โ
โ โ
โ โ OpenClaw Pairing Plugin ๅทฒๅ ่ฝฝ โ
โ โ ้ช่ฏ claim... ๆๅ โ
โ โ ็ๆ setup code... ๅฎๆ โ
โ โ ๆณจๅ่ฎพๅคๅฃฐๆ... ๆๅ โ
โ โ
โ โ
Pairing successful! โ
โ Device: feiclaw-android-abc123 โ
โ Gateway: http://localhost:8080 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
More diagrams: [docs/pairing-flow.md](./docs/pairing-flow.md)
---
## Quick Start / ๅฟซ้ๅผๅง
### For End Users / ็ป็ซฏ็จๆท
#### 1. Install Plugin on Computer / ๅจ็ต่ๅฎ่ฃ
ๆไปถ
```bash
# One-line install / ไธ้ฎๅฎ่ฃ
curl -fsSL https://github.com/feiclaw/openclaw-pairing/releases/latest/install.sh | sh
```
#### 2. Open Feiclaw App on Phone / ๅจๆๆบไธๆๅผ้ฃ่พ App
**Android:** ๆๅผ App โ ็นๅป"ๅผๅง้
ๅฏน" โ ้ๆฉ"ไธ้ฎ้
ๅฏน"
> **Note:** HarmonyOS and iOS clients are in development.
> **ๆณจๆ๏ผ** ้ธฟ่ๅ iOS ๅฎขๆท็ซฏๆญฃๅจๅผๅไธญใ
#### 3. Copy Command from App / ไป App ๅคๅถๆไปค
App ไผ็ๆ็ฑปไผผ่ฟๆ ท็ๆไปค๏ผ
```bash
openclaw pair-android --claim "eyJ2IjoxLCJjbGFpbVRva2VuIjoi..."
```
#### 4. Paste & Execute on Computer / ๅจ็ต่็ฒ่ดดๅนถๆง่ก
```bash
# Paste the command from your phone / ็ฒ่ดดไปๆๆบๅคๅถ็ๆไปค
openclaw pair-android --claim "<paste-your-claim-here>"
```
#### 5. Done! / ๅฎๆ๏ผ
App ไผ่ชๅจๅฎๆ้
ๅฏนๅนถๆพ็คบๆๅไฟกๆฏใ
---
## Installation / ๅฎ่ฃ
ๆนๆณ
### One-line Install (Recommended) / ไธ้ฎๅฎ่ฃ
๏ผๆจ่๏ผ
```bash
curl -fsSL https://github.com/feiclaw/openclaw-pairing/releases/latest/install.sh | sh
```
### Via OpenClaw Plugins / ้่ฟ OpenClaw ๆไปถๅฎ่ฃ
```bash
openclaw plugins install github:feiclaw/openclaw-pairing
```
### Manual Install / ๆๅจๅฎ่ฃ
```bash
git clone https://github.com/feiclaw/openclaw-pairing.git
cd openclaw-pairing
npm install
npm run build
npm link
```
---
## Usage / ไฝฟ็จๆนๆณ
### Platform-Specific Commands / ๅๅนณๅฐๅฝไปค
| Platform | Status | Command |
|----------|--------|---------|
| Android | โ
Available | `openclaw pair-android --claim "<payload>"` |
| HarmonyOS | ๐ง In Development | `openclaw pair-harmony --claim "<payload>"` |
| iOS | ๐ง In Development | `openclaw pair-ios --claim "<payload>"` |
| Auto-detect | โ
Available | `openclaw pair-auto --claim "<payload>"` |
### Auto-detect Platform / ่ชๅจๆฃๆตๅนณๅฐ
```bash
openclaw pair-auto --claim "<base64-claim-payload>"
```
---
## How It Works / ๅทฅไฝๅ็
| Step | English | ไธญๆ |
|------|---------|------|
| 1 | **App generates claim** - Device creates a claim with deviceId, publicKey, and claimToken | **App ็ๆ claim** - ่ฎพๅคๅๅปบๅ
ๅซ deviceIdใpublicKey ๅ claimToken ็ๅฃฐๆ |
| 2 | **Send to OpenClaw** - Claim is sent to OpenClaw via this plugin | **ๅ้ๅฐ OpenClaw** - ้่ฟๆญคๆไปถๅฐ claim ๅ้ๅฐ OpenClaw |
| 3 | **Generate setup code** - Plugin creates a secure setup code with bootstrap tokens | **็ๆ setup code** - ๆไปถ็ๆๅ
ๅซ bootstrap token ็ๅฎๅ
จ่ฎพ็ฝฎ็ |
| 4 | **Auto-complete** - App polls for setup code and completes pairing automatically | **่ชๅจๅฎๆ** - App ่ฝฎ่ฏข่ทๅ setup code ๅนถ่ชๅจๅฎๆ้
ๅฏน |
---
## Security / ๅฎๅ
จๆง
| Feature | English | ไธญๆ |
|---------|---------|------|
| Expiration | Claims expire after 5 minutes | Claim 5 ๅ้ๅ่ฟๆ |
| One-time | One-time use claim tokens | ไธๆฌกๆง claim token |
| Verification | Public key verification | ๅ
ฌ้ฅ้ช่ฏ |
| Minimal Scope | Bootstrap tokens with minimal required scopes | ๆๅฐๆ้็ bootstrap token |
---
## Troubleshooting / ๆ
้ๆ้ค
### Plugin not installed / ๆไปถๆชๅฎ่ฃ
ๅฆๆๆ็คบ `pair-android` ๅฝไปคไธๅญๅจ๏ผ
```bash
# ๅฎ่ฃ
ๆไปถ
openclaw plugins install github:feiclaw/openclaw-pairing
# ๆไฝฟ็จไธ้ฎๅฎ่ฃ
่ๆฌ
curl -fsSL https://github.com/feiclaw/openclaw-pairing/releases/latest/install.sh | sh
```
### Pairing timeout / ้
ๅฏน่ถ
ๆถ
- ็กฎไฟ็ต่ๅๆๆบๅจๅไธ็ฝ็ป
- ๆฃๆฅ OpenClaw ๆฏๅฆๆญฃๅธธ่ฟ่ก
- ้ๆฐ็ๆ้
ๅฏนๆไปค
---
## Roadmap / ่ทฏ็บฟๅพ
- [x] Android client support
- [ ] HarmonyOS client (In Development)
- [ ] iOS client (In Development)
- [ ] NPM package publish
- [ ] Web-based pairing (no plugin installation required)
---
## Development / ๅผๅ
```bash
# Install dependencies / ๅฎ่ฃ
ไพ่ต
npm install
# Build / ๆๅปบ
npm run build
# Watch mode / ็ๅฌๆจกๅผ
npm run watch
# Test / ๆต่ฏ
npm test
```
---
## Contributing / ่ดก็ฎ
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
่ฏฆๆ
่ฏทๅ้
[CONTRIBUTING.md](./CONTRIBUTING.md)ใ
---
## Quick Start Guide / ๅฟซ้ๅผๅงๆๅ
See [QUICKSTART.md](./QUICKSTART.md) for a step-by-step guide.
ๆญฅ้ชคๆๅ่ฏทๅ้
[QUICKSTART.md](./QUICKSTART.md)ใ
---
## License / ่ฎธๅฏ่ฏ
MIT License / MIT ่ฎธๅฏ่ฏ
Copyright (c) 2026 feiclaw
tools
Comments
Sign in to leave a comment