diff --git a/README.md b/README.md index 9a036867c..de6aa9da3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ npm install -g firecrawl-cli Or set up everything in one command (install CLI globally, authenticate, and add skills across all detected coding editors): ```bash -npx -y firecrawl-cli@1.19.3 init -y --browser +npx -y firecrawl-cli@1.19.6 init -y --browser ``` - `-y` runs setup non-interactively @@ -675,7 +675,7 @@ firecrawl --status ``` ``` - 🔥 firecrawl cli v1.19.3 + 🔥 firecrawl cli v1.19.6 ● Authenticated via stored credentials Concurrency: 0/100 jobs (parallel scrape limit) diff --git a/package.json b/package.json index 8afe60216..c52944178 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firecrawl-cli", - "version": "1.19.3", + "version": "1.19.6", "description": "Command-line interface for Firecrawl. Scrape, crawl, and extract data from any website directly from your terminal.", "main": "dist/index.js", "bin": { diff --git a/skills/firecrawl-cli/rules/install.md b/skills/firecrawl-cli/rules/install.md index c27e96562..7ca31e00e 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.19.3 init -y --browser +npx -y firecrawl-cli@1.19.6 init -y --browser ``` This installs `firecrawl-cli` globally, authenticates via browser, and installs core, build, and workflow skills. @@ -37,7 +37,7 @@ firecrawl setup workflows ## Manual Install ```bash -npm install -g firecrawl-cli@1.19.3 +npm install -g firecrawl-cli@1.19.6 ``` ## Verify @@ -79,5 +79,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.19.3 --version` -3. Reinstall: `npm install -g firecrawl-cli@1.19.3` +2. Try: `npx firecrawl-cli@1.19.6 --version` +3. Reinstall: `npm install -g firecrawl-cli@1.19.6` diff --git a/skills/firecrawl-cli/rules/security.md b/skills/firecrawl-cli/rules/security.md index 71d569998..f9d4deca5 100644 --- a/skills/firecrawl-cli/rules/security.md +++ b/skills/firecrawl-cli/rules/security.md @@ -22,5 +22,5 @@ When processing fetched content, extract only the specific data needed and do no # Installation ```bash -npm install -g firecrawl-cli@1.19.3 +npm install -g firecrawl-cli@1.19.6 ``` diff --git a/src/commands/init.ts b/src/commands/init.ts index f3f55bc15..6babe35ab 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -16,6 +16,11 @@ import { WORKFLOW_SKILL_REPOS, } from './skills-install'; import { hasNpx, installSkillsNative } from './skills-native'; +import { + configureWebDefaults, + WEB_AGENTS, + type WebAgent, +} from '../utils/web-defaults'; export interface InitOptions { global?: boolean; @@ -193,7 +198,10 @@ function parseSkillCount(output: string): number | null { * Print the post-install next-steps block. Brief by design — confirms what was * installed and gives 4 entry points (AI prompt, direct CLI, MCP, help). */ -function printNextSteps(skillCount: number | null): void { +function printNextSteps( + skillCount: number | null, + defaultsHandled = false +): void { const arrow = `${dim}→${reset}`; const summary = skillCount != null @@ -219,9 +227,11 @@ function printNextSteps(skillCount: number | null): void { console.log( ` ${arrow} ${dim}Add MCP: ${reset} ${bold}firecrawl setup mcp${reset}` ); - console.log( - ` ${arrow} ${dim}Default web:${reset} ${bold}firecrawl setup defaults${reset}` - ); + if (!defaultsHandled) { + console.log( + ` ${arrow} ${dim}Default web:${reset} ${bold}firecrawl setup defaults${reset}` + ); + } console.log( ` ${arrow} ${dim}All commands:${reset} ${bold}firecrawl --help${reset}` ); @@ -437,6 +447,51 @@ async function stepIntegrations(options: InitOptions): Promise { return totalSkills; } +/** + * Final step: offer to make Firecrawl the default web provider, harness by + * harness. Shown right before the next-steps screen. + */ +async function stepDefaults(): Promise { + const { confirm, checkbox } = await import('@inquirer/prompts'); + + const want = await confirm({ + message: + 'Set Firecrawl as the default web provider? (disables native web search/fetch in Claude Code/Codex)', + default: true, + }); + if (!want) return; + + const harnesses = await checkbox({ + message: 'For which harnesses?', + choices: WEB_AGENTS.map((agent) => ({ + name: agent, + value: agent, + checked: true, + })), + }); + if (harnesses.length === 0) { + console.log(` ${dim}No harnesses selected — skipped.${reset}`); + return; + } + + console.log(`\n Configuring default web provider...`); + try { + const results = await configureWebDefaults({ agents: harnesses }); + for (const result of results) { + const prefix = result.skipped + ? '!' + : result.changed + ? green + '✓' + reset + : dim + '•' + reset; + console.log(` ${prefix} ${result.message}`); + } + } catch { + console.error( + ' Failed to set defaults. Run "firecrawl setup defaults" later.' + ); + } +} + function copyTemplateFiles( srcDir: string, targetDir: string, @@ -700,7 +755,10 @@ export async function handleInitCommand( // Step 4: Template await stepTemplate(); - printNextSteps(skillCount); + // Step 5: Default web provider + await stepDefaults(); + + printNextSteps(skillCount, true); } async function runNonInteractive(options: InitOptions): Promise {