Skip to main content
GuidesBeginner1 min read

Producing JSON Output from a Scan

Generate machine-readable JSON from a Vibgrate scan for scripting, dashboards, and custom tooling. Learn the --format json flag and how to combine it with --out.

Vibgrate Docs

Vibgrate Help

This article explains how to get structured JSON from a Vibgrate CLI scan so you can feed results into scripts, dashboards, and custom integrations. It is for developers and platform engineers building automation around drift data.

Overview

The Vibgrate CLI supports four output formats. JSON is the format to choose when a human is not the consumer: it gives you the full structured result, including the DriftScore and findings, in a form your tools can parse.

Step-by-step

Emit JSON to standard output:

vg scan --format json

Write the JSON to a file instead of the terminal:

vg scan --format json --out drift.json

With no install, use the npx form:

npx @vibgrate/cli scan --format json

Working with the output

The JSON document contains the DriftScore and the structured findings the scan produced. Pipe it into a JSON processor, store it as a build artifact, or load it in your own scripts. Because it is deterministic and structured, JSON is the right input for trend tracking that you build yourself.

If you want results visible to your whole team rather than parsed locally, consider vg push to send them to Vibgrate Cloud.

Options that pair well with JSON

  • --out writes the result to a named file.
  • --quiet suppresses extra console chatter so only the intended output is produced.
  • --fail-on still controls the exit code, which is useful when scripting around the JSON.

Related

See the output formats guide, the SARIF output guide, the writing results to a file guide, and the scan command reference.

Related Commands