Skip to content

Commit 5c45326

Browse files
Merge pull request #8 from ScrapeGraphAI/feat/minify-json-output
feat: minify JSON output when --json flag is used
2 parents 524ee2f + ea89c97 commit 5c45326

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ JUST_SCRAPE_DEBUG=1 just-scrape ... # Debug logging to stderr
8686

8787
## JSON Mode (`--json`)
8888

89-
All commands support `--json` for machine-readable output. When set, banner, spinners, and interactive prompts are suppressed — only raw JSON on stdout.
89+
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).
9090

9191
```bash
9292
just-scrape credits --json | jq '.remaining_credits'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "just-scrape",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"description": "ScrapeGraph AI CLI tool",
55
"type": "module",
66
"main": "dist/cli.mjs",

src/lib/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function create(quiet = false) {
3030
if (!quiet) s.message(`Status: ${status}`);
3131
},
3232
result(data: unknown) {
33-
if (quiet) console.log(JSON.stringify(data, null, 2));
33+
if (quiet) console.log(JSON.stringify(data));
3434
else console.log(`\n${highlight(JSON.stringify(data, null, 2))}\n`);
3535
},
3636
error(message?: string) {

0 commit comments

Comments
 (0)