@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 +5 -5
- package/README.md +5 -6
- package/dist/cli.js +232 -191
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/skill/SKILL.md +10 -0
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`)
|
|
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
|
-
**
|
|
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
|
|
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 (
|
|
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
|
|
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
|
-
**
|
|
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
|
|
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.
|
|
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)
|