Skip to content
ƒtsforgev0.58.0
19

Web research (no API keys)

3 min read

Interactive sessions get read-only internet research tools on by default (an assistant that can’t look things up is silly); toggle them under Web tools in /config. They’re built for no required API keys and no paid vendor coupling: npm metadata comes from the configured registry, search defaults to DuckDuckGo’s keyless HTML endpoint, pages are extracted locally, and browser rendering uses local Playwright/Chromium when available. One-shot and eval runs stay off unless you set TSFORGE_WEB=1, so headless sweeps have no network reach beyond your model endpoint.

Terminal window
TSFORGE_WEB=1 tsforge "update the deprecated API call (check the library's current docs)"
  • package_info: read current npm package metadata from the configured registry. Latest dist-tag, versions, deprecation status, peer deps, homepage, repository, and dependency names.
  • package_docs: read package docs without a docs API. Local node_modules README/package metadata/types first, then the npm registry README when needed.
  • web_fetch: retrieve a URL and return readable markdown. The page is fetched and the content extracted on-machine (no third-party reader API), so you get clean text without shipping the URL to a service.
  • web_browse: open a public URL in local headless Chromium via Playwright and return rendered visible text, final URL, title, and links. Use it for JavaScript-rendered docs that web_fetch cannot see. No hosted browser service.
  • web_search: discover sources for a query. It returns public result URLs only, supports queries (up to 5 phrasings in one call), recency (day, week, month, year), domains for site scoping, maxResults up to 20, and topic to flag results already read. Each result names the tool that reads it best. Defaults to DuckDuckGo’s keyless HTML endpoint.
  • hn_search / hn_thread: Hacker News through Algolia’s official API. Search, then read a whole discussion in one request.
  • se_search / se_question: Stack Exchange through its official API. Search any site, then read a question with all its answers.

web_fetch also takes a topic: the page is logged in notes/<topic>/sources.md and not read twice, and Reddit / Hacker News / Stack Exchange URLs are handed to their site tool. How research runs use all of this together: Research sources.

SearXNG is not bundled or started by tsforge. If you run your own SearXNG service (Docker, Compose, or any deployment), point tsforge at it once: /config → Web search backend, or "settings": { "searxngUrl": "…" } in ~/.tsforge/config.json (Settings file). For a single run the variable also works:

Terminal window
TSFORGE_WEB=1 TSFORGE_SEARXNG_URL=http://localhost:8888 tsforge

For current TypeScript/library work, ask the agent to search the official host first, then fetch the source it picks:

Check the current TanStack Query docs before changing this hook. Use domain-scoped web search if needed.

The tools are read-only and offline-safe. Interactive sessions enable them by default, but one-shot and eval runs stay offline unless you opt in, so headless sweeps are deterministic. Under a policy mode that denies network (e.g. ci), the tools are unavailable even with the flag set. See Permissions & policy.

Env varDefaultEffect
TSFORGE_WEBon interactive, off one-shot/evalforce keyless research tools on (=1) or off (=0)
TSFORGE_NPM_REGISTRYnpm registryregistry used by package_info / package_docs
TSFORGE_SEARXNG_URLunsetroute web_search to a SearXNG instance you already run
TSFORGE_STACKEXCHANGE_KEYunsetStack Exchange API key: 300 → 10,000 requests/day for se_*
TSFORGE_WEB_SEARCH_BACKENDautoduckduckgo or searxng; searxng fails closed if no SearXNG URL is set

→ Environment variables · MCP servers · Permissions & policy