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/emulatorsharmony_emulator_list: List emulator instances and statusharmony_emulator_control: Executestart/stop/shake/power/rotate/volume/battery/geolocation/sensor/scene/foldharmony_screenshot: Capture device screen as PNGharmony_ui_dump: Export current screen UI node treeharmony_ui_interact: Executeclick/doubleclick/longclick/swipe/fling/drag/textharmony_log: Get device app logs, supportslevel/bundle/keyword/crashharmony_build: Build project, optionalcleanfirstharmony_deploy: Deploy to device, defaults to--skip-buildfor fast installharmony_signature: Generate signature materials to projectharmony_check_lint: Run DevEco Code Linter, optional--fixharmony_docs: Offline HarmonyOS documentation searchharmony_exec: Execute otherdevecoclisubcommands under a whitelist restriction
Installation and Enablement¶
Prerequisites¶
- Any profile of DeepSeek Harness (
dsh) devecocliinPATH- 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:
- Call
cordis_inspect_list, then callcordis_inspect_query - Call
cordis_define, wherecode.hostuses the content ofcode.host.js - 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:
- Call
harmony_device_listto view connected devices or emulators - Call
harmony_screenshotto capture the device screen as PNG - Call
harmony_ui_dumpto get the current screen UI node tree - Call
harmony_execand pass["--version"], verified to return1.2.2 - Call
harmony_docsto searcharkts, 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:
devecocliversion, 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