JSON Output
Generating JSON output
vipr analyze "src/**/*.{ts,tsx}" --format json --output report.json
json output
json is the compact, file-oriented format. It serializes the default envelope shape:
{
"$schema": "1.0.0",
"format": "default",
"timestamp": "2026-04-10T19:00:00.000Z",
"analyzerVersion": "0.29.0",
"data": {
"filePath": "src/App.tsx",
"score": 85,
"complexity": {
"cyclomatic": 5,
"decisionPoints": 3,
"maintainability": {
"index": 82,
"rating": "A"
}
},
"insights": {
"critical": 0,
"warning": 1,
"info": 2
},
"criticalInsights": [],
"plugins": [
{
"pluginId": "core",
"score": 84,
"insightCount": 1
}
]
}
}
When you analyze multiple files, json emits a summary plus a files array inside the same
envelope.
json vs json-full
| Format | Serialized format value |
Best for |
|---|---|---|
json |
default |
CI jobs, scripts, and lightweight automations |
json-full |
full |
Tooling integrations that need complete plugin and analysis breakdowns |
json-full keeps the same envelope shape but expands the data payload to include the full file
result:
analyzedAtscoreinsightspluginskeyed by plugin IDerrors
vipr analyze "src/**/*.{ts,tsx}" --format json-full --output full-report.json
Piping to other tools
# Show only files with findings
vipr analyze "src/**/*.ts" --format json | jq '.[] | select(.insights | length > 0)'
# Count insights by severity
vipr analyze "src/**/*.ts" --format json | jq '[.[].insights[]] | group_by(.severity) | map({(.[0].severity): length}) | add'
Use --compact with json or json-full if you want minified output for transport.