ohhdc

Automate OpenHarmony device management and HAP lifecycle tasks via HDC.

Updated Oct 28, 2024
One-click install
npx skills add https://github.com/openharmony/napi_generator --skill ohhdc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ohhdc
Source: https://github.com/openharmony/napi_generator/tree/main/src/skills/ohhdc
Command: npx skills add https://github.com/openharmony/napi_generator --skill ohhdc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenHarmony device management and HAP lifecycle tasks require multiple commands; this skill automates those tasks through HDC and formats results in Markdown.

Core Features & Use Cases

  • List installed HAP apps
  • Install, uninstall, and replace-install HAPs
  • View foreground/running apps and run tests, with Markdown output
  • Start apps and force-stop apps as needed

Quick Start

Run the ohhdc script to list installed HAPs on a connected device.

Frequently Asked Questions about ohhdc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate OpenHarmony device management and HAP lifecycle tasks?

Automate OpenHarmony device management by running shell commands through HDC to list, install, uninstall, and force-stop HAPs. This skill handles HAP lifecycle tasks predictably and formats the command results in Markdown.

Can I view foreground and running apps on OpenHarmony devices using HDC?

Yes, you can view foreground and running apps on OpenHarmony devices by executing HDC shell commands. The skill queries the active application state and returns the list of running processes formatted as Markdown output.

What's the best way to run tests on OpenHarmony devices and get formatted results?

Run tests on OpenHarmony devices by triggering HDC shell commands to execute test cases. The skill automates the test execution process and captures the results, delivering them as structured Markdown output for easy review.

Do I need HDC in PATH to automate HAP installation and uninstallation?

Yes, you need HDC available in PATH via shell startup scripts to automate HAP installation and uninstallation. The skill relies on a CLI-like interface through HDC to execute these HAP lifecycle commands predictably.

How to start or force-stop apps on OpenHarmony devices through shell commands?

Start or force-stop apps on OpenHarmony devices by sending targeted HDC shell commands. The skill automates these application lifecycle actions directly, managing the active state of HAPs without manual command entry.

Why use Markdown output for listing installed HAPs and device management tasks?

Markdown output for listing installed HAPs and device management tasks ensures results are structured and readable. The skill formats HDC shell command responses into Markdown, providing predictable automation outputs for documentation.