firecrawl-cli 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +13 -35
  2. package/dist/__tests__/commands/init.test.js +4 -2
  3. package/dist/__tests__/commands/init.test.js.map +1 -1
  4. package/dist/__tests__/commands/setup.test.js +6 -2
  5. package/dist/__tests__/commands/setup.test.js.map +1 -1
  6. package/dist/commands/init.d.ts.map +1 -1
  7. package/dist/commands/init.js +27 -4
  8. package/dist/commands/init.js.map +1 -1
  9. package/dist/commands/monitor.d.ts +23 -0
  10. package/dist/commands/monitor.d.ts.map +1 -0
  11. package/dist/commands/monitor.js +395 -0
  12. package/dist/commands/monitor.js.map +1 -0
  13. package/dist/commands/setup.d.ts +1 -1
  14. package/dist/commands/setup.d.ts.map +1 -1
  15. package/dist/commands/setup.js +9 -5
  16. package/dist/commands/setup.js.map +1 -1
  17. package/dist/commands/skills-install.d.ts +9 -1
  18. package/dist/commands/skills-install.d.ts.map +1 -1
  19. package/dist/commands/skills-install.js +13 -2
  20. package/dist/commands/skills-install.js.map +1 -1
  21. package/dist/index.js +7 -8
  22. package/dist/index.js.map +1 -1
  23. package/package.json +2 -2
  24. package/dist/commands/experimental/backends.d.ts +0 -19
  25. package/dist/commands/experimental/backends.d.ts.map +0 -1
  26. package/dist/commands/experimental/backends.js +0 -74
  27. package/dist/commands/experimental/backends.js.map +0 -1
  28. package/dist/commands/experimental/index.d.ts +0 -13
  29. package/dist/commands/experimental/index.d.ts.map +0 -1
  30. package/dist/commands/experimental/index.js +0 -200
  31. package/dist/commands/experimental/index.js.map +0 -1
  32. package/dist/commands/experimental/shared.d.ts +0 -17
  33. package/dist/commands/experimental/shared.d.ts.map +0 -1
  34. package/dist/commands/experimental/shared.js +0 -152
  35. package/dist/commands/experimental/shared.js.map +0 -1
  36. package/dist/commands/experimental/workflows/company-directories.d.ts +0 -11
  37. package/dist/commands/experimental/workflows/company-directories.d.ts.map +0 -1
  38. package/dist/commands/experimental/workflows/company-directories.js +0 -245
  39. package/dist/commands/experimental/workflows/company-directories.js.map +0 -1
  40. package/dist/commands/experimental/workflows/competitive-intel.d.ts +0 -11
  41. package/dist/commands/experimental/workflows/competitive-intel.d.ts.map +0 -1
  42. package/dist/commands/experimental/workflows/competitive-intel.js +0 -226
  43. package/dist/commands/experimental/workflows/competitive-intel.js.map +0 -1
  44. package/dist/commands/experimental/workflows/competitor-analysis.d.ts +0 -10
  45. package/dist/commands/experimental/workflows/competitor-analysis.d.ts.map +0 -1
  46. package/dist/commands/experimental/workflows/competitor-analysis.js +0 -196
  47. package/dist/commands/experimental/workflows/competitor-analysis.js.map +0 -1
  48. package/dist/commands/experimental/workflows/dashboard-reporting.d.ts +0 -11
  49. package/dist/commands/experimental/workflows/dashboard-reporting.d.ts.map +0 -1
  50. package/dist/commands/experimental/workflows/dashboard-reporting.js +0 -254
  51. package/dist/commands/experimental/workflows/dashboard-reporting.js.map +0 -1
  52. package/dist/commands/experimental/workflows/deep-research.d.ts +0 -11
  53. package/dist/commands/experimental/workflows/deep-research.d.ts.map +0 -1
  54. package/dist/commands/experimental/workflows/deep-research.js +0 -159
  55. package/dist/commands/experimental/workflows/deep-research.js.map +0 -1
  56. package/dist/commands/experimental/workflows/demo.d.ts +0 -11
  57. package/dist/commands/experimental/workflows/demo.d.ts.map +0 -1
  58. package/dist/commands/experimental/workflows/demo.js +0 -190
  59. package/dist/commands/experimental/workflows/demo.js.map +0 -1
  60. package/dist/commands/experimental/workflows/knowledge-base.d.ts +0 -11
  61. package/dist/commands/experimental/workflows/knowledge-base.d.ts.map +0 -1
  62. package/dist/commands/experimental/workflows/knowledge-base.js +0 -319
  63. package/dist/commands/experimental/workflows/knowledge-base.js.map +0 -1
  64. package/dist/commands/experimental/workflows/knowledge-ingest.d.ts +0 -12
  65. package/dist/commands/experimental/workflows/knowledge-ingest.d.ts.map +0 -1
  66. package/dist/commands/experimental/workflows/knowledge-ingest.js +0 -251
  67. package/dist/commands/experimental/workflows/knowledge-ingest.js.map +0 -1
  68. package/dist/commands/experimental/workflows/lead-gen.d.ts +0 -11
  69. package/dist/commands/experimental/workflows/lead-gen.d.ts.map +0 -1
  70. package/dist/commands/experimental/workflows/lead-gen.js +0 -257
  71. package/dist/commands/experimental/workflows/lead-gen.js.map +0 -1
  72. package/dist/commands/experimental/workflows/lead-research.d.ts +0 -11
  73. package/dist/commands/experimental/workflows/lead-research.d.ts.map +0 -1
  74. package/dist/commands/experimental/workflows/lead-research.js +0 -146
  75. package/dist/commands/experimental/workflows/lead-research.js.map +0 -1
  76. package/dist/commands/experimental/workflows/market-research.d.ts +0 -11
  77. package/dist/commands/experimental/workflows/market-research.d.ts.map +0 -1
  78. package/dist/commands/experimental/workflows/market-research.js +0 -260
  79. package/dist/commands/experimental/workflows/market-research.js.map +0 -1
  80. package/dist/commands/experimental/workflows/qa.d.ts +0 -11
  81. package/dist/commands/experimental/workflows/qa.d.ts.map +0 -1
  82. package/dist/commands/experimental/workflows/qa.js +0 -184
  83. package/dist/commands/experimental/workflows/qa.js.map +0 -1
  84. package/dist/commands/experimental/workflows/research-papers.d.ts +0 -11
  85. package/dist/commands/experimental/workflows/research-papers.d.ts.map +0 -1
  86. package/dist/commands/experimental/workflows/research-papers.js +0 -151
  87. package/dist/commands/experimental/workflows/research-papers.js.map +0 -1
  88. package/dist/commands/experimental/workflows/seo-audit.d.ts +0 -11
  89. package/dist/commands/experimental/workflows/seo-audit.d.ts.map +0 -1
  90. package/dist/commands/experimental/workflows/seo-audit.js +0 -155
  91. package/dist/commands/experimental/workflows/seo-audit.js.map +0 -1
  92. package/dist/commands/experimental/workflows/shop.d.ts +0 -11
  93. package/dist/commands/experimental/workflows/shop.d.ts.map +0 -1
  94. package/dist/commands/experimental/workflows/shop.js +0 -155
  95. package/dist/commands/experimental/workflows/shop.js.map +0 -1
