@zleap-ai/sag-cli 0.3.0 → 0.4.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.
package/README.en.md CHANGED
@@ -21,12 +21,12 @@ For release notes see [CHANGELOG.md](CHANGELOG.md).
21
21
  | Task | Requirement |
22
22
  | ------------------------------------ | ------------------------------------------------------------------------- |
23
23
  | Install and run the CLI | Node.js **≥ 20.19** |
24
- | Sign in and search via the HTTP API | A reachable SAG origin (e.g. `http://localhost:8000`) plus a SAG JWT |
24
+ | Sign in and search via the HTTP API | A reachable SAG origin (e.g. `http://localhost:8000`) |
25
25
  | Use the local Docker token-less path | Docker CLI, with a SAG API container running `sag_api.mcp.server` locally |
26
26
  | Wire into Codex | Codex CLI (≥ 0.145) installed |
27
27
  | Wire into Claude Code | Claude Code (≥ 2.1) installed |
28
28
 
29
- **Where to get the JWT**: sign in to SAG Web **Settings → Integrations** and copy the JWT. The CLI hides the input and prefers the OS credential store (macOS Keychain, Windows Credential Manager, Linux Secret Service). When that is unavailable the token stays only in the current process; use the `SAG_TOKEN` environment variable in automation.
29
+ **HTTP API sign-in**: the CLI calls SAG's existing name-login API and stores the returned JWT in the OS credential store (macOS Keychain, Windows Credential Manager, or Linux Secret Service). No SAG Web page or copied Token is required; automation can still use the `SAG_TOKEN` environment variable.
30
30
 
31
31
  ## Install
32
32
 
@@ -75,7 +75,7 @@ Undo an integration:
75
75
  sag agent disconnect codex
76
76
  ```
77
77
 
78
- ### Path B: HTTP API + JWT (across machines, or no Docker)
78
+ ### Path B: HTTP API direct sign-in (across machines, or no Docker)
79
79
 
80
80
  Authenticate and search against SAG's HTTP API directly.
81
81
 
@@ -84,8 +84,8 @@ Authenticate and search against SAG's HTTP API directly.
84
84
  sag profile add local http://localhost:8000
85
85
  sag profile use local
86
86
 
87
- # 2. Sign in (prompts for the JWT)
88
- sag auth login
87
+ # 2. Sign in (no browser or copied Token)
88
+ sag auth login --name "Your name"
89
89
  sag auth status
90
90
 
91
91
  # 3. Health check and browse
package/README.md CHANGED
@@ -21,12 +21,12 @@
21
21
  | 你想做的事 | 需要准备 |
22
22
  | --------------------------- | ----------------------------------------------------------- |
23
23
  | 安装并运行 CLI | Node.js **≥ 20.19** |
24
- | 用 HTTP API 登录、搜索 | 一个可访问的 SAG Origin(如 `http://localhost:8000`)+ JWT |
24
+ | 用 HTTP API 登录、搜索 | 一个可访问的 SAG Origin(如 `http://localhost:8000`) |
25
25
  | 用本机 Docker 免 Token 路径 | Docker CLI,且本机运行着含 `sag_api.mcp.server` 的 SAG 容器 |
26
26
  | 接入 Codex | 已安装 Codex CLI(≥ 0.145) |
27
27
  | 接入 Claude Code | 已安装 Claude Code(≥ 2.1) |
28
28
 
29
- **JWT 从哪拿**:登录 SAG Web **Settings → Integrations**,复制其中的 JWT。CLI 会隐藏输入并优先保存到系统凭据存储(macOS Keychain、Windows Credential Manager、Linux Secret Service);不可用时只保留在当前进程,自动化环境请改用 `SAG_TOKEN` 环境变量。
29
+ **HTTP API 登录方式**:CLI 直接调用 SAG 现有的名称登录接口,并把返回的 JWT 保存到系统凭据存储(macOS Keychain、Windows Credential Manager、Linux Secret Service)。不需要打开 SAG Web 或复制 Token;自动化场景仍可使用 `SAG_TOKEN` 环境变量。
30
30
 
31
31
  ## 安装
32
32
 
@@ -75,7 +75,7 @@ sag agent connect codex --dry-run
75
75
  sag agent disconnect codex
76
76
  ```
77
77
 
78
- ### 路径 B:HTTP API + JWT(跨机器、或本机没有 Docker)
78
+ ### 路径 B:HTTP API 直连(跨机器、或本机没有 Docker)
79
79
 
80
80
  用 SAG 的 HTTP API 做认证、查询、检索。
81
81
 
@@ -84,8 +84,8 @@ sag agent disconnect codex
84
84
  sag profile add local http://localhost:8000
85
85
  sag profile use local
86
86
 
87
- # 2. 登录(会提示输入 JWT
88
- sag auth login
87
+ # 2. 登录(不打开浏览器、不复制 Token
88
+ sag auth login --name "你的名字"
89
89
  sag auth status
90
90
 
91
91
  # 3. 体检 + 看信源
@@ -208,7 +208,6 @@ Token 不会出现在 JSON、日志或错误输出里。完整错误码与退出
208
208
 
209
209
  - 本地开发与调试:[中文](docs/development.zh-CN.md) / [English](docs/development.md)
210
210
  - 兼容性矩阵:[中文](docs/compatibility.zh-CN.md) / [English](docs/compatibility.md)
211
- - OAuth 与 MCP 授权:[中文](docs/oauth.zh-CN.md) / [English](docs/oauth.md)
212
211
  - 发布流程:[中文](docs/release.zh-CN.md) / [English](docs/release.md)
213
212
  - [CONTRIBUTING.md](CONTRIBUTING.md)
214
213
  - [SECURITY.md](SECURITY.md)