Skip to main content
Commands

vg report

Generate human-readable reports from scan artifacts in Markdown, text, or JSON.

Overview

vg report transforms scan artifacts into human-readable formats for sharing with stakeholders. It supports Markdown, text, and JSON output.

Note: This command reads existing artifacts — it does not run a new scan. Run vg scan first.


Usage

vg report [options]

Options

FlagDefaultDescription
--in <file>.vibgrate/scan_result.jsonInput scan artifact
--format <type>textOutput format: md, text, json
--out <file>stdoutWrite output to file

Output Formats

Markdown (--format md)

vg report --format md --out report.md

Example Output:

# Vibgrate Drift Report

**Generated:** 2025-01-15T10:30:00Z  
**DriftScore:** 67/100

## Summary

| Metric | Value |
|--------|-------|
| Projects | 4 |
| Findings | 12 |
| Errors | 3 |

## Top Findings

### 🔴 Node.js 16.x is EOL
**Severity:** Error  
**Recommendation:** Upgrade to Node.js 20.x or 22.x

Best For: PR comments, wikis, documentation

Text (--format text)

vg report --format text

Best For: Terminal output, email summaries, logs

JSON (--format json)

vg report --format json --out report.json

Best For: Automation, further processing, archival


Examples

Generate PR Comment

# Generate markdown and save
vg report --format md --out pr-comment.md

# Post to GitHub PR (via gh CLI)
gh pr comment --body-file pr-comment.md

Archive Historical Report

# Generate from specific artifact
vg report \
  --in ./archives/scan-2025-q1.json \
  --format json \
  --out ./archives/report-2025-q1.json

Compare Multiple Scans

# Generate reports for comparison
vg report --in baseline.json --format md --out before.md
vg report --in scan_result.json --format md --out after.md

Use Cases

Use CaseFormatIntegration
💬 PR CommentsMarkdownGitHub Actions, GitLab CI
📚 Wiki PagesMarkdownConfluence, Notion, GitHub Wiki
📧 Email SummariesTextSMTP, notification systems
🗄️ Audit TrailJSONArtifact storage, compliance
📊 DashboardsJSONCustom visualization tools

CI Integration Example

# GitHub Actions: Post report as PR comment
- name: Run Vibgrate scan
  run: npx @vibgrate/cli scan

- name: Generate report
  run: npx @vibgrate/cli@latest report --format md --out report.md

- name: Post PR comment
  uses: actions/github-script@v7
  with:
    script: |
      const fs = require('fs');
      const report = fs.readFileSync('report.md', 'utf-8');
      github.rest.issues.createComment({
        owner: context.repo.owner,
        repo: context.repo.repo,
        issue_number: context.issue.number,
        body: report
      });

Related Commands

Example use cases

Expand any use case to watch a live replay of the real @vibgrate/cli running against one of our test repositories. Nothing executes in your browser — these are recordings of actual runs, with the scan time shown as of now.

vg report --format md

Related Documentation

Related Help Articles