Skip to content

SMOODEV-2620: th crawl crawl/map, scrape extract/screenshot/render, search --scrape, knowledge add-url#214

Merged
brentrager merged 1 commit into
mainfrom
SMOODEV-2620-crawl-cli
Jul 14, 2026
Merged

SMOODEV-2620: th crawl crawl/map, scrape extract/screenshot/render, search --scrape, knowledge add-url#214
brentrager merged 1 commit into
mainfrom
SMOODEV-2620-crawl-cli

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Problem

Agents driving the CLI could only th crawl scrape a single page and th search. There was no way to crawl a whole site, discover URLs, run structured LLM extraction, or ingest a site into the org knowledge base without hand-rolling api-prime requests.

Solution

Wire the full crawler/search/knowledge surface into th, against the known api-prime contracts:

  • th crawl scrape--extract <SPEC> (JSON verbatim, else {"prompt": …}), --screenshot (appends to formats), --render <MODE>. extract/render are authed-only.
  • th crawl crawl <seed> — NEW authed whole-site crawl: --limit, --max-depth (→ maxDiscoveryDepth), --extract, --json. Default output: completed/total + one URL per line.
  • th crawl map <url> — NEW authed URL discovery: --search, --limit, --include-subdomains, --json. Default: one link per line.
  • th search --scrape — forces searchDepth: "advanced" to crawl-enrich each result (authed tier; clamped on free tier).
  • th api knowledge add-url <url> — NEW authed command → POST /organizations/{org}/knowledge/websites {urls:[url], name} (--name defaults to URL), kicks off async crawl→ingest.

Verification

  • cargo build -p smooai-smooth-cli --bin th compiles clean (only pre-existing warnings in other modules).
  • All --help outputs render: th crawl --help (scrape/crawl/map), the three subcommands' flags, th search --help (--scrape), th api knowledge --help (add-url) and th api knowledge add-url --help.
  • Changeset added (@smooai/smooth: minor).

Backend crawl/search/knowledge routes are being added in parallel; this CLI is written against the known contract.

🤖 Generated with Claude Code

…r, search --scrape, knowledge add-url

Give agents the full crawler surface from the CLI so a session can discover,
crawl, and ingest a site without hand-rolling api-prime requests. Scrape gains
LLM extract + screenshot + JS-render controls; new `crawl crawl` does whole-site
markdown, `crawl map` does URL discovery, `search --scrape` crawl-enriches
results with full page content, and `knowledge add-url` kicks off an async
crawl→ingest job into the org's knowledge base.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9b07ab1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager brentrager enabled auto-merge (squash) July 14, 2026 03:00
@brentrager brentrager merged commit 9fbab21 into main Jul 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant