Installation
Get started with WebInfer in your project
Overview
WebInfer provides multiple installation options depending on your use case:
- Browser Extension - For end users to enable AI on any website
- NPM Package - For developers building AI-powered applications
- CDN - For quick prototyping without a build step
Browser Extension
The WebInfer Chrome extension enables AI access on any website through the WebInfer SDK.
Installation
- Download the extension from the Chrome Web Store (coming soon)
- Click "Add to Chrome"
- Configure your API keys or local models in the extension settings
Development Installation
To load the extension locally for development:
terminal
# Clone and buildgit clone https://github.com/webinfer/webinfer.gitcd webinfernpm installnpm run build:extension# Load in Chrome# 1. Navigate to chrome://extensions# 2. Enable "Developer mode"# 3. Click "Load unpacked"# 4. Select apps/extension/distNPM Package
For developers building applications with WebInfer.
Installation
terminal
npm install webinferOr with yarn:
terminal
yarn add webinferOr with pnpm:
terminal
pnpm add webinferWhat Gets Installed
The webinfer package includes:
@webinfer/client- Browser SDK and polyfill@webinfer/server- Core orchestration (for daemon mode)- CLI tools for running a local daemon
CDN Installation
For quick prototyping or static HTML pages:
index.html
<script type="module"> import { generateText, isAvailable } from 'https://esm.sh/webinfer' if (await isAvailable()) { const result = await generateText({ prompt: 'Hello, world!' }) console.log(result.text) }</script>Or with npm-style imports via esm.sh:
index.html
<script type="module"> import { generateText } from 'https://esm.sh/webinfer' const result = await generateText({ prompt: 'Hello, world!' }) console.log(result.text)</script>Vercel AI SDK Provider
If you're using the Vercel AI SDK, install the WebInfer provider:
terminal
npm install webinfer-ai-providerUsage:
app.ts
import { webinfer } from 'webinfer-ai-provider'import { generateText } from 'ai'const result = await generateText({ model: webinfer('browser'), prompt: 'Explain TypeScript'})Next Steps
- Quick Start - Make your first API call
- Browser Usage - Learn about the WebInfer SDK
- Provider Setup - Configure API keys for different providers