Introduction

The DeepSeek Harness plugin ecosystem allows development tools to be extended in the sidebar. The HarmonyOS Emulator plugin is a tab extension of dsh-better-sidebar that integrates HarmonyOS emulator startup, device management, and application build and deployment workflows into the DSH sidebar panel. For developers who need to debug HarmonyOS applications directly within the Harness environment, the plugin provides a unified operational entry point.

Plugin Positioning

This is a tab plugin based on dsh-better-sidebar, maintained by user momo20012002 under the MIT license. It mainly solves the problem of how to conveniently start the HarmonyOS emulator in the DSH environment and how to build and deploy a selected project to a target device.

Core Features

The plugin provides the following features:

  1. Emulator management: Start or stop the emulator, and view available instances and online devices.
  2. Project identification: Identify HarmonyOS application projects by browsing files or scanning.
  3. Build and deployment: Build, install, and launch the selected project on a target device; supports automatic identification of multiple entry modules.
  4. Real-time feedback: Provide real-time output for the build, installation, and startup processes.
  5. Readiness detection: Automatically detect whether the device is online after the emulator cold-starts.
  6. Model tools: Provide the AI model with six dedicated tools for emulator control, deployment, logging, code inspection, and documentation retrieval.

Installation and Prerequisites

Before installation, ensure the following prerequisites are in place:

  • DSH environment: dsh web is running normally.
  • Node.js: Version >= 22.
  • Package manager: pnpm version >= 10.
  • Development environment: DevEco Studio (Windows/macOS) or Linux Command Line Tools >= 26.0.0 is installed.
  • CLI tool: @deveco/deveco-cli (devecocli) is installed. If not installed, click “One-click Install” in the panel.

The installation command is as follows:

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

After installation, restart dsh web and refresh the browser page to apply the changes.

Usage Workflow

  1. Open the + menu in the sidebar and select “HarmonyOS Emulator”.
  2. Click “Scan Available” to list emulators and online devices, then click “Start” to launch the emulator.
  3. In “Application Project”, browse or scan to select a HarmonyOS project.
  4. Click “Build and Deploy” and wait for the process to complete.

Model Tools

The plugin provides the AI model with the following six tools, which can be invoked directly in a conversation:

  • emu: View, start, and stop emulator instances.
  • emu_ui: Read screen structure, interact with the interface, and take screenshots.
  • hmos_deploy: Build → install → launch process.
  • hmos_lint: Code inspection.
  • hmos_log: View device logs.
  • hmos_docs: Search official HarmonyOS documentation.

Screenshot logic: The interface state defaults to reading the node structure; a screenshot is used only when the structure is unclear. If an exception occurs, the screenshot is automatically saved to the screenshots/ directory in the workspace.

Platform Support and Notes

  • Windows / macOS: Relies on the emulator functionality provided by DevEco Studio.
  • Linux: DevEco Studio is unavailable; use Command Line Tools >= 26.0.0. On Linux, a desktop environment must be configured (that is, the DISPLAY or WAYLAND_DISPLAY environment variable is set), otherwise the emulator cannot start.
  • Permissions and security: The plugin runs with the permissions of the current DSH process. Please review the source code and license (MIT) before installation.

Conclusion

This plugin encapsulates the core HarmonyOS development workflow into the DSH sidebar. Combined with AI model tools, it can significantly improve the efficiency of developing HarmonyOS applications in Harness.