Meta-package
@web-ai-sdk/all is a thin meta-package that re-exports the eight other scoped @web-ai-sdk/* building blocks under a single install. It has no behaviour of its own. All logic, tests, and version history live in the scoped packages.
Reach for it when you want one entry in package.json instead of eight, or when you’re prototyping and don’t care yet which blocks you’ll keep.
Install
Section titled “Install”pnpm add @web-ai-sdk/all# or: npm i @web-ai-sdk/all / bun add @web-ai-sdk/allThe eight scoped packages come along as transitive dependencies. react is a peer dependency only when you import any /react subpath.
Two import shapes
Section titled “Two import shapes”Both are valid. Pick whichever reads better at the call site.
Per-package subpaths (recommended for production)
Section titled “Per-package subpaths (recommended for production)”Bundlers tree-shake this cleanly; you only pay for the blocks you actually use.
import { ask, createSession } from "@web-ai-sdk/all/prompt";import { summarize } from "@web-ai-sdk/all/summarizer";import { translate } from "@web-ai-sdk/all/translator";import { detect } from "@web-ai-sdk/all/detector";import { write } from "@web-ai-sdk/all/writer";import { rewrite } from "@web-ai-sdk/all/rewriter";import { proofread } from "@web-ai-sdk/all/proofreader";import { registerTool, defineTool } from "@web-ai-sdk/all/webmcp";import { usePrompt, useSession } from "@web-ai-sdk/all/prompt/react";import { useSummarizer } from "@web-ai-sdk/all/summarizer/react";Namespaced root (handy for prototyping)
Section titled “Namespaced root (handy for prototyping)”import { prompt, summarizer, translator, detector, writer, rewriter, proofreader, webmcp } from "@web-ai-sdk/all";
await prompt.ask({ input: "Hello" });await summarizer.summarize({ language: "en", input: longText });await translator.translate({ input: "Olá", sourceLanguage: "pt", targetLanguage: "en" });Why namespaced and not flat? Names like isAvailable and checkAvailability appear in every package, so a flat re-export at the root would collide. Namespacing keeps each block’s surface intact.
When not to use the meta-package
Section titled “When not to use the meta-package”Use the scoped packages directly when:
- You’re shipping a library and want minimal transitive deps for downstream consumers.
- You need to pin one block to a different version than the rest.
For applications, the meta-package is usually the right default.
Versioning
Section titled “Versioning”The scoped packages are independently versioned, so a Prompt-only API change can ship without bumping Translator, WebMCP, or the other wrappers. The @web-ai-sdk/all version is the suite anchor: it is bumped whenever one of the packages it re-exports changes, so pinning @web-ai-sdk/all keeps the full bundle on a known state.
Available subpaths
Section titled “Available subpaths”| Subpath | Re-exports |
|---|---|
@web-ai-sdk/all | namespaces for all eight packages |
@web-ai-sdk/all/prompt | @web-ai-sdk/prompt |
@web-ai-sdk/all/prompt/react | @web-ai-sdk/prompt/react |
@web-ai-sdk/all/webmcp | @web-ai-sdk/webmcp |
@web-ai-sdk/all/webmcp/react | @web-ai-sdk/webmcp/react |
@web-ai-sdk/all/summarizer | @web-ai-sdk/summarizer |
@web-ai-sdk/all/summarizer/react | @web-ai-sdk/summarizer/react |
@web-ai-sdk/all/translator | @web-ai-sdk/translator |
@web-ai-sdk/all/translator/react | @web-ai-sdk/translator/react |
@web-ai-sdk/all/detector | @web-ai-sdk/detector |
@web-ai-sdk/all/detector/react | @web-ai-sdk/detector/react |
@web-ai-sdk/all/writer | @web-ai-sdk/writer |
@web-ai-sdk/all/writer/react | @web-ai-sdk/writer/react |
@web-ai-sdk/all/rewriter | @web-ai-sdk/rewriter |
@web-ai-sdk/all/rewriter/react | @web-ai-sdk/rewriter/react |
@web-ai-sdk/all/proofreader | @web-ai-sdk/proofreader |
@web-ai-sdk/all/proofreader/react | @web-ai-sdk/proofreader/react |