diff --git a/src/__tests__/cli-argv.test.ts b/src/__tests__/cli-argv.test.ts index f5080af546..2d83c54447 100644 --- a/src/__tests__/cli-argv.test.ts +++ b/src/__tests__/cli-argv.test.ts @@ -34,6 +34,17 @@ describe('CLI argv parsing', () => { expect(result.stderr).not.toContain('unknown command'); }); + testWithBuiltCli('exposes pretty JSON output for search', () => { + const result = spawnSync(process.execPath, [cliPath, 'search', '--help'], { + cwd: process.cwd(), + encoding: 'utf8', + }); + + expect(result.status).toBe(0); + expect(result.stdout).toContain('Usage: firecrawl search'); + expect(result.stdout).toContain('--pretty'); + }); + testWithBuiltCli( 'exposes explicit keyless MCP setup and launch flags', () => { diff --git a/src/index.ts b/src/index.ts index 3340ed0dfd..d153f108c2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -968,11 +968,11 @@ function createSearchCommand(): Command { ) .option('--api-url ', 'API URL (overrides global --api-url)') .option('-o, --output ', 'Output file path (default: stdout)') - // .option( - // '-p, --pretty', - // 'Output as pretty JSON (default: human-readable)', - // false - // ) + .option( + '-p, --pretty', + 'Output as pretty JSON (default: human-readable)', + false + ) .option('--json', 'Output as compact JSON', false) .action(async (query, options) => { // Parse sources