@deveco-test/hmos-deveco-cli 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SKILL.md CHANGED
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  name: deveco-cli
3
3
  description: >-
4
- **MUST** use 'devecocli' for HarmonyOS apps (scaffold, build, run, debug, devices, emulators, logs, docs, 鸿蒙开发文档, skills, multi-preview). **REQUIRED** and **MANDATORY** if workspace has build-profile.json5 or oh-package.json5, or user mentions HarmonyOS, 鸿蒙, DevEco, ArkTS, ArkUI, docs, 鸿蒙文档, 知识, 搜索, skills, or preview/预览/预览器/多预览器/多设备预览器.
4
+ **MUST** use 'devecocli' for HarmonyOS apps (scaffold, build, run, debug, devices, logs, docs, 鸿蒙开发文档, skills, multi-preview). **REQUIRED** and **MANDATORY** if workspace has build-profile.json5 or oh-package.json5, or user mentions HarmonyOS, 鸿蒙, DevEco, ArkTS, ArkUI, docs, 鸿蒙文档, 知识, 搜索, skills, or preview/预览/预览器/多预览器/多设备预览器.
5
5
  ---
6
6
 
7
7
  # DevEco CLI
8
8
 
9
- `devecocli` wraps DevEco Studio's `hvigor`, `ohpm`, `hdc`, emulator toolchain, and HarmonyOS-skills installer. **Prefer `devecocli` over invoking underlying tools directly.**
9
+ `devecocli` wraps DevEco Studio's `hvigor`, `ohpm`, `hdc`, and HarmonyOS-skills installer. **Prefer `devecocli` over invoking underlying tools directly.**
10
10
 
11
11
  **Do NOT use these legacy commands** — use the `devecocli` equivalent instead:
12
12
  - ❌ `deveco preview` / `hvigorw preview` → ✅ `devecocli run --device <product-name>` (launches DevEco Studio previewer; product name in `--device` triggers previewer mode)
13
13
  - ❌ `hvigorw` directly → ✅ `devecocli build`
14
14
  - ❌ `hdc` directly (when a `devecocli` wrapper exists) → ✅ `devecocli device` / `devecocli log` / `devecocli run`
15
15
 
16
- Available commands: `build`, `run`, `update`, `device`, `emulator`, `skills`, `log`, `create`, `init`, `serve`, `docs`.
16
+ Available commands: `build`, `run`, `update`, `device`, `skills`, `log`, `create`, `init`, `serve`, `docs`.
17
17
 
18
18
  **Sandbox Rule**: Commands tagged `[Outside sandbox]` must be run outside the sandbox.
19
19
 
@@ -36,17 +36,6 @@ Compile and package project/modules. (Defaults: `--product default`, `--build-mo
36
36
  | Whole product bundle (.app) | `devecocli build --product <name>` |
37
37
  | Clean build outputs | `devecocli build clean` |
38
38
 
39
- ### `devecocli emulator`
40
- Manage local emulator instances and system images.
41
- - `list`: Show instances (status, serial, device type).
42
- - `start <names...>`: Start instances. Quote names with spaces. (See Troubleshooting if blocked).
43
- - `stop <names...>`: Stop by name or serial (`127.0.0.1:<port>`).
44
- - `create <name>` (Req: `--device-type`, `--os-version`): Create instance. Optional: `--force`.
45
- - `delete <name>`: Delete instance.
46
- - `image list`: List downloaded images. Opts: `--device-type <type>`, `--all`, `--format <table|json>`.
47
- - `image download` / `image remove` (Req: `--device-type`, `--os-version`): Download/remove image. (Takes 30+ min, set long timeout).
48
- *Device types*: `phone`, `foldable`, `widefold`, `triplefold`, `tablet`, `2in1`, `2in1 foldable`, `wearable`, `tv`.
49
-
50
39
  ### `devecocli docs`
51
40
  Search/read local HarmonyOS docs.
52
41
  - `search <keywords...>`: Match any keyword. Opts: `--catalog <name>`, `--format <default|json>`, `--limit <n>`.
@@ -54,7 +43,7 @@ Search/read local HarmonyOS docs.
54
43
  - `catalog`: List available catalogs.
55
44
 
56
45
  ### `devecocli device`
57
- - `list`: Show active real devices and running emulators.
46
+ - `list`: Show active real devices.
58
47
  - `view`: Detailed info. Req `-t <name|serial>` on multi-device hosts.
59
48
 
60
49
  ### `devecocli run` `[Outside sandbox]`
@@ -105,8 +94,8 @@ Manage HarmonyOS skills in AI agents/projects.
105
94
 
106
95
  ## Recipes
107
96
 
108
- - **Fresh checkout to emulator**:
109
- `devecocli build` -> `devecocli emulator list` -> `devecocli emulator start "Name"` -> `devecocli run`
97
+ - **Fresh checkout to real device**:
98
+ `devecocli build` -> `devecocli device list` -> `devecocli run --device <serial>`
110
99
  - **Launch previewer for current project** (instead of `deveco preview`):
111
100
  - Single previewer (specific device type): `devecocli run --module entry --device "Pura 90 Pro"`
112
101
  - Multi-preview by device types: `devecocli run --module entry --device "Pura 90 Pro,Mate XT"`
@@ -121,12 +110,8 @@ Manage HarmonyOS skills in AI agents/projects.
121
110
 
122
111
  - **"Product / Build mode `<x>` not found"**: Check `build-profile.json5`.
123
112
  - **"Multiple entry modules" / "No entry module"**: Pass `--modules` (build) or `--module` (run).
124
- - **"No active devices" / "Multiple devices connected"**: Connect/start emulator. Pass `-t <serial>` (device view) or `--device <name|serial>` (run/log).
113
+ - **"No active devices" / "Multiple devices connected"**: Connect a real device (or self-connect via wireless debugging on HarmonyOS native PC). Pass `-t <serial>` (device view) or `--device <name|serial>` (run/log).
125
114
  - **`error:install sign info inconsistent`**: Signing key changed. Run `devecocli run --uninstall`.
126
115
  - **`skills add` agent not found**: Valid: `codebuddy`, `cursor`, `opencode`, `qoder`, `trae-cn`.
127
- - **`emulator start` / `image download` blocked on agreement**: User MUST run `devecocli emulator license accept` in interactive TTY. Agents cannot do this. Do not retry until accepted.
128
- - **`image download` failure / timeout**: Do NOT auto-retry. Give the command to the user to run manually in their terminal.
129
- - **`emulator create` timeout**: Treat as user-action step. Ask user to open DevEco Studio -> Device Manager. Check `emulator list` after user confirms. Do NOT auto-retry or edit SDK files.
130
- - **`image list` duplicate OS rows**: `phone`/`foldable`/`widefold`/`triplefold` share the same image. Download/remove ONCE per OS version.
131
116
  - **HarmonyOS native (2in1 PC) — `hdc list targets` shows `[Empty]`**: hdc on HarmonyOS does NOT auto-discover the local device. Open "Settings → System → Developer options → Wireless debugging", note the port, then `hdc tconn 127.0.0.1:<port>`. For normal run: pass `--device 127.0.0.1:<port>`. For previewer mode: set `DEVECO_HDC_PORT=<port>` env var (previewer mode uses `--device` for product name, not hdc target).
132
117
  - **Previewer mode — "DevEco Studio is not running"**: The previewer's rendering depends on the DevEco Studio desktop process. If the CLI returns this error, do NOT retry. Use natural language to tell the user: "预览器需要 DevEco Studio 处于运行状态,请先手动启动 DevEco Studio,启动后再重试此命令。" On HarmonyOS PC, also remind the user that process detection may be limited by UID isolation (currentUser cannot see Studio's process), but if the CLI reports this error it means detection genuinely failed.