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
opencodeandatomcode
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
opencodeandatomcode - Publishes as a DSH bundle, registers the
deveco_clitool, and enables Agents to calldevecocliwith structured parameters - The
argsfor 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, orLinux, with corresponding environment variables configured Node.jsversion 22 or higher is recommended- The
enginesfield inpackage.jsonrequiresnode >=22 - Requires
DevEco Studio >= 6.0.0orCommand Line Tools >= 26.0.0 - On
macOS,DevEco Studiomust be installed in the~/Applicationsor/Applicationsdirectory - On
Linux,DevEco Studio Auto_Detectis not supported;Command Line Toolsare mandatory, with a minimum version ofCLT 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 priorityDEVECO_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
devecocliskills or MCP to Agents such asopencodeandatomcode - Run the HarmonyOS toolchain using
Command Line Toolsin aLinuxenvironment - Need to call the DevEco toolchain in DSH with structured parameters instead of manually assembling shell commands
Pay attention to the following:
- When using
opencodewithdevecoclionWindows, it is recommended to setPowerShell 7as the default execution terminal - Some commands suggest switching the default terminal to
PowerShell 7 LinuxrequiresCommand Line Tools- On
macOS, ensureDevEco Studiois installed in~/Applicationsor/Applications - The plugin runs with the permissions of the current
dshprocess; 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