Skip to content

Add export command for JSON and CSV output#4

Open
nikfot wants to merge 3 commits into
mainfrom
feature/export-json-csv
Open

Add export command for JSON and CSV output#4
nikfot wants to merge 3 commits into
mainfrom
feature/export-json-csv

Conversation

@nikfot

@nikfot nikfot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds export subcommand to convert parsed vmstat data to NDJSON or CSV
  • Output goes to stdout by default, or to a file with --output-file
  • Zero additional dependencies (uses stdlib json and csv)
  • NDJSON format is compatible with jq, Elasticsearch bulk import, and other tooling

Usage

vmstat-visualizer export vmstat.log --to json
vmstat-visualizer export vmstat.log --to csv -o output.csv

Test plan

  • Verified JSON output is valid NDJSON
  • Verified CSV output has correct headers and values
  • CLI help text renders correctly

nikfot added 3 commits May 16, 2026 09:37
New 'export' subcommand converts parsed vmstat data to NDJSON or CSV,
printed to stdout or written to a file with --output-file. Zero
additional dependencies beyond the standard library.

Usage:
  vmstat-visualizer export vmstat.log --to json
  vmstat-visualizer export vmstat.log --to csv -o output.csv
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