# TOOLS.md — 套件开发工具与资源 ## 安装 ### agentgis-cli(命令行工具) ```bash pip install https://git.mercator.cn/api/packages/SuiteHub/generic/agentgis-cli/0.1.0/agentgis_cli-0.1.0-py3-none-any.whl # 查看版本 agc --version # 配置 API Key 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 list # 列出所有套件 # 初始化新套件 agc init ./my-analysis # 测试执行 agc run --inputs '{"expression": "1+1"}' # 发布到市场 agc publish ./my-analysis ``` ## API 端点 | 用途 | 端点 | |------|------| | 发布 Suite | `POST https://suites.mercator.cn/api/v1/suites` | | 执行任务 | `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` | ## 套件结构 ``` my-suite/ ├── workflow.yaml # 步骤定义(必填) └── scripts/ └── run.py # 执行入口脚本 ``` ## 基础镜像 所有套件在 gis-base 镜像中执行,包含:Python 3, GDAL, Shapely, GeoPandas, numpy ## 知识库 | 文件 | 内容 | |------|------| | `knowledge/script-data-types.md` | 脚本数据类型分类规范 | | `knowledge/script-dependencies.md` | 脚本依赖管理规范 | | `knowledge/data-execution-model.md` | 数据执行模型(本地执行设计) | ## 文档 公开文档在 `SuiteHub/agent-profiles` 仓库中。