diff --git a/package.json b/package.json index acaf7cba2d..efd977719d 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ }, "dependencies": { "@inquirer/prompts": "^8.2.1", - "@mendable/firecrawl-js": "4.13.0", + "@mendable/firecrawl-js": "4.15.0", "commander": "^14.0.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3b932c04ac..45119cf46d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^8.2.1 version: 8.2.1(@types/node@20.19.27) '@mendable/firecrawl-js': - specifier: 4.13.0 - version: 4.13.0 + specifier: 4.15.0 + version: 4.15.0 commander: specifier: ^14.0.2 version: 14.0.2 @@ -332,8 +332,8 @@ packages: '@jridgewell/sourcemap-codec@1.5.5': resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - '@mendable/firecrawl-js@4.13.0': - resolution: {integrity: sha512-8Y2+jjol4/ZXjxyf/5VUGCeOeGYWOOp03HZoyULWU5/adyUjnNL1DkI0/96wHs1aGL5/+JCq/hDfkXMUFBVYfQ==} + '@mendable/firecrawl-js@4.15.0': + resolution: {integrity: sha512-lyszXaz1QFIPTlii/4caCugE4W+vbYpvJdIQ+8564ZIdjUluk4uwq5zuz8NBCpph78OPhErC0SHh+bBzeSGumQ==} engines: {node: '>=22.0.0'} '@rollup/rollup-android-arm-eabi@4.55.1': @@ -1255,7 +1255,7 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.5': {} - '@mendable/firecrawl-js@4.13.0': + '@mendable/firecrawl-js@4.15.0': dependencies: axios: 1.13.5 typescript-event-target: 1.1.2 diff --git a/skills/firecrawl-cli/SKILL.md b/skills/firecrawl-cli/SKILL.md index 308696efb8..ab299953fa 100644 --- a/skills/firecrawl-cli/SKILL.md +++ b/skills/firecrawl-cli/SKILL.md @@ -26,7 +26,7 @@ Run `firecrawl --help` or `firecrawl --help` for full option details. Must be installed and authenticated. Check with `firecrawl --status`. ``` - 🔥 firecrawl cli v1.4.0 + 🔥 firecrawl cli v1.8.0 ● Authenticated via FIRECRAWL_API_KEY Concurrency: 0/100 jobs (parallel scrape limit) @@ -95,7 +95,7 @@ browser "scrape" -o .firecrawl/products-p2.md → extract page 2 content **Example: login then scrape authenticated content** ``` -browser launch-session --profile my-app → create a named persistent session +browser launch-session --profile my-app → create a named profile browser "open https://app.example.com/login" → navigate to login browser "snapshot -i" → find form fields browser "fill @e3 'user@example.com'" → fill email @@ -271,9 +271,9 @@ Shorthand auto-launches a session if none exists - no setup required. Session management: `launch-session --ttl 600`, `list`, `close` -Options: `--ttl `, `--ttl-inactivity `, `--session `, `--profile `, `--write-mode `, `-o` +Options: `--ttl `, `--ttl-inactivity `, `--session `, `--profile `, `--no-save-changes`, `-o` -**Persistent sessions** survive close and can be reconnected by name. Use them when you need to login first, then come back later to do work while already authenticated: +**Profiles** survive close and can be reconnected by name. Use them when you need to login first, then come back later to do work while already authenticated: ```bash # Session 1: Login and save state @@ -296,10 +296,10 @@ firecrawl browser close Read-only reconnect (no writes to session state): ```bash -firecrawl browser launch-session --profile my-app --write-mode readonly +firecrawl browser launch-session --profile my-app --no-save-changes ``` -Shorthand with persistent session: +Shorthand with profile: ```bash firecrawl browser --profile my-app "open https://example.com" diff --git a/skills/firecrawl-cli/rules/install.md b/skills/firecrawl-cli/rules/install.md index 980ecd8f79..a3d1aae3c6 100644 --- a/skills/firecrawl-cli/rules/install.md +++ b/skills/firecrawl-cli/rules/install.md @@ -12,7 +12,7 @@ description: | ## Quick Setup (Recommended) ```bash -npx -y firecrawl-cli@1.7.1 init --all --browser +npx -y firecrawl-cli@1.8.0 init --all --browser ``` This installs `firecrawl-cli` globally and authenticates. @@ -20,7 +20,7 @@ This installs `firecrawl-cli` globally and authenticates. ## Manual Install ```bash -npm install -g firecrawl-cli@1.7.1 +npm install -g firecrawl-cli@1.8.0 ``` ## Verify @@ -51,5 +51,5 @@ Ask the user how they'd like to authenticate: If `firecrawl` is not found after installation: 1. Ensure npm global bin is in PATH -2. Try: `npx firecrawl-cli@1.7.1 --version` -3. Reinstall: `npm install -g firecrawl-cli@1.7.1` +2. Try: `npx firecrawl-cli@1.8.0 --version` +3. Reinstall: `npm install -g firecrawl-cli@1.8.0` diff --git a/src/commands/browser.ts b/src/commands/browser.ts index 7ced874930..c8fb1110b5 100644 --- a/src/commands/browser.ts +++ b/src/commands/browser.ts @@ -17,7 +17,7 @@ export interface BrowserLaunchOptions { ttl?: number; ttlInactivity?: number; profile?: string; - writeMode?: 'readonly' | 'readwrite'; + saveChanges?: boolean; apiKey?: string; apiUrl?: string; output?: string; @@ -53,7 +53,7 @@ export interface BrowserCloseOptions { export interface BrowserQuickExecuteOptions { code: string; profile?: string; - writeMode?: 'readonly' | 'readwrite'; + saveChanges?: boolean; apiKey?: string; apiUrl?: string; output?: string; @@ -74,7 +74,7 @@ export async function handleBrowserLaunch( activityTtl?: number; profile?: { name: string; - writeMode?: 'readonly' | 'readwrite'; + saveChanges?: boolean; }; } = {}; if (options.ttl !== undefined) args.ttl = options.ttl; @@ -83,7 +83,7 @@ export async function handleBrowserLaunch( if (options.profile) { args.profile = { name: options.profile, - writeMode: options.writeMode, + saveChanges: options.saveChanges, }; } @@ -291,13 +291,13 @@ export async function handleBrowserQuickExecute( const launchArgs: { profile?: { name: string; - writeMode?: 'readonly' | 'readwrite'; + saveChanges?: boolean; }; } = {}; if (options.profile) { launchArgs.profile = { name: options.profile, - writeMode: options.writeMode, + saveChanges: options.saveChanges, }; } diff --git a/src/index.ts b/src/index.ts index 7ef8b1a6fe..cbf5d5bde4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -741,26 +741,17 @@ function createBrowserCommand(): Command { 'Name for a profile (survives close, reconnect by name later)' ) .option( - '--write-mode ', - 'Write mode for profile: readonly or readwrite (default: readwrite)' + '--no-save-changes', + 'Load existing profile data without saving changes (default: saves changes)' ) .option('-o, --output ', 'Output file path (default: stdout)') .option('--json', 'Output as JSON format', false) .action(async (code, options) => { if (code) { - if ( - options.writeMode && - !['readonly', 'readwrite'].includes(options.writeMode) - ) { - console.error( - 'Error: --write-mode must be "readonly" or "readwrite"' - ); - process.exit(1); - } await handleBrowserQuickExecute({ code, profile: options.profile, - writeMode: options.writeMode, + saveChanges: options.saveChanges, apiKey: options.apiKey, apiUrl: options.apiUrl, output: options.output, @@ -809,8 +800,8 @@ Explicit subcommands: 'Name for a profile (survives close, reconnect by name later)' ) .option( - '--write-mode ', - 'Write mode for profile: readonly or readwrite (default: readwrite)' + '--no-save-changes', + 'Load existing profile data without saving changes (default: saves changes)' ) .option( '-k, --api-key ', @@ -834,23 +825,16 @@ Examples: $ firecrawl browser launch-session --ttl 600 $ firecrawl browser launch-session --ttl 300 --ttl-inactivity 60 $ firecrawl browser launch-session --profile my-session - $ firecrawl browser launch-session --profile my-session --write-mode readonly + $ firecrawl browser launch-session --profile my-session --no-save-changes $ firecrawl browser launch-session -o session.json --json ` ) .action(async (options) => { - if ( - options.writeMode && - !['readonly', 'readwrite'].includes(options.writeMode) - ) { - console.error('Error: --write-mode must be "readonly" or "readwrite"'); - process.exit(1); - } await handleBrowserLaunch({ ttl: options.ttl, ttlInactivity: options.ttlInactivity, profile: options.profile, - writeMode: options.writeMode, + saveChanges: options.saveChanges, apiKey: options.apiKey, apiUrl: options.apiUrl, output: options.output,