Skip to content

feat: add structured output formats - #69

Open
techgaun wants to merge 1 commit into
mainfrom
feat/output-formats
Open

feat: add structured output formats#69
techgaun wants to merge 1 commit into
mainfrom
feat/output-formats

Conversation

@techgaun

@techgaun techgaun commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • add streaming text, csv, json, and jsonl result writers
  • add --format selection and --output as the preferred output-file option
  • preserve -o and --outputFile compatibility and their historical CSV default
  • protect existing output files unless --force is provided
  • add --quiet and --verbose controls
  • keep structured stdout machine-readable by routing status messages to stderr
  • include scan statistics in JSON and JSONL output
  • keep output I/O failures fatal rather than treating them as failed GitHub queries

Output contracts

  • JSON: one object containing results and summary
  • JSONL: typed result records followed by one typed summary record
  • CSV: retains the existing five-column header
  • Text: retains the existing human-readable result layout

Safety and compatibility

github-dorks -o results.csv ... continues to select CSV automatically. It now refuses to replace an existing file; pass --force to opt into replacement.

Verification

  • python3 -m unittest discover -s tests -v (24 tests)
  • flake8 in Python 3.12
  • git diff --check
  • Docker image/package build
  • installed CLI help smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant