diff --git a/README.md b/README.md index f829372..a8400fc 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ JUST_SCRAPE_DEBUG=1 just-scrape ... # Debug logging to stderr ## JSON Mode (`--json`) -All commands support `--json` for machine-readable output. When set, banner, spinners, and interactive prompts are suppressed — only raw JSON on stdout. +All commands support `--json` for machine-readable output. When set, banner, spinners, and interactive prompts are suppressed — only minified JSON on stdout (saves tokens when piped to AI agents). ```bash just-scrape credits --json | jq '.remaining_credits' diff --git a/package.json b/package.json index e49bd03..3356ebb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "just-scrape", - "version": "0.1.6", + "version": "0.1.7", "description": "ScrapeGraph AI CLI tool", "type": "module", "main": "dist/cli.mjs", diff --git a/src/lib/log.ts b/src/lib/log.ts index 68f8660..66c7467 100644 --- a/src/lib/log.ts +++ b/src/lib/log.ts @@ -30,7 +30,7 @@ export function create(quiet = false) { if (!quiet) s.message(`Status: ${status}`); }, result(data: unknown) { - if (quiet) console.log(JSON.stringify(data, null, 2)); + if (quiet) console.log(JSON.stringify(data)); else console.log(`\n${highlight(JSON.stringify(data, null, 2))}\n`); }, error(message?: string) {