feat(browser)!: remove the firecrawl browser command

Draft
MO
3d ago
+25-1223

Stacked on #374 (the deprecation warning). Not meant to merge until the deprecation period ends.

Removes the hidden, deprecated firecrawl browser command. firecrawl scrape <url> followed by firecrawl interact covers the same workflow: open a page, then drive it with a prompt or with Playwright or agent-browser code.

  • Deletes src/commands/browser.ts (launch-session, execute, list, close and the shorthand), src/utils/browser-session.ts (the stored session file) and src/__tests__/commands/browser.test.ts.

  • Removes createBrowserCommand from src/index.ts and drops browser from the commands that require login.

  • Keeps the browser name as a hidden stub, the same way research search-github was retired. Any invocation, with any arguments or --help, prints one line to stderr and exits 1 without calling the API or asking for a login:

    Error: `firecrawl browser` was removed. Use `firecrawl scrape <url>`, then `firecrawl interact "<prompt>"` or `firecrawl interact -c "<code>"`. See `firecrawl interact --help`.
    
  • cli-argv.test.ts checks the stub for the shorthand, each former subcommand and --help.

Old browser-session.json files in the CLI config directory are left in place; nothing reads them.

How the old commands map:

BeforeAfter
firecrawl browser "open <url>"firecrawl scrape <url>
firecrawl browser "snapshot", "click @e5"firecrawl interact -c "agent-browser snapshot -i" --bash, firecrawl interact -c "agent-browser click @e5" --bash, or a prompt: firecrawl interact "Click the pricing tab"
firecrawl browser execute --python '<code>'firecrawl interact -c '<code>' --python
firecrawl browser execute --node '<code>'firecrawl interact -c '<code>'
firecrawl browser execute --bash '<cmd>'firecrawl interact -c '<cmd>' --bash
--profile <name>, --no-save-changesthe same flags on firecrawl scrape
firecrawl browser closefirecrawl interact stop

Open in Capy


Summary by cubic

Removes the deprecated firecrawl browser command. firecrawl scrape <url> followed by firecrawl interact covers the same workflow: open a page, then drive it with a prompt or with Playwright or agent-browser code.

The browser name stays as a hidden stub: any invocation, including --help and firecrawl help browser, prints one error line to stderr and exits 1 without calling the API or asking for a login. The command implementation, the stored-session helper, and their tests are deleted. Old browser-session.json files in the CLI config directory are left in place; nothing reads them.

Migration

  • firecrawl browser "open <url>" → firecrawl scrape <url>
  • firecrawl browser "snapshot", "click @e5" → firecrawl interact -c "agent-browser <cmd>" --bash or a prompt like firecrawl interact "Click the pricing tab"
  • firecrawl browser execute --python/--node/--bash '<code>' → firecrawl interact -c '<code>' --python (or --bash; no flag for node)
  • firecrawl browser close → firecrawl interact stop
  • --profile <name> and --no-save-changes move to firecrawl scrape