An open-source, embeddable AI chat widget powered by Claude. Drop it into any website with a single script tag, or install it as a React component.
Full documentation: claudius-docs.pages.dev
Try it live at pmds.info or on the docs home page.
Claudius is two pieces: a Cloudflare Worker (keeps your Anthropic API key server-side) and a widget embed.
git clone https://github.com/PMDevSolutions/Claudius.git
cd Claudius/worker
pnpm install
npx wrangler login
npx wrangler kv namespace create RATE_LIMIT # paste the id into wrangler.toml
npx wrangler secret put ANTHROPIC_API_KEY
npx wrangler deployThen set ALLOWED_ORIGIN to your site's origin (Workers → Settings →
Variables). Comma-separate multiple origins.
Add before </body>:
<script>
window.ClaudiusConfig = {
apiUrl: "https://claudius-chat-worker.<you>.workers.dev",
title: "Support",
subtitle: "Ask me anything",
theme: "auto",
};
</script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/PMDevSolutions/Claudius@1/cdn/claudius.css"
/>
<script src="https://cdn.jsdelivr.net/gh/PMDevSolutions/Claudius@1/cdn/claudius.iife.js"></script>The @1 CDN channel auto-updates within v1.x. That's it.
Building a React app? Install from npm instead of the script embed:
npm install claudius-chat-widget react react-domimport { ChatWidget } from "claudius-chat-widget";
import "claudius-chat-widget/style.css";
<ChatWidget
apiUrl="https://claudius-chat-worker.<you>.workers.dev"
title="Support"
/>;The package ships dual ESM/CJS builds with TypeScript types. See the documentation for theming, localization, and SSR notes.
| Section | What's there |
|---|---|
| Getting started | Architecture, quick start, local development |
| Configuration | Every widget and worker option, triggers, localization, theming, multi-client configs |
| Deployment | Worker setup, CDN vs self-hosted embed, per-host guides (static, WordPress, Replit, React/Next.js) |
| API reference | REST endpoints, error codes, widget TypeScript API |
| Migration guides | Upgrading between versions |
| FAQ | CORS, rate limits, CSP, privacy |
cd worker && pnpm install && pnpm dev # http://localhost:8787
cd widget && pnpm install && pnpm dev # http://localhost:5173Tests: pnpm test in widget/ and worker/. Details in the
local development guide.
React 18 + TypeScript + Tailwind (widget) · Cloudflare Workers + Hono + Anthropic SDK (worker) · Claude Haiku 4.5 by default.
Contributions are welcome — see CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md for how to report security issues responsibly.
Released under the MIT License.