Introduction

Doing HarmonyOS development in DSH involves more than just reading documentation or changing code; common requirements also include checking devices, taking screenshots, viewing UI trees, building, deploying, capturing logs, running Lint, and generating signature materials. dsh-plugin-devecocli is a DeepSeek Harness plugin that provides these operations using @deveco/deveco-cli and registers 13 harmony_* model tools in DSH.

What is it

The positioning of dsh-plugin-devecocli is to integrate common HarmonyOS development CLI capabilities into DSH, allowing agents to directly call operations related to devices, emulators, UI, building, deployment, logs, Lint, signing, and documentation retrieval.

The repository address verified in the materials points to frankq007/dsh-plugin-devecocli, and the license is MIT. The materials do not provide stars or category; the directory page address also does not appear.

Core Features

The plugin registers the following 13 tools:

  • harmony_device_list: List connected devices/emulators
  • harmony_emulator_list: List emulator instances and status
  • harmony_emulator_control: Execute start/stop/shake/power/rotate/volume/battery/geolocation/sensor/scene/fold
  • harmony_screenshot: Capture device screen as PNG
  • harmony_ui_dump: Export current screen UI node tree
  • harmony_ui_interact: Execute click/doubleclick/longclick/swipe/fling/drag/text
  • harmony_log: Get device app logs, supports level/bundle/keyword/crash
  • harmony_build: Build project, optional clean first
  • harmony_deploy: Deploy to device, defaults to --skip-build for fast install
  • harmony_signature: Generate signature materials to project
  • harmony_check_lint: Run DevEco Code Linter, optional --fix
  • harmony_docs: Offline HarmonyOS documentation search
  • harmony_exec: Execute other devecocli subcommands under a whitelist restriction

Installation and Enablement

Prerequisites

  • Any profile of DeepSeek Harness (dsh)
  • devecocli in PATH
  • Connect HarmonyOS device or emulator when device tools are needed
  • Use a Full-access session when executing device/SDK commands

First, confirm that devecocli is available. It can be installed via DevEco Studio or using npm:

npm i -g @deveco/deveco-cli

Then add the plugin to a specified DSH profile:

dsh plugin --profile <name> add dsh-plugin-devecocli

After installation, restart your DSH profile; the 13 harmony_* tools will appear in that profile.

If installing via git and using pnpm >= 10, you also need to authorize the prepare script: write the package key output by pnpm into allowBuilds in the profile’s pnpm-workspace.yaml, then re-run add.

Dynamic Registration

You can also register plugins dynamically. The steps are as follows:

  1. Call cordis_inspect_list, then call cordis_inspect_query
  2. Call cordis_define, where code.host uses the content of code.host.js
  3. Call cordis_run

Bundle tools are registered at the profile level; creator-mode dynamic copies can coexist without conflict.

Removal

Remove the plugin:

dsh plugin --profile <name> remove dsh-plugin-devecocli

Typical Usage

The following operations are suitable for basic verification after installation:

  1. Call harmony_device_list to view connected devices or emulators
  2. Call harmony_screenshot to capture the device screen as PNG
  3. Call harmony_ui_dump to get the current screen UI node tree
  4. Call harmony_exec and pass ["--version"], verified to return 1.2.2
  5. Call harmony_docs to search arkts, verified to return 3 JSON results

When using harmony_ui_dump, the full output of the UI node tree can reach several hundred KB; the tool returns a truncated 64KB tail plus a JSON summary.

When using harmony_build, the build may take a long time; a single execution has a timeout and returns the tail output.

If not logged in to a Huawei Developer account, harmony_signature will fail; follow the prompts to run the interactive command:

devecocli auth login

Interactive commands, such as auth login or emulator license, are not suitable for direct execution via tools.

Permissions and Sandbox Notes

The plugin executes devecocli within a DSH session; actual capabilities depend on the current dsh process permissions and session permissions.

  • Restricted sandbox: devecocli version, auth, and docs commands work; device/SDK commands are rejected because the executable is not digitally signed (hdc.exe). The plugin detects this and returns a prompt.
  • Full-access session: device/SDK commands work.

Since the plugin executes external CLI commands, check the source code and license before installation. The license for this plugin is MIT.

Development Check

If you want to make local changes or check the plugin source code, you can run:

node --check index.js
npm run check

Conclusion

The value of dsh-plugin-devecocli lies in consolidating common HarmonyOS development commands into tools that DSH can directly call: device/emulator management, screenshot and UI automation, build and deployment, logs, Lint, signing, and offline documentation retrieval.

The directory page URL was not provided in the materials; the GitHub repository address is:

  • https://github.com/frankq007/dsh-plugin-devecocli