docs: 更新 GIS Actions 命令手册(v3.1.2)

This commit is contained in:
2026-07-19 02:54:47 +00:00
parent 4555f28591
commit ecb7b8c67f
+60 -5
View File
@@ -11,13 +11,62 @@
你的文件始终在你的机器上。GIS Actions 在你的机器上处理,不上传到云端。
输入:本地文件路径 | 输出:`/tmp/output/`
## gis-actions 工作原理
## 安装
GIS Actions`agc run`)在本地执行:
```bash
curl -sLO https://packages.mercator.cn/public/gis-actions/latest.deb
sudo dpkg -i gis-actions_latest.deb
```
要求:Docker Engine 已安装。
## 配置 API Key
所有操作前需先配置 API Key(在套件市场个人中心生成):
```bash
agc config set api-key mk_xxxxxxxxxxxxxxxxxxxx
agc config list # 查看所有配置
agc config get api-key # 查看(脱敏显示)
```
## gis-actions 全部命令
| 命令 | 用途 |
|------|------|
| `agc config` | 管理配置(API Key、市场地址等) |
| `agc run` | 执行套件 |
| `agc search <query>` | 搜索套件 |
| `agc info <suite-id>` | 查看套件详情 |
| `agc logs` | 查看运行历史 |
| `agc cache list / clean` | 管理本地缓存 |
| `agc doctor` | 环境诊断 |
| `agc mcp` | 启动 MCP 服务器(供 AI Agent 集成) |
| `agc self-update` | 自动升级 |
### agc run 用法
```bash
agc run /tmp/output --suite-id <suite-id> --input key=value
agc run /tmp/output --suite-id <suite-id> --input key=value --resume # 续跑
agc run /tmp/output --suite-id <suite-id> --input key=value --watch # 实时输出
```
### gis-actions 工作原理
GIS Actions 在本地执行:
1. 从套件市场获取脚本包地址
2. 下载脚本包到本地
3. 启动 Docker 容器(gis-base 镜像)执行脚本
4. 结果写入 `/tmp/output/`,脚本包自动清理
2. 下载脚本包到本地(首次下载后自动缓存)
3. 启动 Docker 容器(gis-base 镜像)按步骤执行
4. 结果写入工作目录,脚本包自动清理
## 排查问题
```bash
agc doctor # 一键检查:Docker、镜像、API Key、网络、配置
agc logs --status failed # 查看失败记录
agc self-update # 检查并升级到最新版
```
## 常见问题
@@ -32,3 +81,9 @@ A: 默认在工作目录的 `_step_outputs/` 下。
**Q: 能同时跑多个任务吗?**
A: 可以,打开多个终端各自跑 `agc run`
**Q: API Key 在哪生成?**
A: 登录套件市场 https://suites.mercator.cn → 个人中心 → API Key 管理 → 创建。
**Q: API Key 会不会过期?**
A: 长期有效。如需吊销,在套件市场个人中心操作。