docs: 更新工具安装指南,引用 SuiteHub Packages
This commit is contained in:
+40
-14
@@ -1,19 +1,46 @@
|
|||||||
# TOOLS.md — 套件开发工具与资源
|
# TOOLS.md — 套件开发工具与资源
|
||||||
|
|
||||||
## CLI
|
## 安装
|
||||||
|
|
||||||
|
### agentgis-cli(命令行工具)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 从 Gitea 安装
|
pip install https://git.mercator.cn/api/packages/SuiteHub/generic/agentgis-cli/0.1.0/agentgis_cli-0.1.0-py3-none-any.whl
|
||||||
pip install https://git.mercator.cn/SuiteHub/agentgis-cli/raw/branch/main/dist/agentgis_cli-0.1.0-py3-none-any.whl
|
|
||||||
|
|
||||||
# 配置
|
# 查看版本
|
||||||
|
agc --version
|
||||||
|
|
||||||
|
# 配置 API Key
|
||||||
agc config set api-key mk_xxxxxxxxxxx
|
agc config set api-key mk_xxxxxxxxxxx
|
||||||
|
```
|
||||||
|
|
||||||
|
### agentgis-sdk(Python 开发包)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install https://git.mercator.cn/api/packages/SuiteHub/generic/agentgis-sdk/0.1.0/agentgis_sdk-0.1.0-py3-none-any.whl
|
||||||
|
```
|
||||||
|
|
||||||
|
### gis-actions(本地执行器,可选)
|
||||||
|
|
||||||
|
开发者如需本地测试套件执行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 安装 gis-actions 软件包
|
||||||
|
# Debian/Ubuntu:
|
||||||
|
wget -O agentgis-worker.deb https://git.mercator.cn/api/packages/SuiteHub/generic/gis-actions/v2.0.0-alpha/agentgis-worker_2.0.0-alpha_all.deb
|
||||||
|
sudo dpkg -i agentgis-worker.deb
|
||||||
|
# 配置后启动
|
||||||
|
sudo systemctl start agentgis-worker
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## CLI 用法
|
||||||
|
|
||||||
|
```bash
|
||||||
# 🔍 查市场(写代码前先做这个)
|
# 🔍 查市场(写代码前先做这个)
|
||||||
agc suites search <关键词> # 搜索已有套件
|
agc suites search <关键词> # 搜索已有套件
|
||||||
agc suites list # 列出所有套件
|
agc suites list # 列出所有套件
|
||||||
agc suites search <关键词> # 搜索已有套件
|
|
||||||
agc suites list # 列出所有套件
|
|
||||||
|
|
||||||
# 初始化新套件
|
# 初始化新套件
|
||||||
agc init ./my-analysis
|
agc init ./my-analysis
|
||||||
@@ -25,13 +52,14 @@ agc run <suite-id> --inputs '{"expression": "1+1"}'
|
|||||||
agc publish ./my-analysis
|
agc publish ./my-analysis
|
||||||
```
|
```
|
||||||
|
|
||||||
## API 端点(直接调用时)
|
## API 端点
|
||||||
|
|
||||||
| 用途 | 端点 |
|
| 用途 | 端点 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| 发布 Suite | `POST https://suites.mercator.cn/api/v1/suites` |
|
| 发布 Suite | `POST https://suites.mercator.cn/api/v1/suites` |
|
||||||
| 注册 Suite | `POST https://suites.mercator.cn/api/v1/suites` |
|
|
||||||
| 执行任务 | `POST https://suites.mercator.cn/api/v1/task` |
|
| 执行任务 | `POST https://suites.mercator.cn/api/v1/task` |
|
||||||
|
| 数据类型列表 | `GET https://suites.mercator.cn/api/v1/data-types` |
|
||||||
|
| 业务类型列表 | `GET https://suites.mercator.cn/api/v1/business-types` |
|
||||||
| API 文档 | `https://suites.mercator.cn/docs` |
|
| API 文档 | `https://suites.mercator.cn/docs` |
|
||||||
|
|
||||||
## 套件结构
|
## 套件结构
|
||||||
@@ -45,14 +73,12 @@ my-suite/
|
|||||||
|
|
||||||
## 基础镜像
|
## 基础镜像
|
||||||
|
|
||||||
所有套件在 gis-base 镜像中执行,包含:Python 3, GDAL, Shapely, GeoPandas
|
所有套件在 gis-base 镜像中执行,包含:Python 3, GDAL, Shapely, GeoPandas, numpy
|
||||||
|
|
||||||
## 参考示例
|
## 知识库
|
||||||
|
|
||||||
查看 `SuiteHub` 组织下的公开仓库:
|
- `knowledge/script-data-types.md` — 脚本数据类型分类规范
|
||||||
- `hello-world-suite` — 最小模板
|
- `knowledge/script-dependencies.md` — 脚本依赖管理规范
|
||||||
- `math-add` — 算术相加
|
|
||||||
- `buffer-analysis` — 缓冲区分析
|
|
||||||
|
|
||||||
## 文档
|
## 文档
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user