@ggts-sh/cli (英语)
ggts check 财务报告和审定财务报表 ggts render: 验证并向 SVG 提供 ggts 绘图 spec( JSON)
命令线 这是作者 specs 的代理的反馈回路—— 它
显示验证错误、警告和仅 JSON 工作流程建议
从来没有看到.
此软件包为何存在
嵌入式分析代理写出一个 spec, 主机 Webapp 使其与
@ggts-sh/react 或者说 @ggts-sh/svelte没有这个CLI在代理的沙盒,代理船
光谱盲:光谱可以有计划,但可以绘制一个误导性的图表
管道警告(减速堆栈、单观测组、规模)
推论问题)在网络应用中开火,没有人读取. 随着CLI,
将JSONL的诊断结果读取在 Stderr 上,并修正
在别人看到之前的画面.
如果您嵌入了 spec- 写入代理, 请将此包作为安装的一部分 合同,不是一个选择.
CLI涵盖什么(和不包括什么)
| 每一出戏都盖住 | Opt- in/ 主机侧 |
|---|---|
Schema 验证 (validate(中文(简体) ) | 东道主检查 模式 和大多数交互线条 |
| 管道警告和咨询 | 运行时间密钥/ 线程错误( 需要实时图) |
规模推论诊断(source: "scale"(中文(简体) ) | 组成/折旧 ondiagnostic 没有主机 |
斯佩克林咨询公司(Spec-lint)source: "spec-lint"(中文(简体) ) | 完整的工具提示视觉QA |
检查模式是 东道主 能力(<Inspect mode="xy" /> / 绘图
inspect),而不是PortableSpec字段。 显示同样的检查X地表
咨询人员只能通过 ondiagnostic 在浏览器中, 声明主机
意图 :
ggts render --inspect xy spec.json > out.svg
# stderr may include:
# {"kind":"advisory","source":"interaction","code":"INTERACTION_INSPECT_X_ON_COL",…}
模式 : auto, (中文(简体) ), exact, (中文(简体) ), x, (中文(简体) ), y, (中文(简体) ), xy (与主持人同为enum). 无
--inspect,交互代码没有被发明——无头的 SVG 唯一的图表
安静点 今天,这条路径覆盖了巴/col x-指向纯收藏家(包括
别名重写如此 geom: "histogram" 匹配主机 normalize; 高心动性
而运行时间密钥/线程诊断仍需要挂载主机. 见
ADR 0024 (英语)。 。 。 .
安装
npm install --save-dev --save-exact @ggts-sh/cli
npm exec -- ggts check spec.json
npm exec -- ggts render spec.json > out.svg
在代理沙盒图像中 :
FROM node:24-slim
RUN npm install -g @ggts-sh/cli
# agents can now run: ggts render spec.json > out.svg
按下您 Webapp 制作的架构适配器的同版本
与——所有 @ggts-sh/* 软件包版本已锁定.
使用量
check 运行相同的管道和渲染检查 render,压制
SVG输出. 两者都保留同样的诊断和出站码合同.
ggts check spec.json # full checks without SVG
ggts render spec.json > out.svg # spec from a file
ggts render < spec.json > out.svg # spec from stdin
ggts render spec.json --data data.json # named datasets from a file
ggts render spec.json --width 832 --height 400
ggts render --inspect xy spec.json > out.svg # host inspect intent
render写入 SVG 键入;check留点空出.- 诊断结果作为JSON的线条
{"kind":"error",…}|{"kind":"warning",…}|{"kind":"advisory",…}。 。 。 . 规模推论诊断集source: "scale"; spec-lint 组合source: "spec-lint"; 交互意图 (--inspect(组数)source: "interaction"。 。 。 .
退出代码
| 代码 | 含义 |
|---|---|
| 0 个 | 检查或提供 |
| 1个 | 渲染失败( 管道错误—— spec在结构上有效) |
| 2个 | 使用错误( 糟糕的旗帜、 无法读取的输入、 无效的 JSON) |
| 3个 | 无效的光谱( 验证错误- 见 stderr JSON 线条) |
代理环: 渲染; 3号出口应用 fix.example 从每个 stderr
其错误 path,重新提交;在出口0时仍读作stderr——警告和
咨询意见是图表质量反馈.
参考文献
- CLI 参考 所有选项和 诊断
- 不产卵程序使用 :
runCommand接受render编号 :check。 。 。 . 现有runCLI仍可提供方案的API.