@ganhaiapp/cli 0.1.0 → 0.2.0

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.
Files changed (2) hide show
  1. package/README.md +14 -1
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @ganhaiapp/cli
2
2
 
3
- 赶海 GanHai 命令行工具 —— 开放 API 客户端(93-P2 正式版 0.1.0)。
3
+ 赶海 GanHai 命令行工具 —— 开放 API 客户端 + MCP 服务(0.2.0)。
4
4
 
5
5
  ## 安装
6
6
 
@@ -9,6 +9,17 @@ npm install -g @ganhaiapp/cli # 主通道(自动安装当前平台分包
9
9
  npx @ganhaiapp/cli <命令> # 免安装直接用
10
10
  ```
11
11
 
12
+ ## MCP 接入(AI 客户端)
13
+
14
+ ```bash
15
+ ganhai mcp install # 自动检测 Claude Desktop / Cursor / VS Code 并写入配置
16
+ ganhai mcp serve # 或手动在客户端配置:{"mcpServers":{"ganhai":{"command":"ganhai","args":["mcp","serve"]}}}
17
+ ganhai mcp status # 查看配置状态
18
+ ```
19
+
20
+ tools 按 API Key 的 scope 动态裁剪——无权限的动作模型连名字都看不到。
21
+ 新增服务端端点后 MCP tools 自动获得(元数据驱动,客户端零更新)。
22
+
12
23
  主包不含二进制;平台二进制(win32/linux × x64/arm64、darwin × x64/arm64)经
13
24
  optionalDependencies 平台分包提供,npm 按 os/cpu 自动择包。
14
25
 
@@ -25,6 +36,8 @@ ganhai inventory list # 库存
25
36
  ganhai finance summary # 财务汇总
26
37
  ganhai docs # 当前 Key 可见的端点清单
27
38
  ganhai schema show GET /api/v1/open/erp/orders # 端点参数/scope 内省
39
+ ganhai whoami # 验证登录(org/scope/可用动作数)
40
+ ganhai skill show agent-setup # Agent 接入手册(教学包)
28
41
  ```
29
42
 
30
43
  ## Agent 友好(脚本/智能体场景)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ganhaiapp/cli",
3
- "version": "0.1.0",
4
- "description": "赶海 GanHai CLI —— 开放 API 命令行客户端(设备码登录 / 只读命令 / schema 内省;MCP 93-P3 发布)",
3
+ "version": "0.2.0",
4
+ "description": "赶海 GanHai CLI —— 开放 API 命令行客户端(设备码登录 / 只读命令 / MCP stdio 服务 / skill 教学包)",
5
5
  "bin": {
6
6
  "ganhai": "bin/ganhai.js"
7
7
  },
@@ -17,10 +17,10 @@
17
17
  },
18
18
  "license": "UNLICENSED",
19
19
  "optionalDependencies": {
20
- "@ganhaiapp/cli-win32-x64": "0.1.0",
21
- "@ganhaiapp/cli-linux-x64": "0.1.0",
22
- "@ganhaiapp/cli-linux-arm64": "0.1.0",
23
- "@ganhaiapp/cli-darwin-x64": "0.1.0",
24
- "@ganhaiapp/cli-darwin-arm64": "0.1.0"
20
+ "@ganhaiapp/cli-win32-x64": "0.2.0",
21
+ "@ganhaiapp/cli-linux-x64": "0.2.0",
22
+ "@ganhaiapp/cli-linux-arm64": "0.2.0",
23
+ "@ganhaiapp/cli-darwin-x64": "0.2.0",
24
+ "@ganhaiapp/cli-darwin-arm64": "0.2.0"
25
25
  }
26
26
  }