@deveco-test/deveco-code-darwin-arm64 0.1.0-1 → 0.1.0-1.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/README.md +86 -41
- package/bin/deveco +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<h1 align="center">DevEco Code</h1>
|
|
3
3
|
</p>
|
|
4
|
-
<p align="center">面向 HarmonyOS
|
|
4
|
+
<p align="center">面向 HarmonyOS 开发场景的 AI Agent 工具。</p>
|
|
5
5
|
<p align="center">
|
|
6
|
-
<a href="
|
|
7
|
-
<a href="https://gitcode.com/openharmony-sig/deveco-code/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/npm/l/@deveco/deveco-code?style=flat-square&label=license" /></a>
|
|
8
|
-
<a href="https://gitcode.com/openharmony-sig/deveco-code"><img alt="GitCode" src="https://img.shields.io/badge/GitCode-openharmony--sig%2Fdeveco--code-blue?style=flat-square" /></a>
|
|
6
|
+
<a href="README_EN.md">English</a> · 简体中文
|
|
9
7
|
</p>
|
|
8
|
+
|
|
10
9
|
<p align="center">
|
|
11
|
-
<a href="
|
|
12
|
-
<a href="https://www.npmjs.com/package/@deveco/deveco-code"
|
|
13
|
-
<
|
|
14
|
-
<
|
|
10
|
+
<a href="https://www.npmjs.com/package/@deveco/deveco-code"><img alt="NPM Version" src="https://img.shields.io/npm/v/@deveco/deveco-code.svg" /></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/@deveco/deveco-code"><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/@deveco/deveco-code.svg" /></a>
|
|
12
|
+
<img alt="Node.js" src="https://img.shields.io/badge/Node.js-%3E%3D22-green.svg" />
|
|
13
|
+
<img alt="platform" src="https://img.shields.io/badge/platform-macOS%20(Arm%20%7C%20x64)%20%7C%20Windows-blue.svg" />
|
|
14
|
+
<a href="https://developer.huawei.com/consumer/cn/deveco-studio/"><img alt="DevEco Studio" src="https://img.shields.io/badge/DevEco%20Studio-%3E%3D6.1-orange.svg" /></a>
|
|
15
|
+
<a href="https://gitcode.com/openharmony-sig/deveco-code/blob/develop/LICENSE"><img alt="License" src="https://img.shields.io/badge/license-MIT-green.svg" /></a>
|
|
15
16
|
</p>
|
|
16
17
|
|
|
17
18
|
<p align="center">
|
|
@@ -29,7 +30,7 @@ npm install -g @deveco/deveco-code
|
|
|
29
30
|
# 2. 启动
|
|
30
31
|
deveco
|
|
31
32
|
|
|
32
|
-
# 3. 开始对话 ——
|
|
33
|
+
# 3. 开始对话 —— 在终端中直接描述你的 HarmonyOS 开发需求
|
|
33
34
|
提示词示例:
|
|
34
35
|
- 解释一下代码库的架构
|
|
35
36
|
- 帮我重构login_check这个函数
|
|
@@ -42,21 +43,54 @@ deveco
|
|
|
42
43
|
|
|
43
44
|
DevEco Code 是一款面向 HarmonyOS 开发场景的 AI Agent 工具,支持代码编写、编译构建、设备运行、文档查阅、运行时调试及 ArkTS 问题修复等能力。
|
|
44
45
|
|
|
45
|
-
DevEco Code 基于开源项目 OpenCode 扩展开发,保留了 OpenCode 的终端交互、配置体系、 Provider / MCP / Skill / Plugin
|
|
46
|
+
DevEco Code 基于开源项目 OpenCode 扩展开发,保留了 OpenCode 的终端交互、配置体系、 Provider / MCP / Skill / Plugin 等能力,并针对 HarmonyOS 工程增加了 DevEco Studio、Hvigor、HDC、Skill、HarmonyOS 知识库、ArkTS 检查和设备调试相关集成。
|
|
46
47
|
|
|
47
48
|
## 支持平台
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
DevEco Code 当前通过 npm 提供以下平台安装包:
|
|
51
|
+
|
|
52
|
+
| 平台 | 架构 | 说明 |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| Windows | x64 | Windows 10 / 11 |
|
|
55
|
+
| macOS | arm64(Apple Silicon) | M 系列芯片 |
|
|
56
|
+
| macOS | x64(Intel) | Intel 芯片 Mac |
|
|
57
|
+
|
|
58
|
+
> 暂不支持 Linux。HarmonyOS 编译构建、模拟器与真机调试依赖 [DevEco Studio](https://developer.huawei.com/consumer/cn/deveco-studio/),且目前仅提供 Windows 与 macOS 版本。
|
|
59
|
+
|
|
60
|
+
## 推荐配置
|
|
61
|
+
|
|
62
|
+
**操作系统**
|
|
63
|
+
|
|
64
|
+
- **Windows**:Windows 11 22H2 及以上(最低支持 Windows 10 x64)
|
|
65
|
+
- **macOS**:macOS 13 Ventura 及以上(Apple Silicon 或 Intel x64)
|
|
66
|
+
|
|
67
|
+
**硬件**
|
|
68
|
+
|
|
69
|
+
- **日常使用**(短会话、单模块改动、以对话与代码编辑为主):8 GB 及以上内存,建议使用 SSD
|
|
70
|
+
- **重度使用**(大工程、长会话、频繁编译构建与模拟器/真机调试):16 GB 及以上内存;建议为 DevEco Studio、SDK、模拟器与构建缓存预留 20 GB 及以上可用磁盘空间
|
|
71
|
+
|
|
72
|
+
**运行时与工具链**
|
|
73
|
+
|
|
74
|
+
- [Node.js](https://nodejs.org) **22 及以上**(运行 DevEco Code CLI)
|
|
75
|
+
- [DevEco Studio](https://developer.huawei.com/consumer/cn/deveco-studio/) **6.1 及以上**(编译构建、Hvigor、HDC、模拟器/真机运行)
|
|
76
|
+
- 已配置 `DEVECO_HOME` 环境变量,指向 DevEco Studio 安装目录
|
|
77
|
+
|
|
78
|
+
**终端 Shell**
|
|
79
|
+
|
|
80
|
+
- Windows:PowerShell 5.1+ 或 PowerShell 7+(推荐)、CMD
|
|
81
|
+
- macOS:Bash、Zsh(系统默认终端即可)
|
|
82
|
+
|
|
83
|
+
**网络**
|
|
84
|
+
|
|
85
|
+
- 需要稳定的互联网连接(华为账号登录、模型调用、HarmonyOS 知识库检索等)
|
|
52
86
|
|
|
53
87
|
## 安装前置
|
|
54
88
|
|
|
55
89
|
DevEco Code 通过 npm 分发,安装前请先准备以下环境:
|
|
56
90
|
|
|
57
91
|
1. 安装 [Node.js](https://nodejs.org),**推荐使用 22 及更高版本**
|
|
58
|
-
2.
|
|
59
|
-
3.
|
|
92
|
+
2. (可选)安装 [DevEco Studio](https://developer.huawei.com/consumer/cn/deveco-studio/),**推荐使用 6.1 及更高版本**;若不安装,构建、推包等 HarmonyOS 工程工具将无法使用
|
|
93
|
+
3. (可选)配置 `DEVECO_HOME` 环境变量指向 DevEco Studio 安装目录(安装 DevEco Studio 时需要)
|
|
60
94
|
|
|
61
95
|
可先在终端验证 Node.js 环境:
|
|
62
96
|
|
|
@@ -67,37 +101,50 @@ npm -v
|
|
|
67
101
|
|
|
68
102
|
## 安装与卸载
|
|
69
103
|
|
|
104
|
+
安装:
|
|
105
|
+
|
|
70
106
|
```bash
|
|
71
|
-
# 安装
|
|
72
107
|
npm install -g @deveco/deveco-code
|
|
108
|
+
```
|
|
73
109
|
|
|
74
|
-
|
|
75
|
-
deveco --version
|
|
110
|
+
查看版本、启动:
|
|
76
111
|
|
|
77
|
-
|
|
112
|
+
```bash
|
|
113
|
+
deveco --version
|
|
78
114
|
deveco
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
更新:
|
|
79
118
|
|
|
80
|
-
|
|
119
|
+
```bash
|
|
81
120
|
deveco upgrade
|
|
121
|
+
```
|
|
82
122
|
|
|
83
|
-
|
|
84
|
-
deveco uninstall
|
|
123
|
+
卸载运行时数据与全局包:
|
|
85
124
|
|
|
86
|
-
|
|
125
|
+
```bash
|
|
126
|
+
deveco uninstall
|
|
87
127
|
npm uninstall -g @deveco/deveco-code
|
|
88
128
|
```
|
|
89
129
|
|
|
90
|
-
|
|
130
|
+
## 登录与登出
|
|
131
|
+
|
|
132
|
+
使用 DevEco Code 需先通过华为账号登录。首次执行 `deveco` 时会在终端内引导完成登录;也可单独执行登录命令:
|
|
91
133
|
|
|
92
|
-
|
|
134
|
+
```bash
|
|
135
|
+
deveco auth login
|
|
136
|
+
```
|
|
93
137
|
|
|
94
|
-
|
|
138
|
+
登出会清除当前华为账号的本地登录状态,下次启动需重新登录。执行:
|
|
95
139
|
|
|
96
140
|
```bash
|
|
97
|
-
# 退出登录
|
|
98
141
|
deveco auth logout
|
|
99
142
|
```
|
|
100
143
|
|
|
144
|
+
## 模型配置
|
|
145
|
+
|
|
146
|
+
登录后可使用 DevEco Code 提供的免费模型通道。
|
|
147
|
+
|
|
101
148
|
在 DevEco Code 中输入 `/models` 可进入模型配置界面。当前免费提供 `GLM-5.1` 模型,单账号默认每分钟 50 次请求。也可以通过 `Ctrl+A` 进入 Provider 选择界面,配置支持的第三方模型。
|
|
102
149
|
|
|
103
150
|
也可以通过 `deveco.jsonc` 配置模型:
|
|
@@ -132,17 +179,17 @@ deveco auth logout
|
|
|
132
179
|
2. 项目目录下 `deveco.jsonc`
|
|
133
180
|
3. 用户目录下 `.config/deveco/deveco.jsonc`
|
|
134
181
|
|
|
135
|
-
## Agent
|
|
182
|
+
## Agent 配置
|
|
136
183
|
|
|
137
|
-
DevEco Code
|
|
184
|
+
DevEco Code 面向 HarmonyOS 开发提供以下 Agent 配置(按 `Tab` 键切换):
|
|
138
185
|
|
|
139
186
|
- `Build`:默认模式,适合工程生成、代码生成、配置修正、测试执行、推包运行和发布执行
|
|
140
187
|
- `Plan`:适合需求拆解、技术方案、发布规划、测试规划和文档生成
|
|
141
|
-
- `Goal`:适合
|
|
188
|
+
- `Goal`:适合 SDD 五阶段从需求到实现与构建验证的端到端特性交付
|
|
142
189
|
|
|
143
|
-
##
|
|
190
|
+
## HarmonyOS 场景能力
|
|
144
191
|
|
|
145
|
-
DevEco Code
|
|
192
|
+
DevEco Code 集成了常用 HarmonyOS 开发工具能力:
|
|
146
193
|
|
|
147
194
|
| 工具 | 说明 |
|
|
148
195
|
| ------------------------ | -------------------- |
|
|
@@ -150,22 +197,24 @@ DevEco Code 集成了常用鸿蒙开发工具能力:
|
|
|
150
197
|
| `start_app` | 在模拟器或真机上运行应用 |
|
|
151
198
|
| `hdc_log` | 收集/清理设备日志/查看连接模拟器 |
|
|
152
199
|
| `check_ets_files` | ArkTS 静态语法检查 |
|
|
153
|
-
| `arkts_knowledge_search` |
|
|
200
|
+
| `arkts_knowledge_search` | HarmonyOS 知识搜索 |
|
|
154
201
|
| `switch_cwd` | 切换构建项目路径 |
|
|
155
202
|
|
|
156
|
-
|
|
203
|
+
常见场景包括:从零到一创建 HarmonyOS 工程、增量开发页面、修复编译报错、真机调试。
|
|
157
204
|
|
|
158
205
|
## 扩展能力
|
|
159
206
|
|
|
160
207
|
DevEco Code 兼容 OpenCode 的 Skill、MCP 和 Plugin 扩展方式。
|
|
161
208
|
|
|
209
|
+
> 新增或修改 Skill、MCP、Plugin 配置后,需退出并重新执行 `deveco` 启动后才会生效。
|
|
210
|
+
|
|
162
211
|
### Skills
|
|
163
212
|
|
|
164
213
|
```bash
|
|
165
214
|
npx skills add vercel-labs/agent-skills
|
|
166
215
|
```
|
|
167
216
|
|
|
168
|
-
也可以把 Skill 放到 `~/.config/deveco/skills
|
|
217
|
+
也可以把 Skill 放到 `~/.config/deveco/skills` 目录。
|
|
169
218
|
|
|
170
219
|
### MCP
|
|
171
220
|
|
|
@@ -216,12 +265,6 @@ cp {源路径}/opencode.jsonc ~/.config/deveco/deveco.jsonc
|
|
|
216
265
|
|
|
217
266
|
Skills、Agents、Plugins 也可以迁移到 `~/.config/deveco` 下的对应目录;MCP 配置项可迁移到 `deveco.jsonc` 中。
|
|
218
267
|
|
|
219
|
-
## FAQ
|
|
220
|
-
|
|
221
|
-
### 这和 OpenCode 有什么关系?
|
|
222
|
-
|
|
223
|
-
DevEco Code 基于 OpenCode 扩展开发,保留其终端 UI、Provider、MCP、Skill、Plugin 和配置体系,并额外针对 HarmonyOS 开发链路加入编译构建、设备运行、日志采集、ArkTS 检查和运行时调试等能力。
|
|
224
|
-
|
|
225
268
|
## Contributing
|
|
226
269
|
|
|
227
270
|
欢迎贡献!请在提交 Pull Request 前阅读 [CONTRIBUTING.md](CONTRIBUTING.md)。
|
|
@@ -236,4 +279,6 @@ DevEco Code 基于 OpenCode 扩展开发,保留其终端 UI、Provider、MCP
|
|
|
236
279
|
|
|
237
280
|
***
|
|
238
281
|
|
|
282
|
+
**提示:** 终端常用命令(如 `/models`、`/help` 等)请参阅 [OpenCode TUI 文档](https://opencode.ai/docs/zh-cn/tui/)。
|
|
283
|
+
|
|
239
284
|
**反馈与交流** [GitCode Issue](https://gitcode.com/openharmony-sig/deveco-code/issues)
|
package/bin/deveco
CHANGED
|
Binary file
|