docs: 全面更新过期引用 — agentgis-cli→gis-actions, 版本 3.0.2
This commit is contained in:
+11
-21
@@ -2,11 +2,15 @@
|
||||
|
||||
## 安装
|
||||
|
||||
`agc` 命令随 gis-actions 包一起安装:
|
||||
|
||||
```bash
|
||||
# 从 Gitea 安装
|
||||
pip install https://git.mercator.cn/SuiteHub/agentgis-cli/raw/branch/main/dist/agentgis_cli-0.1.0-py3-none-any.whl
|
||||
curl -sLO https://git.mercator.cn/api/packages/SuiteHub/generic/gis-actions/3.0.2/gis-actions_3.0.2_all.deb
|
||||
sudo dpkg -i gis-actions_3.0.2_all.deb
|
||||
```
|
||||
|
||||
安装后直接使用 `agc` 命令。
|
||||
|
||||
## 配置
|
||||
|
||||
```bash
|
||||
@@ -18,32 +22,18 @@ agc config set api-key mk_xxxxxxxxxxxxx
|
||||
### 查询套件
|
||||
|
||||
```bash
|
||||
# 列出所有套件
|
||||
agc suites list
|
||||
|
||||
# 搜索套件
|
||||
agc suites search <关键词>
|
||||
|
||||
# 查看套件详情
|
||||
agc suites get <suite-id>
|
||||
```
|
||||
|
||||
### 执行
|
||||
### 执行套件
|
||||
|
||||
```bash
|
||||
# 执行套件
|
||||
agc run <suite-id> --inputs '{"expression": "1+1"}'
|
||||
|
||||
# 查看执行状态
|
||||
agc status <task-id>
|
||||
agc run <suite-id> --inputs '{"key": "val"}' --wait --poll 5
|
||||
```
|
||||
|
||||
### 开发
|
||||
### 发布套件
|
||||
|
||||
```bash
|
||||
# 从模板创建新套件
|
||||
agc init ./my-suite
|
||||
|
||||
# 发布套件
|
||||
agc publish ./my-suite
|
||||
tar czf suite.tgz --exclude='.git' --exclude='__pycache__' my-suite/
|
||||
agc publish upload suite.tgz
|
||||
```
|
||||
|
||||
@@ -1,36 +1,8 @@
|
||||
# Python SDK
|
||||
# Python SDK(已废弃)
|
||||
|
||||
## 安装
|
||||
`agentgis-sdk` 已不再维护。功能已被 `gis-actions` 命令行工具覆盖。
|
||||
|
||||
```bash
|
||||
```
|
||||
|
||||
## 快速开始
|
||||
|
||||
```python
|
||||
from agentgis import AgentGIS
|
||||
|
||||
client = AgentGIS(api_key="mk_xxxxxxxxx", base_url="https://suites.mercator.cn")
|
||||
|
||||
# 查询套件列表
|
||||
suites = client.list_suites()
|
||||
for s in suites:
|
||||
print(f"{s.name} v{s.version}")
|
||||
|
||||
# 查询套件详情
|
||||
detail = client.get_suite("suite-id-xxx")
|
||||
print(detail.description)
|
||||
|
||||
# 执行套件
|
||||
execution = client.execute_suite("suite-id-xxx", inputs={"buffer_distance": 0.5})
|
||||
print(f"Execution: {execution.execution_id}")
|
||||
|
||||
# 查询执行状态
|
||||
status = client.get_execution(execution.execution_id)
|
||||
print(f"Status: {status.status}")
|
||||
```
|
||||
|
||||
## API 参考
|
||||
|
||||
完整的 API 客户端方法列表和参数说明见自动生成的 API 文档:
|
||||
[https://suites.mercator.cn/docs](https://suites.mercator.cn/docs)
|
||||
替代方案:
|
||||
- `agc suites list` — 列出套件
|
||||
- `agc run` — 执行套件
|
||||
- `agc publish upload` — 发布套件
|
||||
|
||||
Reference in New Issue
Block a user