@yunkeai/yunke-cli 3.0.0 → 3.0.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 CHANGED
@@ -1,93 +1,93 @@
1
- # yunke-cli
2
-
3
- AI-native 可插拔 CLI 框架。所有命令输出均为 JSON,便于 AI agent 消费。
4
-
5
- ## 安装
6
-
7
- ```bash
8
- npm install -g @yunkeai/yunke-cli
9
- ```
10
-
11
- ## 快速开始
12
-
13
- ```bash
14
- # 查看所有可用命令
15
- yunke schema
16
-
17
- # 查看某个命令的详细参数和返回值 schema
18
- yunke schema.detail --command <command-name>
19
-
20
- # 查看帮助
21
- yunke help
22
- ```
23
-
24
- ## 命令输出格式
25
-
26
- 所有命令统一返回 JSON 信封:
27
-
28
- ```json
29
- {
30
- "success": true,
31
- "data": {},
32
- "error": null,
33
- "metadata": {
34
- "command": "schema",
35
- "duration_ms": 2,
36
- "timestamp": "2026-04-10T00:00:00.000Z",
37
- "plugin": "builtin:schema"
38
- }
39
- }
40
- ```
41
-
42
- ## 内置命令
43
-
44
- | 命令 | 说明 |
45
- |------|------|
46
- | `schema` | 列出所有可用命令 |
47
- | `schema.detail --command <name>` | 查看指定命令的完整 schema |
48
- | `help` | 显示帮助信息 |
49
- | `plugin.list` | 列出已安装插件 |
50
- | `plugin.install --path <path>` | 安装插件 |
51
- | `plugin.remove --name <name>` | 移除插件 |
52
- | `feature.list` | 列出所有 feature flag |
53
- | `feature.enable --name <name>` | 启用 feature |
54
- | `self.check` | 检查是否有新版本 |
55
- | `self.update` | 更新到最新版本 |
56
-
57
- ## 插件
58
-
59
- ### crm
60
-
61
- 云客 CRM 集成插件,提供认证、组织架构查询和报表功能。
62
-
63
- ```bash
64
- # 登录(浏览器 OAuth 授权,凭证写入 ~/.yunke/crm.json)
65
- yunke crm.auth.login-web
66
-
67
- # 查看登录状态(exit 0 + "Logged in as <名字>" = 已登录)
68
- yunke crm.auth.status
69
-
70
- # 查询部门树
71
- yunke crm.org.department-tree
72
-
73
- # 员工报表(部门维度)
74
- yunke crm.report.employee-statistics --option department --start_time 2026-04-01 --end_time 2026-04-08
75
-
76
- # 员工报表(员工维度)
77
- yunke crm.report.employee-statistics --option employee --start_time 2026-04-01 --end_time 2026-04-08
78
- ```
79
-
80
- ### skillshub
81
-
82
- 技能市场插件,管理本地安装的 skills。
83
-
84
- ```bash
85
- yunke skillshub.search --keyword <keyword>
86
- yunke skillshub.install --slug <slug>
87
- yunke skillshub.list
88
- yunke skillshub.upgrade
89
- ```
90
-
91
- ## License
92
-
1
+ # yunke-cli
2
+
3
+ AI-native 可插拔 CLI 框架。所有命令输出均为 JSON,便于 AI agent 消费。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm install -g @yunkeai/yunke-cli
9
+ ```
10
+
11
+ ## 快速开始
12
+
13
+ ```bash
14
+ # 查看所有可用命令
15
+ yunke schema
16
+
17
+ # 查看某个命令的详细参数和返回值 schema
18
+ yunke schema.detail --command <command-name>
19
+
20
+ # 查看帮助
21
+ yunke help
22
+ ```
23
+
24
+ ## 命令输出格式
25
+
26
+ 所有命令统一返回 JSON 信封:
27
+
28
+ ```json
29
+ {
30
+ "success": true,
31
+ "data": {},
32
+ "error": null,
33
+ "metadata": {
34
+ "command": "schema",
35
+ "duration_ms": 2,
36
+ "timestamp": "2026-04-10T00:00:00.000Z",
37
+ "plugin": "builtin:schema"
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## 内置命令
43
+
44
+ | 命令 | 说明 |
45
+ |------|------|
46
+ | `schema` | 列出所有可用命令 |
47
+ | `schema.detail --command <name>` | 查看指定命令的完整 schema |
48
+ | `help` | 显示帮助信息 |
49
+ | `plugin.list` | 列出已安装插件 |
50
+ | `plugin.install --path <path>` | 安装插件 |
51
+ | `plugin.remove --name <name>` | 移除插件 |
52
+ | `feature.list` | 列出所有 feature flag |
53
+ | `feature.enable --name <name>` | 启用 feature |
54
+ | `self.check` | 检查是否有新版本 |
55
+ | `self.update` | 更新到最新版本 |
56
+
57
+ ## 插件
58
+
59
+ ### crm
60
+
61
+ 云客 CRM 集成插件,提供认证、组织架构查询和报表功能。
62
+
63
+ ```bash
64
+ # 登录(浏览器 OAuth 授权,凭证写入 ~/.yunke/crm.json)
65
+ yunke crm.auth.login-web
66
+
67
+ # 查看登录状态(exit 0 + "Logged in as <名字>" = 已登录)
68
+ yunke crm.auth.status
69
+
70
+ # 查询部门树
71
+ yunke crm.org.department-tree
72
+
73
+ # 员工报表(部门维度)
74
+ yunke crm.report.employee-statistics --option department --start_time 2026-04-01 --end_time 2026-04-08
75
+
76
+ # 员工报表(员工维度)
77
+ yunke crm.report.employee-statistics --option employee --start_time 2026-04-01 --end_time 2026-04-08
78
+ ```
79
+
80
+ ### skillshub
81
+
82
+ 技能市场插件,管理本地安装的 skills。
83
+
84
+ ```bash
85
+ yunke skillshub.search --keyword <keyword>
86
+ yunke skillshub.install --slug <slug>
87
+ yunke skillshub.list
88
+ yunke skillshub.upgrade
89
+ ```
90
+
91
+ ## License
92
+
93
93
  MIT