# @yefengr/remote-pi（已停止维护）

本包已停止维护，请改用 [`@yefengr/pi-reach`](https://www.npmjs.com/package/@yefengr/pi-reach)。English version below.

## 迁移到 @yefengr/pi-reach

1. 移除旧扩展。不确定当初的安装方式时，先用 `pi list` 查看；项目级安装需要加 `-l`。

   ```bash
   pi remove npm:@yefengr/remote-pi
   ```

2. 安装新扩展：

   ```bash
   pi install npm:@yefengr/pi-reach
   ```

3. 重新配对。新扩展使用独立的身份与配对数据（`~/.pi/pi-reach`），不会读取旧数据；命令也从 `/remote-pi` 改为 `/pi-reach`。启动 Pi 后运行 `/pi-reach pair`，然后在 <https://pi-reach.yefengr.cn/app> 扫描二维码或输入配对码。

完整说明见 [`@yefengr/pi-reach`](https://www.npmjs.com/package/@yefengr/pi-reach)。

## 可选：停用旧版的后台服务

较早的版本可能安装过 supervisor 后台服务。如果装过，可以按系统停用。

macOS：

```bash
launchctl bootout "gui/$(id -u)" "$HOME/Library/LaunchAgents/dev.remotepi.supervisord.plist" 2>/dev/null || launchctl unload "$HOME/Library/LaunchAgents/dev.remotepi.supervisord.plist"
rm -f "$HOME/Library/LaunchAgents/dev.remotepi.supervisord.plist"
```

Linux：

```bash
systemctl --user disable --now remote-pi-supervisord.service
rm -f "$HOME/.config/systemd/user/remote-pi-supervisord.service"
systemctl --user daemon-reload
```

Windows（PowerShell）：

```powershell
schtasks /End /TN "RemotePiSupervisor"
schtasks /Delete /TN "RemotePiSupervisor" /F
```

旧版还可能留下 `~/.local/bin/pi-supervisord`，不需要时可以删除。旧数据保存在 `~/.pi/remote`，新扩展不会使用；确认不再需要旧版后，可以自行删除。

---

# @yefengr/remote-pi (no longer maintained)

This package is no longer maintained. Use [`@yefengr/pi-reach`](https://www.npmjs.com/package/@yefengr/pi-reach) instead.

## Migrating to @yefengr/pi-reach

1. Remove the old Extension. If you are not sure how it was installed, check with `pi list` first; add `-l` for a project-level install.

   ```bash
   pi remove npm:@yefengr/remote-pi
   ```

2. Install the new Extension:

   ```bash
   pi install npm:@yefengr/pi-reach
   ```

3. Pair again. The new Extension keeps its own identity and pairing data (`~/.pi/pi-reach`) and does not read the old data; the command changes from `/remote-pi` to `/pi-reach`. Start Pi, run `/pi-reach pair`, then scan the QR code or type the pairing code at <https://pi-reach.yefengr.cn/app>.

See [`@yefengr/pi-reach`](https://www.npmjs.com/package/@yefengr/pi-reach) for the full documentation.

## Optional: stop the old background service

Older releases could have installed a supervisor background service. If you installed it, stop it for your platform.

macOS:

```bash
launchctl bootout "gui/$(id -u)" "$HOME/Library/LaunchAgents/dev.remotepi.supervisord.plist" 2>/dev/null || launchctl unload "$HOME/Library/LaunchAgents/dev.remotepi.supervisord.plist"
rm -f "$HOME/Library/LaunchAgents/dev.remotepi.supervisord.plist"
```

Linux:

```bash
systemctl --user disable --now remote-pi-supervisord.service
rm -f "$HOME/.config/systemd/user/remote-pi-supervisord.service"
systemctl --user daemon-reload
```

Windows (PowerShell):

```powershell
schtasks /End /TN "RemotePiSupervisor"
schtasks /Delete /TN "RemotePiSupervisor" /F
```

Older releases may also have left `~/.local/bin/pi-supervisord`, which you can delete if you no longer need it. The old data lives in `~/.pi/remote` and is not used by the new Extension; delete it yourself once you no longer need the old version.
