Introduction

When developing HarmonyOS applications in DeepSeek Harness (referred to as DSH), common pain points are not single commands, but rather fragmented commands: project creation, building, devices, emulators, logs, UI checks, and documentation retrieval all require concatenating paths and environment variables. DSH’s philosophy is “everything is a plugin,” but the community directory is an independent site with no official affiliation to DeepSeek or Fangyuan, nor is it an official app store.

fz-lyle/dsh-deveco-cli encapsulates the DevEco Studio toolchain into devecocli and publishes it as a DSH plugin. After installation, DSH registers the deveco_cli tool, enabling Agents to call devecocli with structured parameters.

What is it

dsh-deveco-cli is a unified command-line entry point for HarmonyOS application development, maintained by fz-lyle, licensed under MIT.

It encapsulates tools such as ohpm, hvigor, hdc, emulator, and hilog into a single CLI, providing:

  • Project scaffolding
  • Local HarmonyOS documentation retrieval
  • Installation and management of HarmonyOS skills
  • MCP services
  • Skill addition and MCP configuration for Agents such as opencode and atomcode

In verified information, the package.json version is 1.3.0-Test.19.

Core Features

Below only lists verified capabilities and does not elaborate on unconfirmed details.

  • Encapsulates the DevEco Studio toolchain into a single CLI
  • Built-in ohpm, hvigor, hdc, emulator, hilog
  • Supports commands for project creation, building, running, viewing devices and emulators, UI checking, logs, documentation retrieval, skill management, signing, and compatibility checks
  • Supports adding skills to Agents and configuring MCP; examples include opencode and atomcode
  • Publishes as a DSH bundle, registers the deveco_cli tool, and enables Agents to call devecocli with structured parameters
  • The args for DSH tools are an argv array, not a shell string

Common commands are as follows:

Command Purpose
devecocli create Create a new HarmonyOS project
devecocli build Build the project and produce .hap / .hsp / .har / .app
devecocli check lint Check code standards and output best practice suggestions and reports
devecocli run Install and run the application
devecocli device list View currently connected devices
devecocli emulator list View local emulator instances
devecocli ui layout Export the UI node tree of the device screen
devecocli ui window list View the list of device windows
devecocli ui screenshot Perform UI screenshots on a real device or emulator
devecocli ui click Click at specified coordinates or node ID
devecocli ui swipe Custom swipe gestures
devecocli ui text Input text into the focused element or specified location
devecocli log View hilog or crash logs
devecocli docs search Search local HarmonyOS documentation
devecocli init Install built-in skills or configure MCP
devecocli skills Manage skills in the HarmonyOS skill marketplace
devecocli signature generate Automatically generate debug signing materials and configure them to the project
devecocli check compat Scan API changes between two SDK versions for source code

Installation and Activation

Prerequisites

First, confirm the runtime environment:

  • Operating system is macOS, Windows, or Linux, with corresponding environment variables configured
  • Node.js version 22 or higher is recommended
  • The engines field in package.json requires node >=22
  • Requires DevEco Studio >= 6.0.0 or Command Line Tools >= 26.0.0
  • On macOS, DevEco Studio must be installed in the ~/Applications or /Applications directory
  • On Linux, DevEco Studio Auto_Detect is not supported; Command Line Tools are mandatory, with a minimum version of CLT 26.0.0

Installing the DSH Plugin

Install the plugin in DSH:

dsh plugin add @ah-plugins/dsh-deveco-cli

Typical Usage

Creating and Running a Project

Create the project first, then enter the directory to run it, and finally view error logs:

devecocli create --app-name MyApp
cd MyApp
devecocli run
devecocli log --level E

Documentation Retrieval

For local documentation retrieval, you can search first and then read specific entries:

devecocli docs search List
devecocli docs read harmonyos-guides/application-models/arkts-page-start-overview

Installing Skills for Agents

Taking opencode as an example, first install the skill, then configure MCP:

devecocli init --agent opencode
devecocli init --mcp --agent opencode --project ./MyApp
cd MyApp

Afterwards, start opencode within the project.

The usage for atomcode is the same:

devecocli init --agent atomcode

Environment Variables and Platform Constraints

When using non-default installation paths, multiple versions coexist, using Command Line Tools, or running on Linux, you can explicitly specify the toolchain root via environment variables.

The verified priority order of environment variables is:

DEVECO_CLI_STUDIO_PATH > DEVECO_CLI_CLT_PATH > Auto_Detect

Where:

  • DEVECO_CLI_STUDIO_PATH: Explicitly specifies the root of the DevEco Studio installation, with the highest priority
  • DEVECO_CLI_CLT_PATH: Explicitly specifies the root of the Command Line Tools installation

Platform constraints are as follows:

Platform DevEco Studio Auto_Detect Command Line Tools Minimum Version
Windows Supported Optional Studio 6.0.0 / CLT 26.0.0
macOS Supported Optional Studio 6.0.0 / CLT 26.0.0
Linux Not Supported Mandatory CLT 26.0.0

DSH Plugin Invocation Method

After installation, DSH registers the deveco_cli tool for Agents to call devecocli.

When invoking, pay attention to the parameter format: args is an argv array, not a shell string. For example, the documentation retrieval command:

devecocli docs search List

Corresponding to the DSH invocation, parameters like search and List should be structured as an argv array, not written as a single string requiring shell parsing.

Maintenance and Publishing

If you maintain this DSH plugin or are preparing to publish, you need to pay attention to build artifacts.

The DSH plugin reuses the dist/cli.js inside the current package; before publishing, you need to execute:

npm run build

Regarding data collection and privacy, the README points to PRIVACY.md for telemetry tracking content, storage encryption, reporting, and how to disable it. This article does not elaborate on unverified details.

Applicable Scenarios and Notes

Suitable for the following scenarios:

  • Execute project creation, building, running, logs, devices, emulators, UI, documentation, signing, and compatibility checks for HarmonyOS projects within a DSH Agent
  • Configure devecocli skills or MCP to Agents such as opencode and atomcode
  • Run the HarmonyOS toolchain using Command Line Tools in a Linux environment
  • Need to call the DevEco toolchain in DSH with structured parameters instead of manually assembling shell commands

Pay attention to the following:

  • When using opencode with devecocli on Windows, it is recommended to set PowerShell 7 as the default execution terminal
  • Some commands suggest switching the default terminal to PowerShell 7
  • Linux requires Command Line Tools
  • On macOS, ensure DevEco Studio is installed in ~/Applications or /Applications
  • The plugin runs with the permissions of the current dsh process; before installing, you should check the source code, license, and dependencies to ensure only plugins from trusted sources are enabled
  • Content involving privacy is subject to PRIVACY.md

Links

  • Community Directory: https://www.skillhub.cn/plugins/fz-lyle/dsh-deveco-cli
  • GitHub: https://github.com/fz-lyle/dsh-deveco-cli