diff --git a/package.json b/package.json index e4da1cac7..2f65c5b05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firecrawl-cli", - "version": "1.19.20", + "version": "1.19.21", "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-monitor/SKILL.md b/skills/firecrawl-monitor/SKILL.md index a0b4243db..9522d74d5 100644 --- a/skills/firecrawl-monitor/SKILL.md +++ b/skills/firecrawl-monitor/SKILL.md @@ -13,6 +13,17 @@ Detect when content on a website changes and get notified by webhook or email. E Monitors come in two flavors: **page monitors** watch URLs you already have (a page, a list, or a whole site via crawl) for changes, and **web monitors** watch the whole web via search for _new_ results that match a goal — see [Web monitors](#web-monitors-monitor-the-web). +**Pick a target mode** by what you're watching: + +| Mode | Flags | Watches | +| ----------- | ------------------------------ | ------------------------------------------------------ | +| Single page | `--page ` | one URL, for changes | +| URL batch | `--scrape-urls ` | several URLs, for changes | +| Whole site | `--crawl-url ` | every page a crawl discovers, for changes | +| Web search | `--queries ` + `--goal` | the **whole web**, for _new_ results matching the goal | + +The first three watch URLs you already have. **Web search** is the odd one out — there's no fixed URL; it runs your queries each check and alerts on results it hasn't seen before. `--goal` is required with `--queries`. (See [Web monitors](#web-monitors-monitor-the-web).) + ## When to use - The user wants to know **when** something changes — and be **notified about it** — not just read what the page says right now diff --git a/src/commands/monitor.ts b/src/commands/monitor.ts index 5af0ddba8..9c995c3e3 100644 --- a/src/commands/monitor.ts +++ b/src/commands/monitor.ts @@ -126,6 +126,21 @@ function fail(error: unknown): never { process.exit(1); } +/** + * Firecrawl Cloud web dashboard URL for a monitor, used to point users at the + * place they can inspect checks and tweak config. Returns null for self-hosted + * APIs, which have no web dashboard. + */ +function monitorDashboardUrl( + id: string, + apiUrl: string | undefined +): string | null { + const url = apiUrl || getConfig().apiUrl || DEFAULT_API_URL; + return /api\.firecrawl\.dev/i.test(url) + ? `https://www.firecrawl.dev/app/monitoring/${id}` + : null; +} + /** * Build the request body for `monitor create` from CLI flags. * @@ -310,6 +325,19 @@ export function createMonitorCommand(): Command { '--goal ', 'Plain-language goal for the AI change judge (auto-enables the judge)' ) + .addHelpText( + 'after', + ` +Target modes (choose one per monitor): + --page Watch a single page for changes + --scrape-urls Watch a batch of pages for changes + --crawl-url Watch a whole site — crawls and diffs every page each check + --queries + --goal Watch the web via search — alerts on NEW results matching --goal + +The first three watch URLs you give it for changes. --queries instead searches the +whole web each check and alerts on new results matching your --goal (required with --queries). +` + ) ).action(async (file: string | undefined, options) => { try { const fromJson = await readJsonPayload(file); @@ -339,6 +367,16 @@ export function createMonitorCommand(): Command { body, }); emit(payload, options); + // Point the user at the dashboard + a smoke-test. Only when interactive, + // so stdout pipes and `--output` files stay clean for scripting. + const createdId = (payload as { data?: { id?: string } })?.data?.id; + if (createdId && process.stdout.isTTY) { + const link = monitorDashboardUrl(createdId, options.apiUrl); + const hints = [`\n Monitor created · ${createdId}`]; + if (link) hints.push(` Open in dashboard: ${link}`); + hints.push(` Trigger a check: firecrawl monitor run ${createdId}`); + process.stderr.write(hints.join('\n') + '\n'); + } } catch (err) { fail(err); }