Skip to content

feat: minify JSON output when --json flag is used#8

Merged
FrancescoSaverioZuppichini merged 2 commits intomainfrom
feat/minify-json-output
Feb 16, 2026
Merged

feat: minify JSON output when --json flag is used#8
FrancescoSaverioZuppichini merged 2 commits intomainfrom
feat/minify-json-output

Conversation

@VinciGit00
Copy link
Member

Summary

  • Minify JSON output in --json mode (JSON.stringify(data) instead of JSON.stringify(data, null, 2)) to save tokens when piped to AI agents
  • Updated README to reflect the change

Closes #6

Test plan

  • bun run build passes
  • bun run lint passes
  • bun test — all 30 tests pass
  • Manual: just-scrape credits --json outputs compact single-line JSON

🤖 Generated with Claude Code

Output compact JSON (no whitespace) in --json mode to save tokens
when piped to AI agents. Closes #6

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FrancescoSaverioZuppichini
Copy link
Member

@VinciGit00 great catch, are we sure this is not something all other commnands do?

@FrancescoSaverioZuppichini
Copy link
Member

@VinciGit00 sorry my bad, still sleepy - it is done at the log level. Can you bump the version please? so we can build it

@FrancescoSaverioZuppichini FrancescoSaverioZuppichini merged commit 5c45326 into main Feb 16, 2026
3 checks passed
@VinciGit00 VinciGit00 deleted the feat/minify-json-output branch February 16, 2026 10:16
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.

minify output when --json

2 participants