[社区生态] 基于 OpenAPI 实现了 CLI,把 Sive 带进终端与 CI/CD 流水线(附接口实测反馈)
- Dominant language
- No language data
- Stars
- 8
- Forks
- 0
- Avg merge
- 3m
- Merged PRs (30d)
- 10
Description
## 背景
很看好 Sive「自然语言出图」的方向,但有团队场景更偏周报 / CI 自动化,于是把 OpenAPI 封装成了命令行工具,已发布 npm,来向社区分享一下,方向合适的话愿意持续维护或贡献回去。
- npm:https://www.npmjs.com/package/@lyw405/sive-cli
- GitHub:https://github.com/lyw405/sive-cli
## 它能做什么
`npm i -g @lyw405/sive-cli` 安装,命令为 `sive`:
- `upload` CSV / JSON / Excel 创建数据集
- `query` 只读 SQL,`--json` 输出便于管道处理
- `ask` / `status` 自然语言生成单图 / 报告,自动轮询状态
- `chart` 23 种图表服务端渲染 PNG,CI 里可直接出图提交进周报
- 失败统一非零退出码,天然适配流水线
## 实测反馈(文档未覆盖的行为,供团队参考)
1. `POST /dataset/excute-sql` 的 `excute` 为官方拼写(一开始以为是笔误不敢用)
2. Excel 导入后表名为工作表名、列名可能为 A1/B1 单元格编号,首行表头会作为数据行
3. `vis/generate` 返回图片实际分辨率为请求尺寸的 3 倍(600×400 → 1800×1200)
4. `app/create` 的 AI 侧只认 Prompt 中的 Dataset ID(或粘贴的数据),仅写数据集名称不会自动关联
## 两个小问题
1. 官方 README 是否考虑加一个「社区工具」入口?终端 / CI 场景可以和现有「在 AI 工具中使用」一节互补
2. OpenAPI 是否有 changelog 或版本化机制?CLI 跟接口变更,稳定 spec 能减少 break
如有不妥请指出,我来调整。辛苦!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the repository README and the linked community CLI, then review the OpenAPI behavior and versioning questions described here. Done means the project has decided whether to document the community tool and whether an API changelog or versioning mechanism is in scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, ci-cd, cli, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100