feat: sync CLI with scrapegraph-js v2 PR #13 head#14
Closed
VinciGit00 wants to merge 11 commits intomainfrom
Closed
feat: sync CLI with scrapegraph-js v2 PR #13 head#14VinciGit00 wants to merge 11 commits intomainfrom
VinciGit00 wants to merge 11 commits intomainfrom
Conversation
Align the CLI with ScrapeGraphAI/scrapegraph-js#11 (v2 SDK migration): - Rename smart-scraper → extract, search-scraper → search - Remove commands dropped from the API: agentic-scraper, generate-schema, sitemap, validate - Add client factory (src/lib/client.ts) using the new scrapegraphai({ apiKey }) pattern - Update scrape command with --format flag (markdown, html, screenshot, branding) - Update crawl to use crawl.start/status polling lifecycle - Update history to use v2 service names and parameters - All commands now use try/catch (v2 throws on error) and self-timed elapsed BREAKING CHANGE: CLI commands have been renamed and removed to match the v2 API surface. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Aligns CLI with scrapegraph-js v2 SDK change (b570a57) that replaced stealth/render booleans with a unified fetch mode enum: auto, fast, js, direct+stealth, js+stealth. - All commands: --stealth boolean → --mode <mode> string - Pin SDK to commit b570a57 (includes fetch mode change) - Update README and SKILL.md with new flag syntax Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Bump scrapegraph-js pin b570a57 → c5bf757 - scrape: support 8 formats (markdown, html, screenshot, branding, links, images, summary, json), multi-format via comma-separated -f, add --html-mode, --scrolls, --prompt/--schema for json format - search: add --location-geo-code, --time-range, --format - crawl: add --format flag - README: document new flags and formats Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The SDK is pinned to a GitHub commit (not on npm yet) and ships without a prebuilt dist/, so module resolution fails right after bun install. Build it as a post-install CI step until v2 lands on npm. Also rewrite tests/smoke.test.ts — the old test still imported the v1 symbols (smartScraper, HISTORY_SERVICES) that no longer exist; replace with a sanity check against the v2 scrapegraphai() factory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split compound fetch modes (direct+stealth, js+stealth) into separate --mode (auto|fast|js) and --stealth boolean flag. Add --nationality param to search command. Update SDK dependency to latest PR commit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Import ApiExtractOptions, ApiScrapeOptions, ApiSearchOptions, and ApiCrawlOptions from scrapegraph-js to satisfy biome noExplicitAny rule. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The SDK's Zod-inferred types have strict required fields (from .default()) that don't match partial CLI arg construction. Allow `as any` in src/commands/ where we bridge string args to the SDK. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace SDK factory with raw function imports (scrape, extract, search, crawl, monitor, history, getCredits) - Add monitor command (create, list, get, update, delete, pause, resume) - Update crawl to use formats array and crawl.get instead of crawl.status - Update history to use history.list/history.get with new pagination response - Update search to pass query in params, remove nationality flag - Update extract to pass url in params - Make history service filter optional - Update README with monitor docs and v2 migration notes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- bump scrapegraph-js to latest PR HEAD (adds monitor.activity, renames SGAI_TIMEOUT_S → SGAI_TIMEOUT, bakes /api/v2 into default base URL) - add `just-scrape monitor activity --id <id> [--limit] [--cursor]` for paginated tick history - bridge legacy SGAI_TIMEOUT_S (and JUST_SCRAPE_TIMEOUT_S) to new SGAI_TIMEOUT - README: document activity command, update default base URL, note SGAI_DEBUG - bump CLI to v1.0.0 to track SDK v2.0.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VinciGit00
added a commit
to ScrapeGraphAI/docs-mintlify
that referenced
this pull request
Apr 15, 2026
Brings the CLI docs in line with the CLI changes in ScrapeGraphAI/just-scrape#14 (which pulls in scrapegraph-js v2 PR #13 head 096c110): - Document the full `just-scrape monitor` action set, including the new `monitor activity --id <id> [--limit] [--cursor]` for paginated tick history - Replace stale `-m direct+stealth` / `-m js+stealth` with real CLI syntax (`-m js --stealth`, fetch modes: auto/fast/js) - Env vars: `SGAI_TIMEOUT_S` → `SGAI_TIMEOUT`, default base URL now `https://api.scrapegraphai.com/api/v2`, document `SGAI_DEBUG` - Credits example uses `.remaining` (v2 response shape) - Add `schema` to the history services list - Fix `--location-geo-code` → `--country` in search example - Add monitor usage examples (webhook, activity, jq filter for changes) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
Closing to re-open once the command-file consolidation refactor lands on this branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Syncs
just-scrapewith the latest commits on scrapegraph-js#13 (head096c110), picking up changes made after the previous pin (0738786):monitor.activityendpoint (scrapegraph-js 096c110) — paginated tick history with diffsSGAI_TIMEOUT_S→SGAI_TIMEOUTenv var rename (scrapegraph-js 2eba148)https://api.scrapegraphai.com/api/v2(baked into SDK)/health(relative to/api/v2)CLI changes
just-scrape monitor activity --id <id> [--limit N] [--cursor C]— new action callingsgai.monitor.activity()src/lib/env.tsbridges legacySGAI_TIMEOUT_S(andJUST_SCRAPE_TIMEOUT_S) →SGAI_TIMEOUTso nothing breaks for existing userspackage.jsonbumpsscrapegraph-jspin0738786→096c110, and CLI version0.3.0→1.0.0to track SDK v2.0.0README.md: documents the newactivityaction, updates env-var table, addsSGAI_DEBUGTest plan
bun run check— tsc + biome cleanbun run build— bundles successfullybun run dev --help/monitor --helpshow the newactivityaction and--limit/--cursorflagsDocs follow-up in docs-mintlify#39.
🤖 Generated with Claude Code