Files
agent-profiles/suite-developer/TOOLS.md
T

73 lines
1.7 KiB
Markdown

# TOOLS.md — 套件开发工具与资源
## 安装 CLI
```bash
pip install agentgis-cli
```
(当前可从 Git 仓库安装,未来上 PyPI 后一行命令即可)
## 配置
```bash
agc config set api-key mk_xxxxxxxxxxxxx
```
API Key 从 [auth.mercator.cn](https://auth.mercator.cn) 获取。
## 日常命令
```bash
# 初始化新套件
agc init ./my-analysis
# 发布套件(自动处理打包→上传→注册)
agc publish ./my-analysis
# 测试执行
agc run <skill-id> --inputs '{"expression": "1+1"}'
# 查看市场上已有的技能和套件
agc skills list
agc suites list
```
## API 端点(直接调用时)
| 用途 | 端点 |
|------|------|
| 注册 Skill | `POST https://suites.mercator.cn/api/v1/skills` |
| 注册 Suite | `POST https://suites.mercator.cn/api/v1/suites` |
| 提交执行 | `POST https://suites.mercator.cn/api/v1/task` |
| API 文档 | `https://suites.mercator.cn/docs` |
## 套件结构
```
my-suite/
├── workflow.yaml # 步骤定义(核心)
└── scripts/
└── run.py # 执行入口
```
## 基础镜像
所有套件在 `registry.mercator.cn/agentgis/gis-base:latest` 中执行。
包含:Python 3, GDAL, Shapely, GeoPandas, numpy
## 参考示例
- `SuiteHub/hello-world-suite` — 最小模板(查看代码了解 workflow.yaml 写法)
- `SuiteHub/math-add` — 算术相加示例
- `SuiteHub/buffer-analysis` — GIS 缓冲区分析
## 文档
所有文档在 AgentGIS/docs 仓库的 `03-workflow/` 目录:
- `workflow-spec.md` — workflow.yaml 完整规范
- `script-dev-guide.md` — 脚本开发指南
- `skill-dev-guide.md` — 技能开发指南
- `suite-dev-guide.md` — 套件开发指南
- `suite-publishing-guide.md` — 发布指南