momo20012002/dsh-hmos-emulator 预览 preview

momo20012002/dsh-hmos-emulator

- 启动 / 停止模拟器:启动或停止鸿蒙模拟器,列出可用实例与在线设备。 - 选择应用项目:文件浏览或扫描,识别鸿蒙工程。 - 构建并部署:将选定工程构建、安装并启动到目标设备,自动识别多入口模块。 - 部署实时输出:构建 / 安装 / 启动过程实时输出。 - 就绪检测:模拟器冷启动后检测设备是否上线。

catalog descriptioncatalog 简介 / catalog description:DSH better-sidebar 侧边栏标签页:一键启动鸿蒙模拟器、构建并部署 HarmonyOS 应用到模拟器。

Project Overview项目介绍

This is a native DeepSeek Harness plugin that adds a dedicated HarmonyOS emulator tab to the dsh-better-sidebar extension. It is built exclusively for DSH, so it can only be installed and run within a working DeepSeek Harness environment. The core features it provides include starting and stopping local HarmonyOS emulator instances, listing available running devices, scanning or browsing the local file system to find HarmonyOS application projects, and building and deploying selected projects directly to the running target emulator. It also outputs real-time build logs and automatically checks if a cold-started emulator is ready to accept connections.

The plugin is targeted at developers who build OpenHarmony or HarmonyOS applications using DeepSeek Harness as their primary AI agent development environment. To start using it after installation, you simply open the add menu in the DSH better sidebar, select the new HarmonyOS Emulator tab, scan for available local emulator instances, start your target device, select your application project, and trigger a build and deploy with one click. It also exposes six AI-callable tools that let your DeepSeek AI agent trigger emulator controls, deploy actions, lint checks, log queries, and documentation searches directly from chat.

The plugin has several required pre-requisites that you need to set up before installation. You must have a working DeepSeek Harness web instance, Node.js 22 or newer, pnpm 10 or newer, the dsh-better-sidebar extension, and either DevEco Studio for Windows and macOS or the DevEco Command Line Tools 26.0.0 or newer for Linux. There are three installation methods available: install via npm through the DSH CLI, install directly from GitHub via the DSH CLI, or clone the repository locally for development work. It is released under the open source MIT license, free for use and modification.

这是一个专为 DeepSeek Harness 开发的原生侧边栏插件,会在 dsh-better-sidebar 中新增「鸿蒙模拟器」标签页。它的核心功能包括启动、停止鸿蒙模拟器,列出可用实例与在线设备,扫描或浏览文件系统选择 HarmonyOS 应用工程,将选中工程构建、安装并启动到目标设备,输出构建部署过程的实时日志,还会在模拟器冷启动后检测设备是否就绪。

本插件面向使用 DeepSeek Harness 开发 HarmonyOS/OpenHarmony 应用的开发者,简化了鸿蒙应用开发的模拟器管理和部署流程。常规使用流程为:安装完成后,打开侧边栏的加号菜单,选择「鸿蒙模拟器」标签页,扫描列出可用模拟器并启动,选择目标工程后点击构建部署即可完成全流程。插件还向 AI 提供了六个可直接在对话中触发的工具,覆盖模拟器操作、部署、日志查询等场景。

本插件依赖 dsh-better-sidebar,还需要提前安装好 DevEco Studio(Linux 平台使用鸿蒙命令行工具)、Node.js 22 以上版本、pnpm 10 以上,以及 devecocli 命令行工具(也可在插件面板一键安装)。支持 Windows、macOS 全流程使用,Linux 仅支持命令行工具提供的模拟器,采用 MIT 许可证开源,可免费使用修改。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-hmos-emulator

把 momo20012002/dsh-hmos-emulator 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

鸿蒙模拟器 · dsh-hmos-emulator

DeepSeek Harness 侧边栏插件:在面板中启动鸿蒙模拟器,并把选定的 HarmonyOS 应用构建、部署到模拟器。

鸿蒙模拟器面板:模拟器实例 · 应用项目 · 部署目标 · 调试输出

