Oyama-Mahiro-F/dsh-env-switcher ↗★ 0
dsh-env-switcher
用于 DSH 网页 GUI 的 Windows/WSL 环境切换器(共存模式)。
AI 分析
核心用途是在 Windows 宿主机与 WSL2 Linux 子系统双 DSH 环境之间进行一键无缝切换。适合在 Windows 下开发但需要在 Linux 环境中运行和测试代码的混合环境开发者。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Oyama-Mahiro-F/dsh-env-switcher说明文档
阅读完整 README ↗⚙️ Configuration
All fields are optional; the defaults fit a typical Windows + WSL2 machine:
## 🎯 Usage
### Switch from the web UI
1. The **「环境」** tab appears in the tab bar above the conversation (alongside 「对话」/「轨迹」 etc.)
2. Open it to see the `| Windows | WSL |` selector and the current environment indicator
3. Click a target environment → the current tab navigates automatically (the target server is ensured to be running first)
There is also a mini **「运行环境」** switcher at the bottom of the left sidebar (hidden when the sidebar is collapsed).
### Host API
| Endpoint | Description |
|---|---|
| `GET /env/api/state` | Returns `{ env, ownUrl, peerUrl }` (current environment and both URLs) |
| `GET /env/api/switch?target=windows\|wsl` | Ensures the target server is running (no kills, no browser popup); the client navigates itself |
### Desktop shortcuts (optional)
A standalone shortcut script ships alongside the plugin (decoupled, in the `scripts/` dir):
```powershell