
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
pi-web-utils
Advanced tools
Configurable web search, markdown-first webpage fetching, GitHub local repo search tools for pi coding agent
Configurable web tooling extension for pi-coding-agent.
It adds four tools:
web_searchfetch_webpageclone_github_reposearch_local_repogoogle, duckduckgo, searxng, or custom) and ordered fallback.markdown or structured json).markdown.new (https://markdown.new/<url>) first, then fall back to local HTML -> markdown/json conversion.root, tree, and blob URLs with a cached local path.rg (fallback to grep).pi install npm:pi-web-utils
Or package/publish and install via npm/git like other pi packages.
// 1) Search with fallback chain from config
web_search({ query: "TypeScript project architecture patterns" })
// 2) Force a specific engine but still allow fallback
web_search({
query: "SearXNG self-host setup",
engineId: "searxng",
allowFallback: true
})
// 3) Pass per-call query params to engine URL
web_search({
query: "React suspense",
engineId: "google",
extraParams: { hl: "en", num: "10" }
})
// 4) Format raw HTML search response as markdown
web_search({
query: "site:github.com pi-coding-agent extensions",
engineId: "duckduckgo",
rawHtmlFormat: "markdown"
})
// 5) Fetch webpage as markdown (markdown.new first)
fetch_webpage({ url: "https://docs.example.com/guide" })
// 6) Fetch webpage as structured JSON
fetch_webpage({
url: "https://docs.example.com/guide",
output: "json"
})
// 7) Clone GitHub repo URL
clone_github_repo({ url: "https://github.com/owner/repo" })
// 8) Clone tree/blob URLs too
clone_github_repo({ url: "https://github.com/owner/repo/tree/main/src" })
clone_github_repo({ url: "https://github.com/owner/repo/blob/main/README.md" })
// 9) Search latest cloned repo
search_local_repo({ query: "registerTool" })
// 10) Search a specific repo key
search_local_repo({
repo: "owner/repo@main",
query: "fetchWithTimeout",
glob: "*.ts"
})
Configuration file path (default):
~/.pi/web-tools.json
You can override path with env var:
PI_WEB_TOOLS_CONFIG=/path/to/config.json
{
"search": {
"includeBuiltins": true,
"engines": [
{
"id": "searxng",
"kind": "searxng",
"baseUrl": "https://searx.example.com/search",
"queryParams": {
"format": "json",
"language": "en-US"
},
"headers": {
"x-api-key": "optional"
},
"timeoutMs": 20000
},
{
"id": "duckduckgo",
"enabled": true
},
{
"id": "google",
"queryParams": {
"hl": "en"
}
},
{
"id": "my-custom-engine",
"kind": "custom",
"baseUrl": "https://search.example.com/query",
"queryParam": "q",
"queryParams": {
"api": "v2"
},
"responseFormat": "json"
}
],
"fallbackOrder": ["searxng", "duckduckgo", "google", "my-custom-engine"],
"maxResults": 8,
"timeoutMs": 15000
},
"fetch": {
"timeoutMs": 30000,
"maxBodyChars": 120000,
"markdownNew": {
"enabled": true,
"baseUrl": "https://markdown.new/",
"timeoutMs": 20000
}
},
"github": {
"enabled": true,
"clonePath": "/tmp/pi-web-utils/repos",
"cloneTimeoutMs": 30000,
"maxRepoSizeMB": 350,
"maxTreeEntries": 200,
"maxInlineFileChars": 100000
},
"localSearch": {
"defaultMaxMatches": 80,
"maxMatches": 300,
"previewChars": 220,
"timeoutMs": 15000
}
}
web_searchParameters:
query (required)engineId (optional)fallbackOrder (optional)maxResults (optional)extraParams (optional key/value params appended to request)allowFallback (optional, default true)rawHtmlFormat (optional: none | markdown | json)includeRawResponse (optional)Behavior:
fetch_webpageParameters:
url (required)output (markdown | json, default markdown)preferMarkdownNew (default true)maxCharsincludeRawHtmlBehavior:
markdown.new endpoint (https://markdown.new/<url>).clone_github_repoParameters:
url (required)forceClonerefreshmaxTreeEntriesBehavior:
maxRepoSizeMB), returns API preview unless forceClone: true.search_local_repoParameters:
query (required)repo (optional clone key, e.g. owner/repo or owner/repo@branch)path (optional)glob (optional)maxMatches (optional)caseSensitive (optional)Behavior:
rg if available, otherwise grep.repo/path not provided.bun install
bun run typecheck
bun run typecheck
bun publish --access public
Before publishing, update these values in package.json:
authorrepository.urlhomepagebugs.urlname (if pi-web-utils is already taken on npm)FAQs
Configurable web search, markdown-first webpage fetching, GitHub local repo search tools for pi coding agent
The npm package pi-web-utils receives a total of 13 weekly downloads. As such, pi-web-utils popularity was classified as not popular.
We found that pi-web-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.