dsh-plugin-rockdesk 0.0.0-stage → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +25 -0
- package/README.md +178 -2
- package/README.zh.md +88 -0
- package/assets/icon-128.png +0 -0
- package/dsh/cordis.patch.yml +4 -0
- package/dsh/index.js +64 -0
- package/package.json +42 -4
- package/skills/rockd-remote-control/SKILL.md +456 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RockDesk
|
|
4
|
+
|
|
5
|
+
This license covers the contents of this repository (the skill file, plugin
|
|
6
|
+
manifests and README). It does not cover the RockDesk software, which is
|
|
7
|
+
proprietary and licensed separately at https://rockdesk.io.
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,179 @@
|
|
|
1
|
-
#
|
|
1
|
+
# RockDesk skill and MCP server for Claude Code, Codex, Gemini CLI, DeepSeek Harness and other agents
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**中文:** RockDesk(磐石远控)让 AI 按 9 位 ID 控制远程电脑——DeepSeek Harness、Claude Code、Codex、Gemini CLI 一行命令接入,跑命令、传文件、截屏、键鼠都行,两台都不需要公网 IP。MCP 服务器也发在 npm 和 PyPI(`npx -y rockdesk-mcp` / `uvx rockdesk-mcp`),详见下方「中文」。 完整中文说明:[README.zh.md](README.zh.md)。
|
|
4
|
+
|
|
5
|
+
[](https://mcpservers.org/servers/rockdesk-io/rockdesk-skill) [](https://rockdesk.io/ai-agents.html) [](https://open-vsx.org/extension/rockdesk/rockdesk) [](https://github.com/rockdesk-io/homebrew-tap)
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npx skills add rockdesk-io/rockdesk-skill
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Needs the RockDesk app on both machines** — the skill only teaches your agent the commands; RockDesk does the work. [Download RockDesk](https://rockdesk.io/#download) (in China: [rockdesk.cn](https://rockdesk.cn/#download)).
|
|
12
|
+
|
|
13
|
+
Let your AI agent work on your **other** computers.
|
|
14
|
+
|
|
15
|
+
[RockDesk](https://rockdesk.io) gives every machine a 9-digit ID and connects them peer-to-peer, falling back to a relay when a direct path isn't possible. No port forwarding, no VPN setup, no sshd on the remote. Its command line, `rds`, lets an agent:
|
|
16
|
+
|
|
17
|
+
- run commands on the other machine and get real exit codes (`shell -c`), or start long jobs that outlive the call
|
|
18
|
+
- copy, sync and send files, or mount a remote folder as a local one
|
|
19
|
+
- take screenshots it can read, then click, type and press keys
|
|
20
|
+
- read and set the clipboard, browse clipboard history
|
|
21
|
+
- forward TCP ports, serial ports and USB devices, or bring up a VPN into the remote's network
|
|
22
|
+
|
|
23
|
+
This repository holds the skill that teaches agents to use it.
|
|
24
|
+
|
|
25
|
+
Demo: [Claude Code drives a Windows PC](https://youtu.be/VIFOqMNGUW8) · [Claude Code drives a Mac](https://youtu.be/uddhlpvHFV0)
|
|
26
|
+
|
|
27
|
+
## Quickstart by AI Agent / Client
|
|
28
|
+
|
|
29
|
+
| Agent / Client | Recommended Install |
|
|
30
|
+
|---|---|
|
|
31
|
+
| **Claude Code** | `claude mcp add -s user rockdesk -- rds mcp` or `/plugin install rockdesk --marketplace rockdesk-io/rockdesk-skill` |
|
|
32
|
+
| **OpenAI Codex CLI** | `codex mcp add rockdesk -- rds mcp` or `codex plugin marketplace add rockdesk-io/rockdesk-skill` |
|
|
33
|
+
| **Gemini CLI** | `gemini extensions install https://github.com/rockdesk-io/rockdesk-skill` |
|
|
34
|
+
| **DeepSeek Harness (`dsh`)** | `dsh plugin --profile <profile> add github:rockdesk-io/rockdesk-skill` |
|
|
35
|
+
| **TRAE / Cursor / Windsurf / Qwen** | `npx skills add rockdesk-io/rockdesk-skill` or stdio MCP `{"command": "rds", "args": ["mcp"]}` |
|
|
36
|
+
| **WorkBuddy** | Search **RockDesk** in WorkBuddy Open Platform or install via `npx skills add rockdesk-io/rockdesk-skill` |
|
|
37
|
+
|
|
38
|
+
## Guides & Benchmarks
|
|
39
|
+
|
|
40
|
+
- [Mac mini Remote Control & Bidirectional AI Hub](https://rockdesk.io/mac-mini-remote.html) — connect into your always-on Mac mini AND let Claude Code / Codex on it operate your Windows PC, Linux servers, laptops, and Android phones via `rds mcp`.
|
|
41
|
+
- [1-RTT P2P FUSE Directory Mount vs SSHFS](https://rockdesk.io/vs-sshfs.html) — measured 4.8× faster small-file writes, 2.9× faster reads, and 35× faster `stat()` at 60 ms RTT.
|
|
42
|
+
- [Remote Serial (`/dev/ttyUSB`), USB/IP, Headless ARM64 & ESP32-S3](https://rockdesk.io/remote-serial-usb.html) — remote hardware labs, Wake-on-LAN, GPIO, and physical touchscreen `ask` approval.
|
|
43
|
+
- [RockDesk vs AnyDesk](https://rockdesk.io/vs-anydesk.html) · [RockDesk vs RustDesk](https://rockdesk.io/vs-rustdesk.html)
|
|
44
|
+
|
|
45
|
+
## Install
|
|
46
|
+
|
|
47
|
+
### 1. Install RockDesk on both machines
|
|
48
|
+
|
|
49
|
+
[Download](https://rockdesk.io/#download) for Windows, macOS, Linux (x86_64 / arm64) and Android, plus an iOS client; in China use [rockdesk.cn](https://rockdesk.cn/#download). Install it on this computer and on every computer you want your agent to work on, and note the 9-digit ID the app shows there. New devices start with a free trial. On a Linux machine without a screen: `sudo systemctl enable --now rockd`, then `sudo rds otp` for a one-time password.
|
|
50
|
+
|
|
51
|
+
Direct links that always point to the newest release: [Windows](https://rockdesk.io/download/latest/windows) · [macOS, Apple silicon](https://rockdesk.io/download/latest/macos) · [macOS, Intel](https://rockdesk.io/download/latest/macos-x86_64) · [Linux x86_64 .deb](https://rockdesk.io/download/latest/linux-amd64) · [Linux arm64 .deb](https://rockdesk.io/download/latest/linux-arm64) · [Android .apk](https://rockdesk.io/download/latest/android). In China, use rockdesk.cn instead of rockdesk.io in these links. On macOS (Homebrew): `brew tap rockdesk-io/tap && brew install --cask rockdesk` ([homebrew-tap](https://github.com/rockdesk-io/homebrew-tap)). On Linux: `curl -fL -o rockdesk.deb https://rockdesk.io/download/latest/linux-amd64 && sudo apt install ./rockdesk.deb`.
|
|
52
|
+
|
|
53
|
+
### 2. Install the skill in your agent
|
|
54
|
+
|
|
55
|
+
**Any agent, with the skills CLI** (puts it in `~/.agents/skills` and links it to the agents you pick):
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
npx skills add rockdesk-io/rockdesk-skill
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Claude Code, as a plugin** (2.1.275 or later, one step):
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
/plugin install rockdesk --marketplace rockdesk-io/rockdesk-skill
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Older versions: `/plugin marketplace add rockdesk-io/rockdesk-skill`, then `/plugin install rockdesk@rockdesk`.
|
|
68
|
+
The plugin lives in [`plugins/rockdesk/`](plugins/rockdesk/): Claude's plugin directory accepts only Markdown, text, JSON
|
|
69
|
+
and images in a plugin folder, so it is kept apart from the files for other agents. Its copy of the skill is the same
|
|
70
|
+
as [`skills/rockd-remote-control/SKILL.md`](skills/rockd-remote-control/SKILL.md) except that it points to the install
|
|
71
|
+
guide instead of a one-line Linux install, and lets the user type passwords into `rds <id> auth` themselves.
|
|
72
|
+
|
|
73
|
+
**Gemini CLI, as an extension:**
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
gemini extensions install https://github.com/rockdesk-io/rockdesk-skill
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**DeepSeek Harness (dsh), as a plugin:** install it into the profile you use, then restart that profile:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
dsh plugin --profile <profile> add github:rockdesk-io/rockdesk-skill
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Or just ask your agent** (Claude Code, Codex, DeepSeek Harness, …):
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Install the skill at https://rockdesk.io/rockdesk-cli.md
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Codex, as a plugin:**
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
codex plugin marketplace add rockdesk-io/rockdesk-skill
|
|
95
|
+
codex plugin add rockdesk@rockdesk
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Codex, skill only:** run this inside Codex, then restart it:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
$skill-installer install https://github.com/rockdesk-io/rockdesk-skill/tree/main/skills/rockd-remote-control
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Or by hand:** copy `skills/rockd-remote-control/` into `~/.claude/skills/` (Claude Code), `~/.gemini/skills/` (Gemini CLI) or `~/.agents/skills/` (Codex, DeepSeek Harness — dsh does not read `~/.claude/skills`).
|
|
105
|
+
|
|
106
|
+
**Or connect it as an MCP server** — use whichever you prefer. `rds mcp` (RockDesk 1.0.3 and later) is an MCP server over stdio with 18 tools: shell, spawn, copy, ls, screenshot, click, type_text, key, scroll, clipboard, port forwarding and more; screenshots come back as images.
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
claude mcp add -s user rockdesk -- rds mcp # Claude Code
|
|
110
|
+
codex mcp add rockdesk -- rds mcp # Codex
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Gemini CLI, Cursor, Claude Desktop and other MCP clients: `{"mcpServers": {"rockdesk": {"command": "rds", "args": ["mcp"]}}}`. On macOS and Windows `rds` is not on the PATH: use `/Applications/rockd.app/Contents/MacOS/rds` or `C:\Program Files\rockd\rds.exe`.
|
|
114
|
+
|
|
115
|
+
If RockDesk isn't installed yet, the skill tells your agent to point you to the download page (or offer to install it for you).
|
|
116
|
+
|
|
117
|
+
## Things to ask
|
|
118
|
+
|
|
119
|
+
- "123 456 789 is my office PC. How much space is left on C:, and how long has it been up?"
|
|
120
|
+
- "On that Mac, open a Chrome guest window, fill in this form and copy what the server sends back here as order.json."
|
|
121
|
+
- "Tail the service log on the robot computer and restart the service if it's stuck."
|
|
122
|
+
- "Copy notes.txt to its desktop and open it."
|
|
123
|
+
|
|
124
|
+
## How it works
|
|
125
|
+
|
|
126
|
+
`rds` never touches the network itself. It hands each command to the local RockDesk background service, which keeps one end-to-end encrypted connection per peer (QUIC, TLS 1.3) and reuses it for every later command: direct when NAT traversal works, through a relay otherwise. The relay only sees ciphertext.
|
|
127
|
+
|
|
128
|
+
The machine being controlled decides who gets in: click to allow, a one-time password, a fixed password, or a key pair shared across your own devices. Your agent can only do what that machine allows.
|
|
129
|
+
|
|
130
|
+
## Data handling
|
|
131
|
+
|
|
132
|
+
- Commands, files, screenshots and keystrokes go between your own machines over an end-to-end encrypted connection (QUIC, TLS 1.3). When there is no direct path they pass through a RockDesk relay, which only forwards ciphertext and stores nothing.
|
|
133
|
+
- The RockDesk server sees what it needs to connect devices and check licenses: device IDs, network addresses, and your account email if you log in. It does not see session content.
|
|
134
|
+
- The skill itself only runs the local `rds` command. It sends nothing to Anthropic or any other third party.
|
|
135
|
+
|
|
136
|
+
## Pricing
|
|
137
|
+
|
|
138
|
+
Each device gets a 10-day free trial. After that see [pricing](https://rockdesk.io/pricing.html).
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
|
|
142
|
+
The skill file, plugin manifests and README in this repository are MIT-licensed ([LICENSE](LICENSE)). RockDesk itself is proprietary software.
|
|
143
|
+
|
|
144
|
+
## 中文
|
|
145
|
+
|
|
146
|
+
**先在两台电脑上装好 RockDesk**(下载:[rockdesk.cn](https://rockdesk.cn/#download)):skill 只是教 AI 怎么用命令,真正干活的是 RockDesk。
|
|
147
|
+
|
|
148
|
+
RockDesk 让 Claude Code、Codex、DeepSeek Harness 这些 AI 直接操作你的另一台电脑:跑命令、传文件、截屏、点鼠标、敲键盘,按 ID 点对点连接,不用开端口、不用配 VPN。
|
|
149
|
+
|
|
150
|
+
安装 skill:在 Claude Code 里输入 `/plugin marketplace add rockdesk-io/rockdesk-skill` 和 `/plugin install rockdesk@rockdesk`,或者直接跟 AI 说「安装 https://rockdesk.io/rockdesk-cli.md 这个 skill」;Codex 用 `codex plugin marketplace add rockdesk-io/rockdesk-skill` 和 `codex plugin add rockdesk@rockdesk` 装成插件(或者上面那条 `$skill-installer` 命令);Gemini CLI 用 `gemini extensions install https://github.com/rockdesk-io/rockdesk-skill` 装成扩展;DeepSeek Harness(dsh)用 `dsh plugin --profile <你的 profile> add github:rockdesk-io/rockdesk-skill` 装成插件,或者把 `skills/rockd-remote-control/` 拷到 `~/.agents/skills/`(dsh 不读 `~/.claude/skills`);也可以用 `npx skills add rockdesk-io/rockdesk-skill` 一条命令装好。不想装 skill 也行,直接接 MCP:`claude mcp add -s user rockdesk -- rds mcp`(Codex 是 `codex mcp add rockdesk -- rds mcp`),skill 和 MCP 爱用哪个用哪个。两台电脑都要装 RockDesk,国内从 [rockdesk.cn](https://rockdesk.cn/#download) 下载;固定的最新版直链是 `https://rockdesk.cn/download/latest/<平台>`,平台写 windows、macos、macos-x86_64、linux-amd64、linux-arm64 或 android。
|
|
151
|
+
|
|
152
|
+
- **专题文档与实测**:[AI 远程控制总览](https://rockdesk.cn/ai-agents.html) · [Mac mini 双向 AI 中控指南](https://rockdesk.cn/mac-mini-remote.html) · [1-RTT 目录挂载对比 SSHFS(快 4.8–35 倍)](https://rockdesk.cn/vs-sshfs.html) · [远程串口 / USB / ARM64 / ESP32-S3](https://rockdesk.cn/remote-serial-usb.html)
|
|
153
|
+
- **macOS Homebrew 一行安装**:`brew tap rockdesk-io/tap && brew install --cask rockdesk`;TRAE / WorkBuddy / 千问等支持 Skill 或标准 stdio MCP 的客户端均可直接通过 `npx skills add rockdesk-io/rockdesk-skill` 或 `rds mcp` 接入。
|
|
154
|
+
|
|
155
|
+
### 常见问题
|
|
156
|
+
|
|
157
|
+
**AI 怎么远程控制另一台电脑?**
|
|
158
|
+
两台电脑都装 RockDesk,在本机的 AI 工具里接上 RockDesk(skill 或 MCP),然后直接用中文说,比如「连上 123456789,看看磁盘还剩多少,把 /var/log 里最近的错误整理给我」。AI 通过 RockDesk 的 `rds` 命令在那台电脑上跑命令、传文件、截屏、点鼠标、打字。两台电脑在不同网络、都没有公网 IP 也能连。
|
|
159
|
+
|
|
160
|
+
**DeepSeek 能远程控制电脑吗?DeepSeek Harness 有控制远程电脑的插件吗?**
|
|
161
|
+
能。DeepSeek Harness(dsh)装上 RockDesk 插件,就能按 ID 操作远程电脑:`dsh plugin --profile <你的 profile> add github:rockdesk-io/rockdesk-skill`(npm 包名 `dsh-plugin-rockdesk`)。
|
|
162
|
+
|
|
163
|
+
**Claude Code、Codex 怎么远程控制服务器,不想配 SSH?**
|
|
164
|
+
Claude Code:`claude mcp add -s user rockdesk -- rds mcp`;Codex:`codex mcp add rockdesk -- rds mcp`。服务器上装 RockDesk 就行(也支持没有桌面的 Linux 服务器),不用 sshd、不用开端口。
|
|
165
|
+
|
|
166
|
+
**有没有远程桌面的 MCP 服务器?**
|
|
167
|
+
`rds mcp` 是标准 stdio MCP 服务,18 个工具:shell、spawn、ls、copy、screenshot、click、move、scroll、type_text、key、clipboard_get、clipboard_set、forward 等。也可以用 `npx -y rockdesk-mcp`(npm)或 `uvx rockdesk-mcp`(PyPI)启动,它们会调用本机装好的 RockDesk。官方 MCP Registry 里的名字是 `io.rockdesk/rockdesk`。
|
|
168
|
+
|
|
169
|
+
**没有公网 IP,怎么远程桌面连回家里电脑?**
|
|
170
|
+
RockDesk 按 9 位 ID 连接:能打洞就点对点直连,打不通自动走中继,内容端到端加密(QUIC / TLS 1.3),不用内网穿透、不用自己搭服务器。
|
|
171
|
+
|
|
172
|
+
**Mac mini 放家里,怎么远程控制?**
|
|
173
|
+
Mac mini 上装 RockDesk,在外面用电脑或安卓手机输它的 ID 就能连:看桌面、开终端、传文件;它上面的 Claude Code / Codex 也能反过来操作你的其它电脑。见 [Mac mini 远程控制指南](https://rockdesk.cn/mac-mini-remote.html)。
|
|
174
|
+
|
|
175
|
+
**手机能远程控制电脑吗?**
|
|
176
|
+
安卓版 RockDesk 可以当遥控端,打开电脑的桌面或终端。
|
|
177
|
+
|
|
178
|
+
**怎么远程调试另一台电脑上的串口、USB 设备?**
|
|
179
|
+
`rds 123456789 serial /dev/ttyUSB0 115200` 把远程串口接成本机的虚拟串口(本机这头是 Linux 或 macOS);`rds 123456789 usb attach <busid>` 把远程 USB 设备接到本机(USB 转发支持 Linux 和 Windows)。见 [远程串口 / USB 调试指南](https://rockdesk.cn/remote-serial-usb.html)。
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# RockDesk(磐石远控)远程控制电脑插件:让 DeepSeek Harness、Claude Code、Codex、Gemini CLI 按 ID 操作另一台电脑
|
|
2
|
+
|
|
3
|
+
[English](README.md)
|
|
4
|
+
|
|
5
|
+
RockDesk 给每台电脑一个 9 位 ID,按 ID 点对点连接(打不通时自动走中继,内容端到端加密)。装上这个 skill / 插件 / MCP 服务器后,你本机的 AI 就能按 ID 在另一台电脑上:
|
|
6
|
+
|
|
7
|
+
- 跑命令,拿到真实退出码;或者起一个比这次调用活得长的后台任务
|
|
8
|
+
- 传文件、同步目录,或者把远程目录挂成本地文件夹
|
|
9
|
+
- 截屏给 AI 看,再点鼠标、打字、按快捷键
|
|
10
|
+
- 读写剪贴板、翻剪贴板历史
|
|
11
|
+
- 转发 TCP 端口、串口、USB 设备,或者开内网穿透进入对方的局域网
|
|
12
|
+
|
|
13
|
+
两台电脑都不需要公网 IP,不用开端口,不用配 VPN 或 SSH。
|
|
14
|
+
|
|
15
|
+
**先在两台电脑上都装好 RockDesk**(下载:[rockdesk.cn](https://rockdesk.cn/#download)):Windows、macOS(Apple 芯片和 Intel)、Linux(x86_64 和 arm64,也支持没有桌面的服务器)、安卓。这个仓库里的 skill 只是教 AI 怎么用命令,真正干活的是 RockDesk。
|
|
16
|
+
|
|
17
|
+
## 各 AI 工具怎么接入
|
|
18
|
+
|
|
19
|
+
| AI 工具 | 接入命令 |
|
|
20
|
+
|---|---|
|
|
21
|
+
| DeepSeek Harness(dsh) | `dsh plugin --profile <你的 profile> add github:rockdesk-io/rockdesk-skill`(npm 包名 `dsh-plugin-rockdesk`) |
|
|
22
|
+
| Claude Code | `claude mcp add -s user rockdesk -- rds mcp`,或 `/plugin install rockdesk --marketplace rockdesk-io/rockdesk-skill` |
|
|
23
|
+
| Codex | `codex mcp add rockdesk -- rds mcp`,或 `codex plugin marketplace add rockdesk-io/rockdesk-skill` |
|
|
24
|
+
| Gemini CLI | `gemini extensions install https://github.com/rockdesk-io/rockdesk-skill` |
|
|
25
|
+
| Trae、Cursor、Windsurf、千问、WorkBuddy 等 | `npx skills add rockdesk-io/rockdesk-skill`,或标准 stdio MCP:`{"command": "rds", "args": ["mcp"]}` |
|
|
26
|
+
| 只要 MCP 服务器 | `npx -y rockdesk-mcp`(npm)或 `uvx rockdesk-mcp`(PyPI),它们会调用本机装好的 RockDesk |
|
|
27
|
+
|
|
28
|
+
接好以后直接用中文说,例如:
|
|
29
|
+
|
|
30
|
+
- 「连上 123456789,看看磁盘还剩多少,把 /var/log 里最近的错误整理给我。」
|
|
31
|
+
- 「把 987654321 上的 /srv/app 挂到本地,修好配置后在那台上跑一遍测试。」
|
|
32
|
+
- 「截一张 123456789 的屏幕,点开设置页确认版本号。」
|
|
33
|
+
|
|
34
|
+
## AI 在远程电脑上能做什么
|
|
35
|
+
|
|
36
|
+
`rds mcp` 是标准的 stdio MCP 服务,提供 18 个工具:
|
|
37
|
+
|
|
38
|
+
| 类别 | 工具 |
|
|
39
|
+
|---|---|
|
|
40
|
+
| 设备 | status、devices、ping |
|
|
41
|
+
| 命令 | shell(带真实退出码)、spawn(后台长任务) |
|
|
42
|
+
| 文件 | ls、copy |
|
|
43
|
+
| 屏幕与键鼠 | info、screenshot、click、move、scroll、type_text、key |
|
|
44
|
+
| 剪贴板 | clipboard_get、clipboard_set |
|
|
45
|
+
| 端口 | forward、unforward |
|
|
46
|
+
|
|
47
|
+
命令行 `rds` 还能(skill 方式可用):把远程目录挂成本地文件夹(mount)、整目录同步(sync)、串口转发(serial)、USB 设备转发(usb,Linux 和 Windows)、内网穿透(vpn)。
|
|
48
|
+
|
|
49
|
+
## 安全:被控的那台说了算
|
|
50
|
+
|
|
51
|
+
- 谁能连进来由被控的那台决定:点「允许」、一次性密码、固定密码,或者你自己几台设备共用的密钥。
|
|
52
|
+
- 终端、文件、桌面、剪贴板、端口转发、串口、USB 可以分别开关,给 AI 只开需要的。
|
|
53
|
+
- 连接端到端加密(QUIC / TLS 1.3);没有直连路径时经中继转发,中继只转发密文、不存内容。
|
|
54
|
+
- 这个 skill 只调用本机的 `rds` 命令,不往任何第三方发数据。
|
|
55
|
+
|
|
56
|
+
## 常见问题
|
|
57
|
+
|
|
58
|
+
**AI 怎么远程控制另一台电脑?**
|
|
59
|
+
两台电脑都装 RockDesk,在本机的 AI 工具里接上 RockDesk(skill 或 MCP),然后直接用中文说要做什么。AI 通过 RockDesk 的 `rds` 命令在那台电脑上跑命令、传文件、截屏、点鼠标、打字。两台电脑在不同网络、都没有公网 IP 也能连。
|
|
60
|
+
|
|
61
|
+
**DeepSeek 能远程控制电脑吗?DeepSeek Harness 有控制远程电脑的插件吗?**
|
|
62
|
+
能。DeepSeek Harness 装上 RockDesk 插件,就能按 ID 操作远程电脑:`dsh plugin --profile <你的 profile> add github:rockdesk-io/rockdesk-skill`(npm 包名 `dsh-plugin-rockdesk`)。
|
|
63
|
+
|
|
64
|
+
**Claude Code、Codex 怎么远程控制服务器,不想配 SSH?**
|
|
65
|
+
Claude Code:`claude mcp add -s user rockdesk -- rds mcp`;Codex:`codex mcp add rockdesk -- rds mcp`。服务器上装 RockDesk 就行(也支持没有桌面的 Linux 服务器),不用 sshd、不用开端口。
|
|
66
|
+
|
|
67
|
+
**有没有远程桌面的 MCP 服务器?**
|
|
68
|
+
`rds mcp` 就是,18 个工具见上表。也可以用 `npx -y rockdesk-mcp` 或 `uvx rockdesk-mcp` 启动。官方 MCP Registry 里的名字是 `io.rockdesk/rockdesk`。
|
|
69
|
+
|
|
70
|
+
**没有公网 IP,怎么远程桌面连回家里电脑?**
|
|
71
|
+
RockDesk 按 9 位 ID 连接:能打洞就点对点直连,打不通自动走中继,内容端到端加密,不用内网穿透、不用自己搭服务器。
|
|
72
|
+
|
|
73
|
+
**Mac mini 放家里,怎么远程控制?**
|
|
74
|
+
Mac mini 上装 RockDesk,在外面用电脑或安卓手机输它的 ID 就能连:看桌面、开终端、传文件;它上面的 Claude Code / Codex 也能反过来操作你的其它电脑。见 [Mac mini 远程控制指南](https://rockdesk.cn/mac-mini-remote.html)。
|
|
75
|
+
|
|
76
|
+
**手机能远程控制电脑吗?**
|
|
77
|
+
安卓版 RockDesk 可以当遥控端,打开电脑的桌面或终端。
|
|
78
|
+
|
|
79
|
+
**怎么远程调试另一台电脑上的串口、USB 设备?**
|
|
80
|
+
`rds 123456789 serial /dev/ttyUSB0 115200` 把远程串口接成本机的虚拟串口(本机这头是 Linux 或 macOS);`rds 123456789 usb attach <busid>` 把远程 USB 设备接到本机(USB 转发支持 Linux 和 Windows)。见 [远程串口 / USB 调试指南](https://rockdesk.cn/remote-serial-usb.html)。
|
|
81
|
+
|
|
82
|
+
## 价格
|
|
83
|
+
|
|
84
|
+
每台新设备有 10 天免费试用,之后见 [价格页](https://rockdesk.cn/pricing.html)。
|
|
85
|
+
|
|
86
|
+
## 许可
|
|
87
|
+
|
|
88
|
+
本仓库里的 skill 文件、插件清单和 README 采用 MIT 许可([LICENSE](LICENSE));RockDesk 本身是专有软件。
|
|
Binary file
|
package/dsh/index.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// RockDesk skill for DeepSeek Harness (dsh): registers skills/rockd-remote-control/SKILL.md
|
|
2
|
+
// with ctx.skills, the same way dsh's own packaged skills do. A copy the user put in
|
|
3
|
+
// ~/.agents/skills or ~/.dsh/skills ranks higher and wins.
|
|
4
|
+
import { readFile } from 'node:fs/promises'
|
|
5
|
+
import { fileURLToPath } from 'node:url'
|
|
6
|
+
|
|
7
|
+
const SKILL_DIR = new URL('../skills/rockd-remote-control/', import.meta.url)
|
|
8
|
+
const SKILL_FILE = new URL('SKILL.md', SKILL_DIR)
|
|
9
|
+
const RESOURCE_BASE = { kind: 'directory', path: fileURLToPath(SKILL_DIR) }
|
|
10
|
+
const INVOCATION = { modelInvocable: true, userInvocable: true }
|
|
11
|
+
const PROVIDER = 'rockdesk'
|
|
12
|
+
const RANK = 600 // BUNDLED_SKILL_RANK in @deepseek-ai/dsh-skill
|
|
13
|
+
|
|
14
|
+
function parse (text) {
|
|
15
|
+
const m = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(text)
|
|
16
|
+
if (!m) throw new Error('rockdesk: SKILL.md has no frontmatter')
|
|
17
|
+
const fm = m[1]
|
|
18
|
+
const name = /^name:\s*([a-z0-9-]+)\s*$/m.exec(fm)?.[1]
|
|
19
|
+
let description
|
|
20
|
+
const folded = /^description:\s*>-?[ \t]*\r?\n((?:[ \t]+\S.*(?:\r?\n|$))+)/m.exec(fm)
|
|
21
|
+
if (folded) description = folded[1].split(/\r?\n/).map(l => l.trim()).filter(Boolean).join(' ')
|
|
22
|
+
else description = /^description:\s*(.+)$/m.exec(fm)?.[1].trim().replace(/^(["'])(.*)\1$/, '$2')
|
|
23
|
+
if (!name || !description) throw new Error('rockdesk: SKILL.md needs name and description')
|
|
24
|
+
return { name, description, content: text.slice(m[0].length) }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let loaded
|
|
28
|
+
const load = () => (loaded ??= readFile(SKILL_FILE, 'utf8').then(parse))
|
|
29
|
+
|
|
30
|
+
const provider = {
|
|
31
|
+
name: PROVIDER,
|
|
32
|
+
async list () {
|
|
33
|
+
const s = await load()
|
|
34
|
+
return [{
|
|
35
|
+
name: s.name,
|
|
36
|
+
description: s.description,
|
|
37
|
+
invocation: INVOCATION,
|
|
38
|
+
provider: PROVIDER,
|
|
39
|
+
source: 'bundled',
|
|
40
|
+
resourceBase: RESOURCE_BASE,
|
|
41
|
+
rank: RANK,
|
|
42
|
+
locator: SKILL_FILE.href,
|
|
43
|
+
}]
|
|
44
|
+
},
|
|
45
|
+
async get () {
|
|
46
|
+
const s = await load()
|
|
47
|
+
return {
|
|
48
|
+
name: s.name,
|
|
49
|
+
description: s.description,
|
|
50
|
+
invocation: INVOCATION,
|
|
51
|
+
provider: PROVIDER,
|
|
52
|
+
source: 'bundled',
|
|
53
|
+
resourceBase: RESOURCE_BASE,
|
|
54
|
+
content: s.content,
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const name = 'rockdesk-skill'
|
|
60
|
+
export const inject = ['skills']
|
|
61
|
+
|
|
62
|
+
export function apply (ctx) {
|
|
63
|
+
ctx.skills.registerProvider(() => provider)
|
|
64
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-rockdesk",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.19",
|
|
4
|
+
"description": "RockDesk 远程控制电脑插件:让 DeepSeek Harness(dsh)按 9 位 ID 控制另一台电脑——终端(真实退出码)、文件、截屏、键鼠、剪贴板、端口转发,点对点连接,不用公网 IP、不用开端口;两台电脑都要装 RockDesk(https://rockdesk.cn/#download)。RockDesk for DeepSeek Harness: lets dsh work on your other computers through RockDesk's rds command line — shell with real exit codes, files, screenshots, mouse and keyboard, clipboard, port forwarding. Peer-to-peer by 9-digit ID, no open ports. Needs the RockDesk app on both machines: https://rockdesk.io/#download",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dsh/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dsh/index.js",
|
|
9
|
+
"dsh/cordis.patch.yml",
|
|
10
|
+
"skills/rockd-remote-control/SKILL.md",
|
|
11
|
+
"assets/icon-128.png",
|
|
12
|
+
"README.zh.md"
|
|
13
|
+
],
|
|
14
|
+
"icon": "./assets/icon-128.png",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"dsh-plugin",
|
|
17
|
+
"dsh",
|
|
18
|
+
"deepseek-harness",
|
|
19
|
+
"agent-skills",
|
|
20
|
+
"remote-desktop",
|
|
21
|
+
"remote-access",
|
|
22
|
+
"rockdesk",
|
|
23
|
+
"rds",
|
|
24
|
+
"remote-control",
|
|
25
|
+
"mcp",
|
|
26
|
+
"deepseek",
|
|
27
|
+
"ai-agent",
|
|
28
|
+
"远程控制",
|
|
29
|
+
"远程桌面",
|
|
30
|
+
"远程控制电脑"
|
|
31
|
+
],
|
|
32
|
+
"homepage": "https://rockdesk.io",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/rockdesk-io/rockdesk-skill.git"
|
|
36
|
+
},
|
|
37
|
+
"author": "RockDesk <dev@rockdesk.io>",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"dsh": {
|
|
40
|
+
"bundle": {
|
|
41
|
+
"patch": "./dsh/cordis.patch.yml"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rockd-remote-control
|
|
3
|
+
description: >-
|
|
4
|
+
Control a remote computer with the RockDesk command line `rds`, by its
|
|
5
|
+
9-digit ID: shell, files (copy / sync / mount), screenshots, mouse and
|
|
6
|
+
keyboard, clipboard, port / serial / USB forwarding, 内网穿透 (VPN). Needs the
|
|
7
|
+
RockDesk app on both machines: if `rds` is missing, send the user to
|
|
8
|
+
https://rockdesk.io/#download first. Triggers: "RockDesk", "rds" with a
|
|
9
|
+
9-digit ID, "剪贴板历史", "内网穿透", "挂目录", "screenshot the remote", a 9-digit ID
|
|
10
|
+
plus an action, or any request to operate another machine.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# RockDesk CLI (`rds`) & Agent Skill
|
|
14
|
+
|
|
15
|
+
> **Needs the RockDesk app on both machines.** Download it at
|
|
16
|
+
> https://rockdesk.io/#download (in China: https://rockdesk.cn/#download).
|
|
17
|
+
|
|
18
|
+
RockDesk is a cross-platform remote-access tool. Its engine, rockd, comes as a
|
|
19
|
+
background daemon (`rockd`, also running inside the app), the app, and a
|
|
20
|
+
scriptable command line, `rds`, which lets an AI agent drive another machine
|
|
21
|
+
headlessly. Every machine has a 9-digit **ID** (shown in the app and by
|
|
22
|
+
`rds status`).
|
|
23
|
+
|
|
24
|
+
`rds` itself never touches the network. It hands each command to the local
|
|
25
|
+
rockd daemon. The daemon keeps one encrypted QUIC connection per peer and
|
|
26
|
+
reuses it for every later command. That connection goes direct when it can
|
|
27
|
+
punch through, and through the server's relay otherwise. The first command to
|
|
28
|
+
a peer takes a moment (connect, maybe authorize); the rest are near-instant.
|
|
29
|
+
No GUI window opens. Output and error messages are in Chinese.
|
|
30
|
+
|
|
31
|
+
## First: is RockDesk installed?
|
|
32
|
+
|
|
33
|
+
**Before your first `rds` command, check that RockDesk is installed and running
|
|
34
|
+
on this machine** (`rds status`, see the next section). This skill only teaches
|
|
35
|
+
the commands. The work is done by the RockDesk app, which must be installed and
|
|
36
|
+
running on **both** machines: this one (where `rds` runs) and every machine you
|
|
37
|
+
want to control.
|
|
38
|
+
|
|
39
|
+
- **Not installed here** (`rds` isn't found and there is no RockDesk app, or
|
|
40
|
+
`rds status` can't reach the background service after starting the app):
|
|
41
|
+
stop and tell the user, in their language, that this needs the RockDesk app
|
|
42
|
+
on this computer and on the one they want to control, and give them the
|
|
43
|
+
download page: **https://rockdesk.io/#download** (in China:
|
|
44
|
+
**https://rockdesk.cn/#download**). There are a Windows installer, Linux
|
|
45
|
+
.deb packages (x86_64: Ubuntu 20.04+, Debian 12+; arm64: Ubuntu 22.04+,
|
|
46
|
+
Debian 12+), macOS .dmg (Apple silicon or Intel) and an Android .apk.
|
|
47
|
+
Direct links that always point to the newest release (in China, use
|
|
48
|
+
rockdesk.cn instead of rockdesk.io in them):
|
|
49
|
+
- Windows: https://rockdesk.io/download/latest/windows (run the installer)
|
|
50
|
+
- macOS, Apple silicon: https://rockdesk.io/download/latest/macos; Intel:
|
|
51
|
+
https://rockdesk.io/download/latest/macos-x86_64 (open the .dmg, drag the
|
|
52
|
+
app into Applications and open it once)
|
|
53
|
+
- Linux x86_64: https://rockdesk.io/download/latest/linux-amd64; arm64:
|
|
54
|
+
https://rockdesk.io/download/latest/linux-arm64 (a .deb:
|
|
55
|
+
`curl -fL -o rockdesk.deb https://rockdesk.io/download/latest/linux-amd64 && sudo apt install ./rockdesk.deb`)
|
|
56
|
+
- Android: https://rockdesk.io/download/latest/android (an .apk)
|
|
57
|
+
|
|
58
|
+
You may offer to download and install it for them, but ask first. The version
|
|
59
|
+
and release notes are in https://rockdesk.io/rockd-latest.json. New devices
|
|
60
|
+
start with a free trial. The web version at https://rockdesk.io/web/ is for
|
|
61
|
+
people and has no `rds`.
|
|
62
|
+
- **On the machine to control:** RockDesk has to be installed there too. The
|
|
63
|
+
user reads its 9-digit ID in the app and decides how you may get in (see
|
|
64
|
+
Authorization below). A Linux machine without a screen:
|
|
65
|
+
`sudo systemctl enable --now rockd`, then `sudo rds otp` prints a one-time
|
|
66
|
+
password.
|
|
67
|
+
|
|
68
|
+
## Find `rds` and check that it works
|
|
69
|
+
|
|
70
|
+
`rds` is installed with RockDesk:
|
|
71
|
+
|
|
72
|
+
- Linux .deb: `/usr/bin/rds`
|
|
73
|
+
- Windows: `C:\Program Files\rockd\rds.exe`
|
|
74
|
+
- macOS app (1.0.3 and later): `/Applications/rockd.app/Contents/MacOS/rds`
|
|
75
|
+
- Source build: `target/release/rds`
|
|
76
|
+
|
|
77
|
+
- **Check:** `rds status` prints `本机 <name>(…) ID <ID> 服务器 已连`
|
|
78
|
+
followed by the live connections. If it says `连不上本机的 rockd(…):后台没起来?`,
|
|
79
|
+
the daemon is not running: start the RockDesk app, or with the .deb run
|
|
80
|
+
`systemctl --user start rockd`. On Windows it is the `rockd` system service.
|
|
81
|
+
- Put its path in a variable and always use it: `RDS=/path/to/rds`.
|
|
82
|
+
Everything below is written as `$RDS`.
|
|
83
|
+
- **Config dir** (identity, permissions, clipboard history): `~/.config/rockd/`.
|
|
84
|
+
On Windows it is `%APPDATA%\rockd`, or `C:\ProgramData\rockd` for the system
|
|
85
|
+
service; for the Linux system service it is `/var/lib/rockd` (root's `rds`
|
|
86
|
+
finds it, so run `sudo rds …` there). `--dir <dir>` or `$ROCKD_DIR` overrides it.
|
|
87
|
+
|
|
88
|
+
## For agents (read first)
|
|
89
|
+
|
|
90
|
+
- **Shell first, GUI second.** Anything doable in a shell, do with
|
|
91
|
+
`$RDS <id> shell -c "…"`: it is faster, deterministic and needs no
|
|
92
|
+
coordinates. Use mouse and keyboard only for GUI-only things.
|
|
93
|
+
- **Interactive `$RDS <id> shell` is for humans.** Agents always pass `-c`.
|
|
94
|
+
- **One command, one round trip.** Chain logic inside one `shell -c`
|
|
95
|
+
(`cd … && grep … | head`) rather than many calls.
|
|
96
|
+
- **GUI work: observe → act → verify.** Take a screenshot to a file, read the
|
|
97
|
+
image, find the pixel, act, then take another screenshot. Never click blind.
|
|
98
|
+
- **Permissions come from the peer.** If a command is refused, don't retry in a
|
|
99
|
+
loop. Tell the user what the peer has to allow (see Authorization).
|
|
100
|
+
- **Safety.**
|
|
101
|
+
- Only operate machines the user owns or is authorized to control.
|
|
102
|
+
- Before anything destructive or irreversible, say what you will run and get
|
|
103
|
+
confirmation. That includes deleting, overwriting, restarting services,
|
|
104
|
+
sending messages, `sync --delete`, and `clip history rm/clear`.
|
|
105
|
+
- Read-only inspection needs no confirmation.
|
|
106
|
+
- Never type the user's passwords or secrets into remote fields.
|
|
107
|
+
- Clipboard history can hold secrets (passwords, codes, tokens). Don't send
|
|
108
|
+
it to third-party services unless the user asked.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Machine & connection (本机、连接)
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
$RDS status [--json] This machine's name, ID and server state; LAN peers; every
|
|
116
|
+
live connection with its paths (direct / LAN / relay, RTT, loss).
|
|
117
|
+
$RDS <id> ping Connect if needed and measure:
|
|
118
|
+
"<id>(name):建连 N ms,往返 N ms,走 <direct|lan|relay> <addr>".
|
|
119
|
+
$RDS log [n] [--json] Connection log: who connected to me, whom I connected to, which
|
|
120
|
+
services, how long, direct or relayed.
|
|
121
|
+
$RDS wake <id|MAC> [--port 9] Wake-on-LAN magic packet (needs a MAC this machine saw on the LAN).
|
|
122
|
+
$RDS login <email> | logout | devices [--json] | account
|
|
123
|
+
Account (email-code login); devices on the same account; license.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
`<id>` may also be `IP:port`, `[IPv6]:port` or `host:port` to connect directly
|
|
127
|
+
without the server. The peer asks for confirmation or a password the first
|
|
128
|
+
time.
|
|
129
|
+
|
|
130
|
+
## Authorization (谁能连我)
|
|
131
|
+
|
|
132
|
+
The **peer** decides. There is no per-ID allow list (an ID alone is not proof).
|
|
133
|
+
A host offers up to three ways, any combination:
|
|
134
|
+
|
|
135
|
+
1. **Allow when someone connects.** Someone at the peer clicks "allow"; it
|
|
136
|
+
covers that one connection. `rds` keeps retrying every 2 s while it waits.
|
|
137
|
+
2. **One-time password.** Shown on the peer's home page (or `$RDS otp` run on
|
|
138
|
+
the peer); it changes after each use.
|
|
139
|
+
3. **Fixed password and / or key pair (either or both):**
|
|
140
|
+
- *Fixed password:* anyone who knows it can connect. Give it with
|
|
141
|
+
`$RDS <id> auth` (prompts once) or `RDS_PASSWORD=… $RDS <id> …`; it is
|
|
142
|
+
remembered (`keys.json`, not plaintext) until the peer changes it.
|
|
143
|
+
- *Key pair (like ssh):* every device holding the same key connects to the
|
|
144
|
+
others without a password. On one device `$RDS key gen`; then
|
|
145
|
+
`$RDS key export` there and `$RDS key import "<that line>"` on each of
|
|
146
|
+
your other devices. A device holding the key signs a challenge bound to
|
|
147
|
+
the connection automatically when refused. (Extra keys or single devices
|
|
148
|
+
can also be listed in the peer's `authorized_keys`, see
|
|
149
|
+
`$RDS authorize`.)
|
|
150
|
+
|
|
151
|
+
What you can use: everything with the key pair, or when your device is on the
|
|
152
|
+
same RockDesk account and proved a password. Otherwise only the features the peer
|
|
153
|
+
enabled (`$RDS config` there shows them).
|
|
154
|
+
|
|
155
|
+
**Machines without a screen** (servers, robots, dev boards; Linux .deb 1.0.10+):
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
sudo systemctl enable --now rockd # system service: starts at boot, config in /var/lib/rockd
|
|
159
|
+
sudo rds status # this machine's ID
|
|
160
|
+
sudo rds otp # its current one-time password (sudo rds otp new: a fresh one)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- There, people who come in with the one-time password may also use the
|
|
164
|
+
terminal and port forwarding (file transfer was already on), and "allow when
|
|
165
|
+
someone connects" is off (nobody is there to click).
|
|
166
|
+
- Fixed password: `sudo rds passwd` (prompts twice; `--clear` removes it).
|
|
167
|
+
- Key pair, like ssh: on your own computer `$RDS key gen` once (later `$RDS key`
|
|
168
|
+
prints the same public line); on the headless machine
|
|
169
|
+
`sudo rds authorize "<that line>"`. Your computer then gets in with no
|
|
170
|
+
password and can use everything.
|
|
171
|
+
- What others may use: `sudo rds config` lists it;
|
|
172
|
+
`sudo rds config feature <shell|file|fwd|mount|vpn|serial|usb|…> on|off`
|
|
173
|
+
changes it; `sudo rds config otp off` / `ask on` switch the one-time password
|
|
174
|
+
/ the allow dialog.
|
|
175
|
+
- With a one-time password, prove it once (`RDS_PASSWORD=… $RDS <id> shell -c …`
|
|
176
|
+
or `$RDS <id> auth`); later commands on the same connection don't need it again.
|
|
177
|
+
|
|
178
|
+
Setting up a host from the command line (no GUI needed): on a machine without
|
|
179
|
+
a screen use the system service above. On a desktop you can also run the
|
|
180
|
+
per-user daemon without the app: `systemctl --user enable --now rockd` (plus
|
|
181
|
+
`sudo loginctl enable-linger $USER`, so it keeps running after you log out).
|
|
182
|
+
The first start writes a default config: the official server, one-time
|
|
183
|
+
password on. `$RDS status` shows the ID; `$RDS otp` prints the current
|
|
184
|
+
one-time password (`$RDS otp new` makes another). For lasting access:
|
|
185
|
+
`$RDS passwd` (fixed password) and / or `$RDS key gen | import | export | clear`
|
|
186
|
+
(key pair); both work immediately. `$RDS config` shows / changes the rest
|
|
187
|
+
(`ask on|off`, `otp on|off`, `feature <name> on|off`, `name`, `port`,
|
|
188
|
+
`term-keep`); `$RDS login <email>`.
|
|
189
|
+
|
|
190
|
+
A refusal says what is missing (password, a click, a feature that is off).
|
|
191
|
+
Don't guess passwords. If you're refused, report which of these is missing.
|
|
192
|
+
|
|
193
|
+
## Terminal (终端)
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
$RDS <id> shell -c "<command>"
|
|
197
|
+
Run one command in the peer's login shell. Prints stdout+stderr and exits with the remote
|
|
198
|
+
command's exit code, so `&&`, `||` and `if` work like ssh. Piped local stdin is forwarded:
|
|
199
|
+
cat data.csv | $RDS <id> shell -c "wc -l"
|
|
200
|
+
No timeout: a long build runs to the end (wrap with a local `timeout` if you need one).
|
|
201
|
+
Unix peers run it with `$SHELL -lc` (profile sourced: PATH, conda …). Windows peers run it with
|
|
202
|
+
`powershell -NoProfile -NonInteractive -Command`, so use PowerShell syntax there; the exit code
|
|
203
|
+
of a failing external program still comes back.
|
|
204
|
+
$RDS <id> spawn "<command>"
|
|
205
|
+
Start a detached process on the peer that outlives the call (servers, long jobs):
|
|
206
|
+
→ spawned pid 12345 · log: <path of its log file>
|
|
207
|
+
$RDS <id> shell Interactive TTY for a human (ConPTY on Windows).
|
|
208
|
+
$RDS <id> shell --list [--json] Sessions the peer keeps after a disconnect (30 min by default).
|
|
209
|
+
$RDS <id> shell --attach <n> Reattach to a session (replays what you missed).
|
|
210
|
+
$RDS <id> shell --close <n> Close a session.
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
- **Windows peers running the rockd service** (the installer's default): `shell` and `spawn`
|
|
214
|
+
run inside the service, as SYSTEM in session 0, not in the signed-in user's desktop session.
|
|
215
|
+
A GUI program started there never appears on screen, and `~`, Desktop and `%APPDATA%` are
|
|
216
|
+
SYSTEM's, so use full paths such as `C:\Users\<name>\Desktop`. To open a program or a URL on
|
|
217
|
+
the user's desktop, use the keyboard: `$RDS <id> key win+r`, then
|
|
218
|
+
`$RDS <id> type "msedge https://example.com"`, `$RDS <id> key Return`, and take a screenshot.
|
|
219
|
+
|
|
220
|
+
## Files (文件)
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
$RDS <id> cp <src> <dst>
|
|
224
|
+
Exactly one side is the peer's, prefixed with ':'.
|
|
225
|
+
upload: $RDS <id> cp ./a.tgz :/home/u/a.tgz
|
|
226
|
+
download: $RDS <id> cp :/etc/hosts ./hosts
|
|
227
|
+
Folders are copied recursively (scp rules). Re-running an interrupted copy of a file of 8 MB or
|
|
228
|
+
more resumes where it stopped.
|
|
229
|
+
$RDS <id> sync [--delete] [--dry-run] <src> <dst>
|
|
230
|
+
One-way folder sync (one side ':'-prefixed). Only missing or changed files go over (size +
|
|
231
|
+
mtime); a second run transfers nothing. --delete removes destination files the source lacks.
|
|
232
|
+
$RDS <id> ls [path] [--json] List a peer directory (default ~).
|
|
233
|
+
$RDS <id> send <file>... Drop files into the peer's Downloads AND put them on its clipboard,
|
|
234
|
+
so the person there just pastes. Prints the remote paths; same
|
|
235
|
+
names are renamed, not overwritten.
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
`cp` is for one-shot transfers (faster for big files). `mount` is for working
|
|
239
|
+
inside the remote tree.
|
|
240
|
+
|
|
241
|
+
## Mount a remote folder (挂目录)
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
$RDS <id> mount :/remote/dir <local_dir>
|
|
245
|
+
Mount the peer's directory at <local_dir>, read-write. Tools, editors and builds see an
|
|
246
|
+
ordinary folder.
|
|
247
|
+
On Windows <local_dir> may be a drive letter: `Z:`, or `*:` for any free one.
|
|
248
|
+
$RDS [<id>] umount <local_dir> Unmount (only what you mounted — the user may be using theirs).
|
|
249
|
+
$RDS mount [--json] What this machine has mounted.
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
- Clients: Linux kernel FUSE (the mount point can't be on NTFS); macOS needs
|
|
253
|
+
nothing (rockd serves the folder to the system's NFS client on 127.0.0.1);
|
|
254
|
+
Windows uses Dokany, which the RockDesk installer includes.
|
|
255
|
+
- The peer must allow `mount`.
|
|
256
|
+
- All mounts to one peer share its single connection.
|
|
257
|
+
|
|
258
|
+
## Clipboard (剪贴板)
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
$RDS <id> clip Print the peer's clipboard text. If it holds an image, the image
|
|
262
|
+
is saved as rockd-clip-<time>.png (RDS_CLIP_OUT=<file> to choose).
|
|
263
|
+
$RDS <id> clip set "<text>" Put text on the peer's clipboard (no text: read it from stdin).
|
|
264
|
+
$RDS <id> clip set --image a.png Put an image on it.
|
|
265
|
+
$RDS <id> clip sync Keep both clipboards in sync until Ctrl-C (for humans).
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Alternative spellings also work: `clipboard get | set <text> |
|
|
269
|
+
get-image [file] | set-image <file>`.
|
|
270
|
+
|
|
271
|
+
## Clipboard history (剪贴板历史)
|
|
272
|
+
|
|
273
|
+
What the daemon records:
|
|
274
|
+
|
|
275
|
+
- **What counts as an entry.** Each copy is one entry, text or image, newest
|
|
276
|
+
first. Copying the same content again moves it to the top instead of adding
|
|
277
|
+
a new entry.
|
|
278
|
+
- **Where it came from.** Every entry notes whether it was received from a peer
|
|
279
|
+
and which peers it was sent to.
|
|
280
|
+
- **Limits.** Up to 300 entries; images 200 MB in total; text 1 MB per entry.
|
|
281
|
+
- **Storage.** It stays on that machine, in `clip_history/` under the config
|
|
282
|
+
dir.
|
|
283
|
+
- **Phones** don't record their own clipboard.
|
|
284
|
+
- **Recording can be off.** Then nothing new is recorded, and what was copied
|
|
285
|
+
while it was off isn't added later.
|
|
286
|
+
|
|
287
|
+
Without `<id>` a command works on **this machine's** history. With `<id>` it
|
|
288
|
+
works on the **peer's** history; the peer must allow `clip`. An older peer
|
|
289
|
+
answers that it has no history yet.
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
$RDS [<id>] clip history [-n N] List the newest N (default 100):
|
|
293
|
+
"#<n> time 文字/图片 size 从 X 收到 / 发给过 Y",
|
|
294
|
+
then the first 100 characters.
|
|
295
|
+
$RDS [<id>] clip history --json [-n N] Same, as JSON, with the full text of every entry
|
|
296
|
+
(agents: prefer this). Fields: id, t (Unix ms), kind
|
|
297
|
+
(text|image), text, truncated, w, h, bytes, from, from_name,
|
|
298
|
+
sent_to, sent_to_names, thumb (base64 PNG, images only).
|
|
299
|
+
$RDS [<id>] clip history --md Export everything as Markdown for an LLM.
|
|
300
|
+
$RDS [<id>] clip history list <n>... --md
|
|
301
|
+
Export just those entries.
|
|
302
|
+
$RDS [<id>] clip history show <n> [-o file]
|
|
303
|
+
One entry in full: text to stdout (or into a file); an
|
|
304
|
+
image needs -o file.png.
|
|
305
|
+
$RDS [<id>] clip history rm <n>... Delete entries. (confirm first)
|
|
306
|
+
$RDS [<id>] clip history clear Delete all. (confirm first)
|
|
307
|
+
$RDS clip history copy <n> Put this machine's entry back on this machine's clipboard.
|
|
308
|
+
$RDS clip history on | off Start / stop recording on this machine.
|
|
309
|
+
$RDS <id> clip history send <n> Put entry <n> of THIS machine's history on the peer's clipboard.
|
|
310
|
+
$RDS <id> clip history take <n> Put the peer's entry <n> on this machine's clipboard.
|
|
311
|
+
$RDS <id> clip history restore <n> Put the peer's entry <n> back on the peer's own clipboard.
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
What the `--md` export contains:
|
|
315
|
+
|
|
316
|
+
- A short instruction block at the top, asking the model to drop duplicates and
|
|
317
|
+
noise, group entries by topic, format them, and end with a summary of what
|
|
318
|
+
the user was doing and what needs follow-up.
|
|
319
|
+
- Every entry in order: time, source, and the text in a fenced block. Images
|
|
320
|
+
appear as a size line only.
|
|
321
|
+
- At most 2 MB.
|
|
322
|
+
|
|
323
|
+
When the user asks you to "整理 / 总结剪贴板", export, read the file, and do
|
|
324
|
+
what the header says. Write the result for the user and don't paste raw
|
|
325
|
+
secrets back.
|
|
326
|
+
|
|
327
|
+
## Screen, mouse, keyboard (屏幕、鼠标、键盘)
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
$RDS <id> info Displays: index, W×H, position, name, primary/default.
|
|
331
|
+
$RDS <id> screenshot [-o f.png] [-d n] [-R x,y,w,h] Save a PNG (default rds-shot-<time>.png); prints
|
|
332
|
+
the path and size. Then read the image.
|
|
333
|
+
$RDS <id> click X Y [--right] [--double] [-d n] Click at pixel X,Y from the display's top-left.
|
|
334
|
+
$RDS <id> move X Y [-d n]
|
|
335
|
+
$RDS <id> type "<text>" Type into the focused field (click it first). Any Unicode.
|
|
336
|
+
$RDS <id> key <combo> A key or chord, e.g. Return, Escape, ctrl+c, cmd+s, alt+F4.
|
|
337
|
+
$RDS <id> scroll DX DY Wheel notches; DY > 0 scrolls down.
|
|
338
|
+
$RDS <id> desktop [--view-only] [--display :0] [--no-open]
|
|
339
|
+
Open the peer's desktop in a local browser page (prints
|
|
340
|
+
its URL). This is for humans.
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
- **`-d`** picks a display by its `info` index or name. Coordinates are then
|
|
344
|
+
counted from that display's top-left.
|
|
345
|
+
- **`key` names:**
|
|
346
|
+
- Return/Enter, Tab, Escape, Backspace, Delete, Space.
|
|
347
|
+
- Up, Down, Left, Right, Home, End, PageUp, PageDown, Insert.
|
|
348
|
+
- F1–F24, and single letters and digits.
|
|
349
|
+
- Modifiers: `ctrl+`, `shift+`, `alt+`/`option+`, and `cmd+`/`win+`/`super+`
|
|
350
|
+
(⌘ on macOS, the Windows key on Windows).
|
|
351
|
+
- **Android peers:**
|
|
352
|
+
- The RockDesk app must have its accessibility service ("被远程点屏幕") turned
|
|
353
|
+
on. `info` says whether it is.
|
|
354
|
+
- A right click is a long press.
|
|
355
|
+
- `type` fills the focused input box.
|
|
356
|
+
- `key` also takes back / home / recents.
|
|
357
|
+
|
|
358
|
+
## Port forwarding (端口转发)
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
$RDS <id> forward <local>:[<host>:]<port>
|
|
362
|
+
Listen on 127.0.0.1:<local> and tunnel each connection to <host>:<port> as seen from the peer.
|
|
363
|
+
<host> defaults to the peer itself and is resolved there, so peer-only hostnames work.
|
|
364
|
+
$RDS <id> forward 15432:db.internal:5432
|
|
365
|
+
Returns immediately: the daemon holds the listener until `unforward` or until rockd stops.
|
|
366
|
+
$RDS <id> forward List running forwards.
|
|
367
|
+
$RDS <id> unforward <local> Stop one.
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
The peer must allow `fwd`.
|
|
371
|
+
|
|
372
|
+
## VPN / 内网穿透
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
$RDS <id> vpn up [--route <cidr>]... A virtual NIC on each side: this machine 10.77.0.2, the peer
|
|
376
|
+
10.77.0.1. --route also sends those subnets (e.g. the peer's
|
|
377
|
+
LAN) through it.
|
|
378
|
+
$RDS <id> vpn up --exit [--bypass <cidr>]...
|
|
379
|
+
Use the peer as the internet exit: this machine's traffic
|
|
380
|
+
goes out through the peer (the peer must allow `exit`).
|
|
381
|
+
Linux: the LAN, connections coming into this machine (ssh)
|
|
382
|
+
and --bypass networks stay off the tunnel; DNS goes to the
|
|
383
|
+
peer when systemd-resolved is running.
|
|
384
|
+
$RDS <id> vpn down
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
- The peer must allow `vpn`.
|
|
388
|
+
- Without root, Linux and macOS need the rockd helper to create the NIC. It is
|
|
389
|
+
installed from the app's settings. `--exit` on Linux needs the current helper
|
|
390
|
+
(protocol 3); an older one is reported as old, with how to update it.
|
|
391
|
+
- In the Chinese UI this feature is called 内网穿透.
|
|
392
|
+
|
|
393
|
+
## Serial ports & USB (串口、USB)
|
|
394
|
+
|
|
395
|
+
```
|
|
396
|
+
$RDS <id> serial list [--json] The peer's serial ports.
|
|
397
|
+
$RDS <id> serial <port> [baud] [--local <path>] A local virtual serial port wired to the peer's
|
|
398
|
+
port (default 115200 8N1); prints the local path.
|
|
399
|
+
Baud changes made by the local program follow over.
|
|
400
|
+
$RDS serial | serial list | unserial <local path>
|
|
401
|
+
Running forwards / this machine's ports / stop one.
|
|
402
|
+
$RDS <id> usb list [--json] The peer's USB devices (with busid).
|
|
403
|
+
$RDS <id> usb attach <busid> Attach one here (USB/IP).
|
|
404
|
+
$RDS usb | usb list | usb detach <n|busid> Attached devices / this machine's devices / detach.
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
- The local end of a serial forward must be Linux or macOS.
|
|
408
|
+
- USB is Linux only, and both sides need the rockd helper.
|
|
409
|
+
- The peer must allow `serial` or `usb`.
|
|
410
|
+
|
|
411
|
+
## Recipes
|
|
412
|
+
|
|
413
|
+
- **Is the peer reachable, and on which path?** `$RDS <id> ping`
|
|
414
|
+
- **Inspect a server:** `$RDS <id> shell -c "uname -a; uptime; df -h /; free -h"`
|
|
415
|
+
- **Fetch a log:** `$RDS <id> cp :/var/log/syslog ./syslog`
|
|
416
|
+
- **Run something long:** `$RDS <id> spawn "cd ~/proj && make -j8"`, then
|
|
417
|
+
`$RDS <id> shell -c "tail -20 <log>"`.
|
|
418
|
+
- **Summarize what the user copied on another machine:**
|
|
419
|
+
`$RDS <id> clip history --md > clip.md`, then read `clip.md` and summarize.
|
|
420
|
+
- **Re-send an older clipboard item:** run `$RDS clip history`, find `#n`, then
|
|
421
|
+
`$RDS <id> clip history send n`.
|
|
422
|
+
- **Get a screenshot of the peer:** `$RDS <id> screenshot -o shot.png`, then
|
|
423
|
+
read `shot.png`.
|
|
424
|
+
|
|
425
|
+
## Installing this skill, or using MCP instead
|
|
426
|
+
|
|
427
|
+
**Install this skill:** save this file unchanged as `SKILL.md` in a folder named
|
|
428
|
+
`rockd-remote-control` inside your agent's skills folder:
|
|
429
|
+
|
|
430
|
+
- Claude Code: `~/.claude/skills/rockd-remote-control/SKILL.md`
|
|
431
|
+
- Gemini CLI: `~/.gemini/skills/rockd-remote-control/SKILL.md`
|
|
432
|
+
- DeepSeek Harness (`dsh`), Codex and other agents that read the shared folder:
|
|
433
|
+
`~/.agents/skills/rockd-remote-control/SKILL.md` (Windows:
|
|
434
|
+
`%USERPROFILE%\.agents\skills\rockd-remote-control\SKILL.md`). dsh does not
|
|
435
|
+
read `~/.claude/skills`.
|
|
436
|
+
|
|
437
|
+
**Right after installing the skill, check RockDesk itself** (see "First: is RockDesk
|
|
438
|
+
installed?" at the top): if `rds` is not there yet, tell the user the skill needs the
|
|
439
|
+
RockDesk app on both machines and give them https://rockdesk.io/#download (in China:
|
|
440
|
+
https://rockdesk.cn/#download). Without RockDesk the skill can do nothing.
|
|
441
|
+
|
|
442
|
+
**Or connect it as an MCP server:** `rds mcp` (1.0.3 and later) is an MCP server over
|
|
443
|
+
stdio with the same abilities as tools: `status`, `devices`, `ping`, `shell`, `spawn`,
|
|
444
|
+
`ls`, `copy`, `info`, `screenshot`, `click`, `move`, `scroll`, `type_text`, `key`,
|
|
445
|
+
`clipboard_get`, `clipboard_set`, `forward`, `unforward`. Screenshots come back as
|
|
446
|
+
images (long edge ≤ 1280 px) and click coordinates are read off the latest
|
|
447
|
+
screenshot. When the MCP tools are available, use them; this document still
|
|
448
|
+
explains what each one does.
|
|
449
|
+
|
|
450
|
+
- Claude Code: `claude mcp add -s user rockdesk -- rds mcp`
|
|
451
|
+
- Codex: `codex mcp add rockdesk -- rds mcp`
|
|
452
|
+
- Gemini CLI, Cursor, Claude Desktop and other MCP clients: an stdio server whose
|
|
453
|
+
command is `rds` and args `["mcp"]`, e.g.
|
|
454
|
+
`{"mcpServers": {"rockdesk": {"command": "rds", "args": ["mcp"]}}}`
|
|
455
|
+
- `rds` is not on the PATH on macOS and Windows: use
|
|
456
|
+
`/Applications/rockd.app/Contents/MacOS/rds` or `C:\Program Files\rockd\rds.exe`.
|