From 004f21dc9386fe857bb1d2bf9e34c675b405ae60 Mon Sep 17 00:00:00 2001 From: Abimael Martell Date: Wed, 22 Apr 2026 15:16:19 -0700 Subject: [PATCH 1/2] feat: add --lockdown-mode flag to scrape --- README.md | 1 + src/commands/scrape.ts | 4 ++++ src/index.ts | 2 ++ src/types/scrape.ts | 2 ++ src/utils/options.ts | 1 + 5 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 86ab5e2..51f7a44 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ firecrawl scrape https://firecrawl.dev https://firecrawl.dev/blog https://docs.f | `--include-tags ` | Only include specific HTML tags | | `--exclude-tags ` | Exclude specific HTML tags | | `--max-age ` | Maximum age of cached content in milliseconds | +| `--lockdown-mode` | Enable lockdown mode for the scrape | | `-o, --output ` | Save output to file | | `--json` | Output as JSON format | | `--pretty` | Pretty print JSON output | diff --git a/src/commands/scrape.ts b/src/commands/scrape.ts index 271acb6..5b5be9f 100644 --- a/src/commands/scrape.ts +++ b/src/commands/scrape.ts @@ -118,6 +118,10 @@ export async function executeScrape( scrapeParams.profile = options.profile; } + if (options.lockdownMode) { + scrapeParams.lockdownMode = true; + } + // Execute scrape with timing - only wrap the scrape call in try-catch const requestStartTime = Date.now(); diff --git a/src/index.ts b/src/index.ts index 1faec01..3570ce5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -173,6 +173,7 @@ function createScrapeCommand(): Command { '--no-save-changes', 'Load existing profile data without saving changes (default: saves changes)' ) + .option('--lockdown-mode', 'Enable lockdown mode for the scrape', false) .action(async (positionalArgs, options) => { // Collect URLs from positional args and --url option @@ -288,6 +289,7 @@ function createDownloadCommand(): Command { '--languages ', 'Comma-separated language codes for scraping (e.g., en,es)' ) + .option('--lockdown-mode', 'Enable lockdown mode for the scrape', false) .option('-y, --yes', 'Skip confirmation prompt', false) .option( '-k, --api-key ', diff --git a/src/types/scrape.ts b/src/types/scrape.ts index dbdb9b1..bf90700 100644 --- a/src/types/scrape.ts +++ b/src/types/scrape.ts @@ -62,6 +62,8 @@ export interface ScrapeOptions { name: string; saveChanges?: boolean; }; + /** Enable lockdown mode for the scrape */ + lockdownMode?: boolean; } export interface ScrapeResult { diff --git a/src/utils/options.ts b/src/utils/options.ts index e8c382b..068fd20 100644 --- a/src/utils/options.ts +++ b/src/utils/options.ts @@ -121,5 +121,6 @@ export function parseScrapeOptions(options: any): ScrapeOptions { location, query: options.query, profile, + lockdownMode: options.lockdownMode, }; } From 0934084263c8d16251a0247d96672da3630d0194 Mon Sep 17 00:00:00 2001 From: Abimael Martell Date: Wed, 22 Apr 2026 15:17:33 -0700 Subject: [PATCH 2/2] rename --lockdown-mode to --lockdown --- README.md | 2 +- src/commands/scrape.ts | 4 ++-- src/index.ts | 4 ++-- src/types/scrape.ts | 2 +- src/utils/options.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 51f7a44..8da15a1 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ firecrawl scrape https://firecrawl.dev https://firecrawl.dev/blog https://docs.f | `--include-tags ` | Only include specific HTML tags | | `--exclude-tags ` | Exclude specific HTML tags | | `--max-age ` | Maximum age of cached content in milliseconds | -| `--lockdown-mode` | Enable lockdown mode for the scrape | +| `--lockdown` | Enable lockdown mode for the scrape | | `-o, --output ` | Save output to file | | `--json` | Output as JSON format | | `--pretty` | Pretty print JSON output | diff --git a/src/commands/scrape.ts b/src/commands/scrape.ts index 5b5be9f..ed2376d 100644 --- a/src/commands/scrape.ts +++ b/src/commands/scrape.ts @@ -118,8 +118,8 @@ export async function executeScrape( scrapeParams.profile = options.profile; } - if (options.lockdownMode) { - scrapeParams.lockdownMode = true; + if (options.lockdown) { + scrapeParams.lockdown = true; } // Execute scrape with timing - only wrap the scrape call in try-catch diff --git a/src/index.ts b/src/index.ts index 3570ce5..c6d6786 100644 --- a/src/index.ts +++ b/src/index.ts @@ -173,7 +173,7 @@ function createScrapeCommand(): Command { '--no-save-changes', 'Load existing profile data without saving changes (default: saves changes)' ) - .option('--lockdown-mode', 'Enable lockdown mode for the scrape', false) + .option('--lockdown', 'Enable lockdown mode for the scrape', false) .action(async (positionalArgs, options) => { // Collect URLs from positional args and --url option @@ -289,7 +289,7 @@ function createDownloadCommand(): Command { '--languages ', 'Comma-separated language codes for scraping (e.g., en,es)' ) - .option('--lockdown-mode', 'Enable lockdown mode for the scrape', false) + .option('--lockdown', 'Enable lockdown mode for the scrape', false) .option('-y, --yes', 'Skip confirmation prompt', false) .option( '-k, --api-key ', diff --git a/src/types/scrape.ts b/src/types/scrape.ts index bf90700..517c436 100644 --- a/src/types/scrape.ts +++ b/src/types/scrape.ts @@ -63,7 +63,7 @@ export interface ScrapeOptions { saveChanges?: boolean; }; /** Enable lockdown mode for the scrape */ - lockdownMode?: boolean; + lockdown?: boolean; } export interface ScrapeResult { diff --git a/src/utils/options.ts b/src/utils/options.ts index 068fd20..75cec42 100644 --- a/src/utils/options.ts +++ b/src/utils/options.ts @@ -121,6 +121,6 @@ export function parseScrapeOptions(options: any): ScrapeOptions { location, query: options.query, profile, - lockdownMode: options.lockdownMode, + lockdown: options.lockdown, }; }