Command-line reference

ggts render reads PortableSpec JSON and writes deterministic SVG. ggts check runs the same validation and rendering checks with no SVG output. Its option list below comes from the same package-private registry as argument parsing and --help.

Install

The CLI ships as its own package, @ggts-sh/cli — it does not arrive with @ggts-sh/svelte. If an agent authors specs in a sandbox, install the CLI in that sandbox: it is how the agent sees validation errors and chart-quality warnings before a chart ships.

npm install -g @ggts-sh/cli

Input and output

Pass one JSON file or omit it to read stdin. SVG is the only stdout output.

ggts render spec.json > chart.svg 2> diagnostics.jsonl

Errors, warnings, and advisories are JSON Lines on stderr.

Options

--width N

Plot width in px (default: spec.width, then 832).

--height N

Plot height in px (default: spec.height, then 400).

--data FILE

JSON file with named datasets.

{"name": rows|columns|{values}|{columns}}

--max-marks N

Refuse to render more marks than N (default 100000).

--inspect MODE

Host inspect intent for interaction advisories.

auto|exact|x|y|xy — host-only; not a PortableSpec field

--version

Print the installed ggts CLI version.

--help

Show this help.

Alias: -h.

Exit codes

0
Checked or rendered successfully.
1
The pipeline or renderer failed after structural validation.
2
Usage, input, file, or JSON parsing failed.
3
The PortableSpec failed validation.

Troubleshooting

Keep stdout and stderr separate. Search the source-qualified code in the Errors reference, correct the input, and rerun the same command.