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
| Flag | Default | Description |
|---|---|---|
--in <file> | .vibgrate/scan_result.json | Input scan artifact |
--format <type> | text | Output format: md, text, json |
--out <file> | stdout | Write 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 Case | Format | Integration |
|---|---|---|
| 💬 PR Comments | Markdown | GitHub Actions, GitLab CI |
| 📚 Wiki Pages | Markdown | Confluence, Notion, GitHub Wiki |
| 📧 Email Summaries | Text | SMTP, notification systems |
| 🗄️ Audit Trail | JSON | Artifact storage, compliance |
| 📊 Dashboards | JSON | Custom 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
- vg scan — Generate scan artifacts
- vg sbom — Export SBOM formats
- Output Formats — Format specifications