@@ -1,159 +0,0 @@
1
- "use strict";
2
- /**
3
- * Workflow: Deep Research
4
- *
5
- * Breaks a topic into research angles, then spawns parallel agents -- one per
6
- * angle (overview, technical, market, contrarian). Results are cross-referenced
7
- * and synthesized into a structured report.
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || (function () {
26
- var ownKeys = function(o) {
27
- ownKeys = Object.getOwnPropertyNames || function (o) {
28
- var ar = [];
29
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
- return ar;
31
- };
32
- return ownKeys(o);
33
- };
34
- return function (mod) {
35
- if (mod && mod.__esModule) return mod;
36
- var result = {};
37
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
- __setModuleDefault(result, mod);
39
- return result;
40
- };
41
- })();
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.register = register;
44
- const backends_1 = require("../backends");
45
- const shared_1 = require("../shared");
46
- // ─── Input gathering ────────────────────────────────────────────────────────
47
- async function gatherInputs(prefill) {
48
- const { input, select } = await Promise.resolve().then(() => __importStar(require('@inquirer/prompts')));
49
- const topic = prefill?.topic ||
50
- (await input({
51
- message: 'What topic do you want to research?',
52
- validate: (0, shared_1.validateRequired)('Topic'),
53
- }));
54
- const depth = await select({
55
- message: 'How deep should the research go?',
56
- choices: [
57
- { name: 'Quick overview (5-10 sources)', value: 'quick' },
58
- { name: 'Thorough analysis (15-25 sources)', value: 'thorough' },
59
- { name: 'Exhaustive deep-dive (25+ sources)', value: 'exhaustive' },
60
- ],
61
- });
62
- const context = await input({
63
- message: 'Any specific angles or questions to focus on? (leave blank to skip)',
64
- default: '',
65
- });
66
- const output = await select({
67
- message: 'How should the research be delivered?',
68
- choices: [
69
- { name: 'Print to terminal', value: 'terminal' },
70
- { name: 'Save as Markdown file', value: 'markdown' },
71
- { name: 'Save as JSON (structured data)', value: 'json' },
72
- ],
73
- });
74
- return { topic, depth, context, output };
75
- }
76
- // ─── System prompt ──────────────────────────────────────────────────────────
77
- function buildSystemPrompt(opts) {
78
- const depthInstructions = {
79
- quick: 'Search 3-5 queries and scrape 5-10 of the most relevant pages.',
80
- thorough: 'Search 5-10 queries from different angles and scrape 15-25 pages. Cross-reference claims across sources.',
81
- exhaustive: 'Search 10+ queries covering every angle. Scrape 25+ pages including primary sources, research papers, expert opinions, and contrarian views. Cross-reference everything.',
82
- };
83
- const outputInstructions = {
84
- terminal: 'Print the full research report to the terminal in well-formatted markdown.',
85
- markdown: 'Save the report to a file called `research-report.md` in the current directory. Tell the user the file path when done.',
86
- json: 'Save the report as structured JSON to `research-report.json` in the current directory. Tell the user the file path when done.',
87
- };
88
- return `You are a deep research team lead powered by Firecrawl. You orchestrate parallel research agents to investigate a topic from every angle simultaneously.
89
-
90
- ${shared_1.FIRECRAWL_TOOLS_BLOCK}
91
-
92
- ## Research Depth
93
-
94
- ${depthInstructions[opts.depth]}
95
-
96
- ## Your Strategy
97
-
98
- You are a **team lead**, not a solo researcher. Your job is to:
99
-
100
- 1. **Break the topic into angles** -- Identify 3-5 distinct research angles or subtopics.
101
- 2. **Spawn parallel subagents** -- One agent per angle. Each searches, scrapes, and analyzes from their specific perspective.
102
- 3. **Collect results** -- Each agent reports back findings with sources.
103
- 4. **Cross-reference and synthesize** -- Merge findings, resolve conflicting claims, build the unified report.
104
-
105
- ## Agent Assignments
106
-
107
- Based on the topic, spawn agents like:
108
- 1. **Overview Agent** -- Broad searches, foundational context, definitions, key players. Scrape Wikipedia, encyclopedia-style sources, overview articles.
109
- 2. **Technical Deep-Dive Agent** -- Technical details, documentation, specifications, architecture. Scrape docs, technical blogs, research papers.
110
- 3. **Market & Industry Agent** -- Market size, trends, adoption, industry analyst perspectives. Scrape reports, news articles, industry publications.
111
- 4. **Contrarian & Risks Agent** -- Counterarguments, criticisms, failure cases, limitations. Search for "<topic> problems", "<topic> criticism", "<topic> limitations".
112
-
113
- Adjust the number and focus of agents based on the topic and depth level.
114
-
115
- ${shared_1.SUBAGENT_INSTRUCTIONS}
116
-
117
- ## Output Format
118
-
119
- ${outputInstructions[opts.output]}
120
-
121
- Structure the report as:
122
-
123
- ### Executive Summary
124
- 2-3 paragraph overview of key findings.
125
-
126
- ### Key Findings
127
- Numbered list of the most important discoveries, each with supporting evidence.
128
-
129
- ### Detailed Analysis
130
- Deep dive into each major theme or subtopic.
131
-
132
- ### Contrarian Views & Risks
133
- What are the counterarguments? What could go wrong?
134
-
135
- ### Sources
136
- Every URL you scraped, with a one-line summary of what you found there.
137
-
138
- ---
139
-
140
- Be thorough and honest. Cite your sources. Flag uncertainty. Do not fabricate information.
141
-
142
- Start working immediately when given a topic.`;
143
- }
144
- // ─── Command registration ───────────────────────────────────────────────────
145
- function register(parentCmd, backend) {
146
- const config = backends_1.BACKENDS[backend];
147
- parentCmd
148
- .command('deep-research')
149
- .description('Deep research any topic using web search and scraping')
150
- .argument('[topic]', 'Topic to research')
151
- .option('-y, --yes', 'Auto-approve all tool permissions')
152
- .action(async (topic, options) => {
153
- const inputs = await gatherInputs(topic ? { topic } : undefined);
154
- const skipPermissions = options.yes || (await (0, shared_1.askPermissionMode)(backend));
155
- console.log(`\nLaunching ${config.displayName}...\n`);
156
- (0, backends_1.launchAgent)(backend, buildSystemPrompt({ depth: inputs.depth, output: inputs.output }), (0, shared_1.buildMessage)([inputs.topic, inputs.context]), skipPermissions);
157
- });
158
- }
159
- //# sourceMappingURL=deep-research.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deep-research.js","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/deep-research.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0IH,4BAqBC;AA5JD,0CAAkE;AAClE,sCAMmB;AAWnB,+EAA+E;AAE/E,KAAK,UAAU,YAAY,CAAC,OAA4B;IACtD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,wDAAa,mBAAmB,GAAC,CAAC;IAE5D,MAAM,KAAK,GACT,OAAO,EAAE,KAAK;QACd,CAAC,MAAM,KAAK,CAAC;YACX,OAAO,EAAE,qCAAqC;YAC9C,QAAQ,EAAE,IAAA,yBAAgB,EAAC,OAAO,CAAC;SACpC,CAAC,CAAC,CAAC;IAEN,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC;QACzB,OAAO,EAAE,kCAAkC;QAC3C,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,+BAA+B,EAAE,KAAK,EAAE,OAAO,EAAE;YACzD,EAAE,IAAI,EAAE,mCAAmC,EAAE,KAAK,EAAE,UAAU,EAAE;YAChE,EAAE,IAAI,EAAE,oCAAoC,EAAE,KAAK,EAAE,YAAY,EAAE;SACpE;KACF,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;QAC1B,OAAO,EACL,qEAAqE;QACvE,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC;QAC1B,OAAO,EAAE,uCAAuC;QAChD,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,UAAU,EAAE;YAChD,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,UAAU,EAAE;YACpD,EAAE,IAAI,EAAE,gCAAgC,EAAE,KAAK,EAAE,MAAM,EAAE;SAC1D;KACF,CAAC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AAO,CAAC,CAAC;QAEtD,IAAA,sBAAW,EACT,OAAO,EACP,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,EACjE,IAAA,qBAAY,EAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,EAC5C,eAAe,CAChB,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Workflow: Demo Walkthrough
3
- *
4
- * Uses Firecrawl's cloud browser to walk through a product's key flows --
5
- * signup, onboarding, pricing, docs -- step by step. Captures every screen,
6
- * documents interactions, and produces a structured walkthrough report.
7
- */
8
- import { Command } from 'commander';
9
- import { type Backend } from '../backends';
10
- export declare function register(parentCmd: Command, backend: Backend): void;
11
- //# sourceMappingURL=demo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/demo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,aAAa,CAAC;AAuKlE,wBAAgB,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAqBnE"}
@@ -1,190 +0,0 @@
1
- "use strict";
2
- /**
3
- * Workflow: Demo Walkthrough
4
- *
5
- * Uses Firecrawl's cloud browser to walk through a product's key flows --
6
- * signup, onboarding, pricing, docs -- step by step. Captures every screen,
7
- * documents interactions, and produces a structured walkthrough report.
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || (function () {
26
- var ownKeys = function(o) {
27
- ownKeys = Object.getOwnPropertyNames || function (o) {
28
- var ar = [];
29
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
- return ar;
31
- };
32
- return ownKeys(o);
33
- };
34
- return function (mod) {
35
- if (mod && mod.__esModule) return mod;
36
- var result = {};
37
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
- __setModuleDefault(result, mod);
39
- return result;
40
- };
41
- })();
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.register = register;
44
- const backends_1 = require("../backends");
45
- const shared_1 = require("../shared");
46
- // ─── Input gathering ────────────────────────────────────────────────────────
47
- async function gatherInputs(prefill) {
48
- const { input, select } = await Promise.resolve().then(() => __importStar(require('@inquirer/prompts')));
49
- const rawUrl = prefill?.url ||
50
- (await input({
51
- message: 'What product do you want to walk through?',
52
- validate: shared_1.validateUrl,
53
- }));
54
- const focus = await select({
55
- message: 'What flows should the agent explore?',
56
- choices: [
57
- { name: 'Full product walkthrough (all key flows)', value: 'full' },
58
- { name: 'Signup and onboarding flow', value: 'signup' },
59
- { name: 'Pricing and plans', value: 'pricing' },
60
- { name: 'Documentation and developer experience', value: 'docs' },
61
- { name: 'Dashboard and core product', value: 'dashboard' },
62
- ],
63
- });
64
- const context = await input({
65
- message: 'Anything specific to look for? (leave blank to skip)',
66
- default: '',
67
- });
68
- const output = await select({
69
- message: 'How should the walkthrough be delivered?',
70
- choices: [
71
- { name: 'Print to terminal', value: 'terminal' },
72
- { name: 'Save as Markdown file', value: 'markdown' },
73
- ],
74
- });
75
- return { url: (0, shared_1.normalizeUrl)(rawUrl), focus, context, output };
76
- }
77
- // ─── System prompt ──────────────────────────────────────────────────────────
78
- function buildSystemPrompt(opts) {
79
- const outputInstructions = opts.output === 'markdown'
80
- ? 'Save the walkthrough to a file called `demo-walkthrough.md` in the current directory. Tell the user the file path when done.'
81
- : 'Print the full walkthrough to the terminal in well-formatted markdown.';
82
- const focusInstructions = {
83
- full: `Spawn these parallel agents, each walking a different flow:
84
- 1. **Homepage & Marketing Agent** -- Open the homepage. Click through marketing pages (features, about, use cases). Document the messaging, value prop, key claims, and CTAs. Note what's above the fold vs below.
85
- 2. **Signup & Onboarding Agent** -- Find the signup/get-started flow. Walk through every step of signup and onboarding. Document each screen, what's required, friction points, and the first-run experience. Do NOT submit real credentials -- just document the flow.
86
- 3. **Pricing & Plans Agent** -- Navigate to pricing. Click to expand tiers, toggle monthly/annual, check feature comparisons. Document every plan, price, and feature. Look for hidden costs or confusing language.
87
- 4. **Docs & Developer Experience Agent** -- Navigate to docs. Walk through the quickstart guide. Check navigation, code examples, search functionality. Document the developer onboarding experience.`,
88
- signup: `Spawn these parallel agents to thoroughly explore the signup and onboarding experience:
89
- 1. **Signup Discovery Agent** -- Find every signup entry point (header CTA, pricing page, landing pages). Document how many clicks to get to signup from different starting points.
90
- 2. **Signup Flow Agent** -- Walk through the signup form step by step. Document every field, validation message, and screen transition. Note required vs optional fields. Do NOT submit real credentials.
91
- 3. **Onboarding Agent** -- After signup screens, document the onboarding flow: welcome screens, setup wizards, tutorials, first-run experience. Walk through every step.
92
- 4. **Social Proof Agent** -- Look for trust signals during signup: testimonials, logos, security badges, terms. Document what reassurance the user gets during the flow.`,
93
- pricing: `Spawn these parallel agents to deeply analyze the pricing experience:
94
- 1. **Pricing Page Agent** -- Navigate to the pricing page. Snapshot the full layout. Toggle between monthly/annual. Click to expand feature lists. Document every plan name, price, and feature.
95
- 2. **Feature Comparison Agent** -- Find the feature comparison table or matrix. Click through each tier's detail page. Document what's included and excluded at each level.
96
- 3. **Pricing Discovery Agent** -- Check multiple entry points to pricing (nav, footer, CTAs). Look for different pricing shown to different segments. Check if pricing changes based on region or plan selection.
97
- 4. **Competitor Pricing Agent** -- Search for and scrape competitor pricing pages. Build a side-by-side comparison of pricing tiers and features.`,
98
- docs: `Spawn these parallel agents to walk through the documentation experience:
99
- 1. **Quickstart Agent** -- Find and follow the quickstart guide from start to finish. Try every step. Document the experience: was it clear? Were code examples correct? How long would it take a new developer?
100
- 2. **Navigation Agent** -- Explore the doc structure. Click through the sidebar, use search, check breadcrumbs. Document the information architecture and how easy it is to find things.
101
- 3. **Code Examples Agent** -- Find code examples across the docs. Check multiple languages/SDKs. Document which are available, their quality, and whether they look copy-pasteable.
102
- 4. **API Reference Agent** -- Find the API reference. Walk through endpoints, check request/response examples, look for interactive "try it" features. Document completeness and usability.`,
103
- dashboard: `Spawn these parallel agents to explore the core product experience:
104
- 1. **Entry Point Agent** -- Find the login/dashboard entry. Document what the user sees on first login. Walk through the main navigation. Map out the product sections.
105
- 2. **Core Flow Agent** -- Identify the primary user action (create something, configure something). Walk through it step by step. Document each screen and interaction.
106
- 3. **Settings & Config Agent** -- Explore settings, integrations, API keys, team management. Document what's configurable and how.
107
- 4. **Help & Support Agent** -- Find help resources within the product: tooltips, help center links, chat widgets, documentation links. Document what support is available in-context.`,
108
- };
109
- return `You are a product demo team lead powered by Firecrawl. You walk through a product's key flows using cloud browser automation, documenting every screen and interaction.
110
-
111
- ${shared_1.QA_TOOLS_BLOCK}
112
-
113
- ## Your Strategy
114
-
115
- You are a **team lead**. Your job is to:
116
-
117
- 1. **Open the site first** -- Run \`firecrawl browser "open <url>"\` yourself to get the initial page state and understand the site structure.
118
- 2. **Spawn parallel subagents** -- Each agent walks through a different flow using \`firecrawl browser\`. They click, scroll, type, and snapshot their way through the product.
119
- 3. **Collect results** -- Each agent reports back a step-by-step walkthrough of their flow.
120
- 4. **Synthesize** -- Merge all walkthroughs into one structured report.
121
-
122
- ## Agent Assignments
123
-
124
- ${focusInstructions[opts.focus]}
125
-
126
- ${shared_1.SUBAGENT_INSTRUCTIONS}
127
-
128
- - Tell each agent to use \`firecrawl browser\` commands to navigate interactively
129
- - Each agent should describe every screen they see: layout, content, CTAs, forms
130
- - Agents should \`firecrawl browser "snapshot"\` at each step to see interactive elements
131
- - Agents should note the user experience: what's clear, what's confusing, what's missing
132
-
133
- ## Output Format
134
-
135
- ${outputInstructions}
136
-
137
- Structure the walkthrough as:
138
-
139
- ### Product Overview
140
- One paragraph summary of what the product does based on exploring it.
141
-
142
- ### Flow Walkthroughs
143
-
144
- For each flow explored:
145
-
146
- #### [Flow Name]
147
- Step-by-step walkthrough:
148
- 1. **[Screen/Page Name]** -- What's on screen, key elements, what the user would do next
149
- 2. **[Next Screen]** -- What changed, new elements, user actions available
150
- ...
151
-
152
- Key observations:
153
- - What works well
154
- - What's confusing or could be improved
155
- - Notable UX patterns
156
-
157
- ### Key Findings
158
- - First impression and overall UX quality
159
- - Standout features or patterns
160
- - Friction points or usability issues
161
- - How the product compares to typical products in the space
162
-
163
- ### Recommendations
164
- What could be improved, from a user experience perspective.
165
-
166
- ### Pages Visited
167
- Full list of every URL the agents navigated to.
168
-
169
- ---
170
-
171
- Be specific and descriptive. Don't just say "the pricing page looks good" -- describe what's on it, how it's organized, and what makes it effective or not.
172
-
173
- Start by opening the site, then immediately fan out your agents to walk through different flows in parallel.`;
174
- }
175
- // ─── Command registration ───────────────────────────────────────────────────
176
- function register(parentCmd, backend) {
177
- const config = backends_1.BACKENDS[backend];
178
- parentCmd
179
- .command('demo')
180
- .description("Walk through a product's key flows using cloud browser")
181
- .argument('[url]', 'Product URL to explore')
182
- .option('-y, --yes', 'Auto-approve all tool permissions')
183
- .action(async (url, options) => {
184
- const inputs = await gatherInputs(url ? { url } : undefined);
185
- const skipPermissions = options.yes || (await (0, shared_1.askPermissionMode)(backend));
186
- console.log(`\nLaunching ${config.displayName}...\n`);
187
- (0, backends_1.launchAgent)(backend, buildSystemPrompt({ focus: inputs.focus, output: inputs.output }), (0, shared_1.buildMessage)([`Walk through ${inputs.url}`, inputs.context]), skipPermissions);
188
- });
189
- }
190
- //# sourceMappingURL=demo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"demo.js","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/demo.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0KH,4BAqBC;AA5LD,0CAAkE;AAClE,sCAOmB;AAWnB,+EAA+E;AAE/E,KAAK,UAAU,YAAY,CAAC,OAA0B;IACpD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,wDAAa,mBAAmB,GAAC,CAAC;IAE5D,MAAM,MAAM,GACV,OAAO,EAAE,GAAG;QACZ,CAAC,MAAM,KAAK,CAAC;YACX,OAAO,EAAE,2CAA2C;YACpD,QAAQ,EAAE,oBAAW;SACtB,CAAC,CAAC,CAAC;IAEN,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC;QACzB,OAAO,EAAE,sCAAsC;QAC/C,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,0CAA0C,EAAE,KAAK,EAAE,MAAM,EAAE;YACnE,EAAE,IAAI,EAAE,4BAA4B,EAAE,KAAK,EAAE,QAAQ,EAAE;YACvD,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,SAAS,EAAE;YAC/C,EAAE,IAAI,EAAE,wCAAwC,EAAE,KAAK,EAAE,MAAM,EAAE;YACjE,EAAE,IAAI,EAAE,4BAA4B,EAAE,KAAK,EAAE,WAAW,EAAE;SAC3D;KACF,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;QAC1B,OAAO,EAAE,sDAAsD;QAC/D,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,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,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAE7D,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,IAAA,0BAAiB,EAAC,OAAO,CAAC,CAAC,CAAC;QAC1E,OAAO,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,WAAW,OAAO,CAAC,CAAC;QAEtD,IAAA,sBAAW,EACT,OAAO,EACP,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,EACjE,IAAA,qBAAY,EAAC,CAAC,gBAAgB,MAAM,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,EAC5D,eAAe,CAChB,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Workflow: Knowledge Base
3
- *
4
- * A single command that adapts based on the user's goal: local reference docs,
5
- * RAG-ready chunks, fine-tuning datasets, or full doc site mirrors. All output
6
- * follows the `.firecrawl/<hostname>/<path>/index.md` convention.
7
- */
8
- import { Command } from 'commander';
9
- import { type Backend } from '../backends';
10
- export declare function register(parentCmd: Command, backend: Backend): void;
11
- //# sourceMappingURL=knowledge-base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"knowledge-base.d.ts","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/knowledge-base.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,aAAa,CAAC;AAwTlE,wBAAgB,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAgCnE"}