能做什么

  • 启动 / 停止模拟器:启动或停止鸿蒙模拟器,列出可用实例与在线设备。
  • 选择应用项目:文件浏览或扫描,识别鸿蒙工程。
  • 构建并部署:将选定工程构建、安装并启动到目标设备,自动识别多入口模块。
  • 部署实时输出:构建 / 安装 / 启动过程实时输出。
  • 就绪检测:模拟器冷启动后检测设备是否上线。

依赖说明

本插件以「鸿蒙模拟器」标签页显示在侧边栏,依赖 dsh-better-sidebar;未安装时,请参考其说明安装。

安装

前置条件:

  • 已安装 dsh 并正常运行(dsh web);Node.js ≥ 22(LTS 或更新)、pnpm ≥ 10。
  • 已安装 DevEco Studio(提供模拟器、hdc 与 SDK);Linux 上改用 Command Line Tools(见「平台支持」)。
  • 已安装 devecocli 命令行工具;如未安装,执行 npm i -g @deveco/deveco-cli,或装好插件后在面板点击「一键安装 devecocli」。

方式一:npm 安装(推荐)

dsh plugin --profile web add dsh-hmos-emulator

方式二:从 GitHub 安装(免 npm)

dsh plugin --profile web add github:momo20012002/dsh-hmos-emulator

方式三:本地挂载(开发)

git clone https://github.com/momo20012002/dsh-hmos-emulator.git
cd dsh-hmos-emulator && pnpm install && pnpm build
dsh plugin --profile web add .

安装完成后,重启 dsh web(加载宿主端),再刷新浏览器页面(加载客户端),即可生效。

卸载:

dsh plugin --profile web remove dsh-hmos-emulator

使用

  1. 打开侧边栏的 + 菜单 →「鸿蒙模拟器」。
  2. 点击「扫描可用」列出模拟器与在线设备,再点击「启动」启动模拟器。
  3. 在「应用项目」中浏览或扫描,选择鸿蒙工程。
  4. 点击「构建并部署」,等待完成。

模型工具

除面板外,插件向 AI 提供六个工具,可在对话中直接触发模拟器、部署、日志、代码检查等操作。

工具 职责
emu 模拟器实例的查看 / 启动 / 停止
emu_ui 屏幕结构读取、交互与截图
hmos_deploy 构建 → 安装 → 启动
hmos_lint 代码检查
hmos_log 设备日志
hmos_docs 官方鸿蒙文档检索
  • 界面状态默认以节点结构读取,截图只用于结构说不清的场景(白屏、崩溃、视觉问题)。
  • 出现异常时,插件会自动把截图留存到工作区 screenshots/ 目录。
  • 截图可与上一张比对:画面没变化时不写入新图。

平台支持

  • Windows / macOS:模拟器启动与停止由 DevEco Studio 提供。
  • Linux:DevEco Studio 没有 Linux 版,模拟器来自 Command Line Tools(需 26.0.0 Release 及以上)。需要:
    • Ubuntu 18.04 及以上;
    • 把 DEVECO_CLI_CLT_PATH 指向 Command Line Tools 安装目录(或把其 emulator 目录加入 PATH);
    • 需要桌面环境:无图形界面(DISPLAY / WAYLAND_DISPLAY 均未设置)时,本插件不提供启动支持。
  • 选择工程、连接设备、构建并部署在所有系统上均可用。

常见问题

现象 处理
启动时提示授权 / 协议未接受 在终端执行 devecocli emulator license accept 后重试
扫描不到模拟器实例 使用 DevEco Studio 的 Device Manager 确认实例存在,或在终端执行 devecocli emulator list 查看实际报错
Linux 上启动模拟器报错 需 Command Line Tools 26.0.0 Release 及以上(DevEco Studio is not available on Linux 即未设置 DEVECO_CLI_CLT_PATH)
部署失败但无具体报错 在工程中配置签名后重试;多入口模块已自动选择入口模块(可在面板切换)
提示找不到 hdc 设置环境变量 DEVECO_SDK_HOME 指向 DevEco Studio 的 SDK 目录,然后重启 dsh web

License

MIT

← 上一个 Prev dsh-handoff-wall 下一个 Next dsh-legion →