@comate/zulu 0.0.11 → 0.0.12

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 ADDED
@@ -0,0 +1,98 @@
1
+ # Zulu CLI
2
+
3
+ ## 环境
4
+ * nodejs >= 22
5
+ * ripgrep >= 12 需要手动安装该库
6
+
7
+ ## 安装
8
+ ### 安装 ripgrep
9
+ 以下是在不同操作系统和包管理器中安装`ripgrep`的常见命令:
10
+ #### MacOS
11
+ ```shell
12
+ brew install ripgrep
13
+ ```
14
+ #### Linux
15
+ ##### Ubuntu/Debian
16
+ ```shell
17
+ sudo apt update
18
+ sudo apt install ripgrep
19
+ ```
20
+ ##### CentOS
21
+ ```shell
22
+ sudo yum install epel-release
23
+ sudo yum install ripgrep
24
+ ```
25
+ #### Windows
26
+ ```shell
27
+ winget install BurntSushi.ripgrep.MSVC
28
+ ```
29
+ #### 验证安装
30
+ 安装完成后,可以使用以下命令验证:
31
+ ```shell
32
+ rg --version
33
+ ```
34
+ 选择适合你操作系统和包管理器的命令即可。推荐使用系统自带的包管理器,这样更容易管理和更新。
35
+
36
+ ### 安装 Zulu-CLI
37
+ ```shell
38
+ npm install -g @comate/zulu
39
+ ```
40
+
41
+ ## 网络
42
+ 默认请求`https://comate.baidu.com`,如果环境未知,请执行`zulu --ping`测试连通性,如果不通:
43
+
44
+ * 厂内用户可以使用export HTTP_HOST="https://comate-saas-proxy.now.baidu-int.com"修改默认请求的域名
45
+ * 私有服务或者其他特殊场景可以设置export HTTP_HOST="xxxx"其他zulu支持的域名
46
+
47
+ ## 使用
48
+ ```shell
49
+ zulu run --query="你好" --license=xxxx
50
+ ```
51
+ 命令执行后会以`STDOUT`形式返回模型完整的JSON数据日志,文件操作直接应用到文件
52
+
53
+ ## Command
54
+
55
+ | command | 是否必须 | option | 描述 |
56
+ |:---|:---|:---|:---|
57
+ | run | 是 | --license | license的值 |
58
+ | run | 是 | --query | 问题的内容 |
59
+ | run | | --cwd | 工作路径,默认执行时所在地址 |
60
+ | run | | --ripgrep | ripgrep的绝对路径 |
61
+ | | | --ping | 测试网络连通性 |
62
+ | | | --help | 帮助 |
63
+ | | | --version | 版本号 |
64
+
65
+ ## Env
66
+
67
+ | key | value | 描述 |
68
+ |:---|:---|:---|
69
+ | HTTP_PROXY | string | 设置代理 |
70
+ | http_proxy | string | 设置代理 |
71
+ | HTTPS_PROXY | string | 设置代理 |
72
+ | https_proxy | string | 设置代理 |
73
+ | HTTP_HOST | string | 设置服务地址,默认是 https://comate.baidu.com |
74
+ | DEBUG | boolean | 打开调试日志 |
75
+
76
+
77
+ ## 调试
78
+ * 使用环境变量`DEBUG=true`,`STDOUT`会显示debug级别的日志
79
+ * `~/.comate-engine/store`中获取对应轮次对话的详细日志
80
+
81
+ ## 最佳实践
82
+ * 请注意,`Zulu CLI`使用`Turbo`模式,黑名单是空,这也意味着`Zulu`会默认执行所以指令,请注意安全风险
83
+ * 目前版本只支持单轮次对话,请尽量准确描述任务
84
+
85
+ ## Dockerfile
86
+ ```dockerfile
87
+ FROM node:current-alpine3.22
88
+
89
+ # 安装 ripgrep
90
+ RUN apk add --no-cache ripgrep
91
+
92
+ # 全局安装 @comate/zulu-cli
93
+ RUN npm install -g @comate/zulu
94
+
95
+ WORKDIR /app
96
+
97
+ CMD ["zulu", "--help"]
98
+ ```
@@ -12,6 +12,9 @@
12
12
  "files": [
13
13
  "dist"
14
14
  ],
15
+ "publishConfig": {
16
+ "registry": "http://registry.npm.baidu-int.com"
17
+ },
15
18
  "repository": {
16
19
  "type": "git",
17
20
  "url": "ssh://wuweiqi@icode.baidu.com:8235/baidu/ide/comate-plugin-host"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comate/zulu",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "AI Coding Agent",
5
5
  "license": "MIT",
6
6
  "type": "module",