create-claudius 1.8.0 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 PMDevSolutions
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PMDevSolutions
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,68 +1,68 @@
1
- # create-claudius
2
-
3
- [![npm](https://img.shields.io/npm/v/create-claudius.svg)](https://www.npmjs.com/package/create-claudius)
4
-
5
- Scaffold a [Claudius](https://claudius-docs.pages.dev) AI chat widget project in
6
- one command.
7
-
8
- ```bash
9
- npm create claudius@latest
10
- # or
11
- pnpm create claudius
12
- # or
13
- yarn create claudius
14
- ```
15
-
16
- You'll be prompted for:
17
-
18
- - **Project name** — the new directory / package name
19
- - **Framework** — `vanilla` (CDN script embed), `react` (Vite), or `next` (Next.js App Router)
20
- - **Theme** — `auto` / `light` / `dark`, or a built-in theme (`default`, `minimal`, `playful`, `corporate`)
21
- - **Accent color** — a hex color for the widget
22
- - **API URL** — your deployed Claudius worker endpoint
23
- - Optionally, a **Cloudflare Worker** scaffold (`wrangler.toml` + KV stub + deploy runbook)
24
-
25
- The generated project runs out of the box:
26
-
27
- ```bash
28
- cd my-app
29
- pnpm install
30
- pnpm dev
31
- ```
32
-
33
- ## Non-interactive
34
-
35
- Pass flags to skip the prompts (handy for CI):
36
-
37
- ```bash
38
- npm create claudius@latest my-app -- \
39
- --template react \
40
- --theme auto \
41
- --accent "#4f46e5" \
42
- --api-url https://my-worker.workers.dev \
43
- --worker \
44
- --yes
45
- ```
46
-
47
- | Flag | Values | Description |
48
- | --- | --- | --- |
49
- | `--template` | `vanilla` \| `react` \| `next` | Framework template |
50
- | `--theme` | `auto` \| `light` \| `dark` \| `default` \| `minimal` \| `playful` \| `corporate` | Widget theme |
51
- | `--accent` | `#rrggbb` | Accent color |
52
- | `--api-url` | URL | Worker chat endpoint |
53
- | `--worker` | — | Also scaffold a Cloudflare Worker |
54
- | `--pm` | `npm` \| `pnpm` \| `yarn` \| `bun` | Package manager shown in next steps |
55
- | `--yes`, `-y` | — | Accept defaults for any unspecified prompt |
56
-
57
- ## What you get
58
-
59
- - **vanilla** — a static Vite site that loads the widget from the jsDelivr CDN via a
60
- single `<script>` tag and `window.ClaudiusConfig`.
61
- - **react** — a Vite + React + TypeScript app using the `claudius-chat-widget`
62
- component and its stylesheet.
63
- - **next** — a Next.js (App Router) + TypeScript app with a client-side widget wrapper.
64
-
65
- See the [documentation](https://claudius-docs.pages.dev) for worker setup and
66
- configuration.
67
-
68
- MIT © PMDevSolutions
1
+ # create-claudius
2
+
3
+ [![npm](https://img.shields.io/npm/v/create-claudius.svg)](https://www.npmjs.com/package/create-claudius)
4
+
5
+ Scaffold a [Claudius](https://claudius-docs.pages.dev) AI chat widget project in
6
+ one command.
7
+
8
+ ```bash
9
+ npm create claudius@latest
10
+ # or
11
+ pnpm create claudius
12
+ # or
13
+ yarn create claudius
14
+ ```
15
+
16
+ You'll be prompted for:
17
+
18
+ - **Project name** — the new directory / package name
19
+ - **Framework** — `vanilla` (CDN script embed), `react` (Vite), or `next` (Next.js App Router)
20
+ - **Theme** — `auto` / `light` / `dark`, or a built-in theme (`default`, `minimal`, `playful`, `corporate`)
21
+ - **Accent color** — a hex color for the widget
22
+ - **API URL** — your deployed Claudius worker endpoint
23
+ - Optionally, a **Cloudflare Worker** scaffold (`wrangler.toml` + KV stub + deploy runbook)
24
+
25
+ The generated project runs out of the box:
26
+
27
+ ```bash
28
+ cd my-app
29
+ pnpm install
30
+ pnpm dev
31
+ ```
32
+
33
+ ## Non-interactive
34
+
35
+ Pass flags to skip the prompts (handy for CI):
36
+
37
+ ```bash
38
+ npm create claudius@latest my-app -- \
39
+ --template react \
40
+ --theme auto \
41
+ --accent "#4f46e5" \
42
+ --api-url https://my-worker.workers.dev \
43
+ --worker \
44
+ --yes
45
+ ```
46
+
47
+ | Flag | Values | Description |
48
+ | --- | --- | --- |
49
+ | `--template` | `vanilla` \| `react` \| `next` | Framework template |
50
+ | `--theme` | `auto` \| `light` \| `dark` \| `default` \| `minimal` \| `playful` \| `corporate` | Widget theme |
51
+ | `--accent` | `#rrggbb` | Accent color |
52
+ | `--api-url` | URL | Worker chat endpoint |
53
+ | `--worker` | — | Also scaffold a Cloudflare Worker |
54
+ | `--pm` | `npm` \| `pnpm` \| `yarn` \| `bun` | Package manager shown in next steps |
55
+ | `--yes`, `-y` | — | Accept defaults for any unspecified prompt |
56
+
57
+ ## What you get
58
+
59
+ - **vanilla** — a static Vite site that loads the widget from the jsDelivr CDN via a
60
+ single `<script>` tag and `window.ClaudiusConfig`.
61
+ - **react** — a Vite + React + TypeScript app using the `claudius-chat-widget`
62
+ component and its stylesheet.
63
+ - **next** — a Next.js (App Router) + TypeScript app with a client-side widget wrapper.
64
+
65
+ See the [documentation](https://claudius-docs.pages.dev) for worker setup and
66
+ configuration.
67
+
68
+ MIT © PMDevSolutions
package/dist/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,57 +1,57 @@
1
- {
2
- "name": "create-claudius",
3
- "version": "1.8.0",
4
- "description": "Scaffold a Claudius AI chat widget project in one command.",
5
- "keywords": [
6
- "claudius",
7
- "create",
8
- "create-claudius",
9
- "scaffold",
10
- "cli",
11
- "chat-widget",
12
- "claude",
13
- "ai-chat"
14
- ],
15
- "author": "PAMulligan",
16
- "license": "MIT",
17
- "homepage": "https://claudius-docs.pages.dev",
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/PMDevSolutions/Claudius.git",
21
- "directory": "create-claudius"
22
- },
23
- "bugs": {
24
- "url": "https://github.com/PMDevSolutions/Claudius/issues"
25
- },
26
- "type": "module",
27
- "bin": {
28
- "create-claudius": "dist/index.js"
29
- },
30
- "files": [
31
- "dist",
32
- "templates"
33
- ],
34
- "engines": {
35
- "node": ">=18"
36
- },
37
- "publishConfig": {
38
- "access": "public"
39
- },
40
- "scripts": {
41
- "build": "tsup",
42
- "dev": "tsup --watch",
43
- "typecheck": "tsc --noEmit",
44
- "test": "vitest run",
45
- "test:watch": "vitest"
46
- },
47
- "dependencies": {
48
- "@clack/prompts": "^0.7.0",
49
- "picocolors": "^1.1.0"
50
- },
51
- "devDependencies": {
52
- "@types/node": "^22.0.0",
53
- "tsup": "^8.3.0",
54
- "typescript": "^5.8.0",
55
- "vitest": "^4.1.0"
56
- }
57
- }
1
+ {
2
+ "name": "create-claudius",
3
+ "version": "1.8.2",
4
+ "description": "Scaffold a Claudius AI chat widget project in one command.",
5
+ "keywords": [
6
+ "claudius",
7
+ "create",
8
+ "create-claudius",
9
+ "scaffold",
10
+ "cli",
11
+ "chat-widget",
12
+ "claude",
13
+ "ai-chat"
14
+ ],
15
+ "author": "PAMulligan",
16
+ "license": "MIT",
17
+ "homepage": "https://claudius-docs.pages.dev",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/PMDevSolutions/Claudius.git",
21
+ "directory": "create-claudius"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/PMDevSolutions/Claudius/issues"
25
+ },
26
+ "type": "module",
27
+ "bin": {
28
+ "create-claudius": "dist/index.js"
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "templates"
33
+ ],
34
+ "engines": {
35
+ "node": ">=18"
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "scripts": {
41
+ "build": "tsup",
42
+ "dev": "tsup --watch",
43
+ "typecheck": "tsc --noEmit",
44
+ "test": "vitest run",
45
+ "test:watch": "vitest"
46
+ },
47
+ "dependencies": {
48
+ "@clack/prompts": "^0.7.0",
49
+ "picocolors": "^1.1.0"
50
+ },
51
+ "devDependencies": {
52
+ "@types/node": "^22.0.0",
53
+ "tsup": "^8.3.0",
54
+ "typescript": "^5.8.0",
55
+ "vitest": "^4.1.0"
56
+ }
57
+ }
@@ -1,23 +1,23 @@
1
- # {{PROJECT_NAME}}
2
-
3
- A [Next.js](https://nextjs.org) (App Router) + TypeScript app using the
4
- [`claudius-chat-widget`](https://www.npmjs.com/package/claudius-chat-widget)
5
- component.
6
-
7
- ```bash
8
- pnpm install
9
- pnpm dev
10
- ```
11
-
12
- The widget is rendered by a client component (`app/ClaudiusWidget.tsx`) because it
13
- relies on browser APIs:
14
-
15
- ```tsx
16
- "use client";
17
- import { ChatWidget } from "claudius-chat-widget";
18
- import "claudius-chat-widget/style.css";
19
- ```
20
-
21
- You need a running Claudius worker for the chat to respond. See the
22
- [worker setup guide](https://claudius-docs.pages.dev/deployment/worker/), or
23
- re-run the scaffolder with `--worker` to generate one.
1
+ # {{PROJECT_NAME}}
2
+
3
+ A [Next.js](https://nextjs.org) (App Router) + TypeScript app using the
4
+ [`claudius-chat-widget`](https://www.npmjs.com/package/claudius-chat-widget)
5
+ component.
6
+
7
+ ```bash
8
+ pnpm install
9
+ pnpm dev
10
+ ```
11
+
12
+ The widget is rendered by a client component (`app/ClaudiusWidget.tsx`) because it
13
+ relies on browser APIs:
14
+
15
+ ```tsx
16
+ "use client";
17
+ import { ChatWidget } from "claudius-chat-widget";
18
+ import "claudius-chat-widget/style.css";
19
+ ```
20
+
21
+ You need a running Claudius worker for the chat to respond. See the
22
+ [worker setup guide](https://claudius-docs.pages.dev/deployment/worker/), or
23
+ re-run the scaffolder with `--worker` to generate one.
@@ -1,7 +1,7 @@
1
- node_modules
2
- .next
3
- out
4
- dist
5
- *.local
6
- .DS_Store
7
- next-env.d.ts
1
+ node_modules
2
+ .next
3
+ out
4
+ dist
5
+ *.local
6
+ .DS_Store
7
+ next-env.d.ts
@@ -1,16 +1,16 @@
1
- "use client";
2
-
3
- import { ChatWidget } from "claudius-chat-widget";
4
- import "claudius-chat-widget/style.css";
5
-
6
- // ChatWidget uses browser APIs and React state, so it must run on the client.
7
- export function ClaudiusWidget() {
8
- return (
9
- <ChatWidget
10
- apiUrl="{{API_URL}}"
11
- title="{{PROJECT_NAME}}"
12
- theme="{{THEME}}"
13
- accentColor="{{ACCENT_COLOR}}"
14
- />
15
- );
16
- }
1
+ "use client";
2
+
3
+ import { ChatWidget } from "claudius-chat-widget";
4
+ import "claudius-chat-widget/style.css";
5
+
6
+ // ChatWidget uses browser APIs and React state, so it must run on the client.
7
+ export function ClaudiusWidget() {
8
+ return (
9
+ <ChatWidget
10
+ apiUrl="{{API_URL}}"
11
+ title="{{PROJECT_NAME}}"
12
+ theme="{{THEME}}"
13
+ accentColor="{{ACCENT_COLOR}}"
14
+ />
15
+ );
16
+ }
@@ -1,15 +1,15 @@
1
- import type { Metadata } from "next";
2
- import type { ReactNode } from "react";
3
-
4
- export const metadata: Metadata = {
5
- title: "{{PROJECT_NAME}}",
6
- description: "A Claudius-powered app",
7
- };
8
-
9
- export default function RootLayout({ children }: { children: ReactNode }) {
10
- return (
11
- <html lang="en">
12
- <body style={{ margin: 0 }}>{children}</body>
13
- </html>
14
- );
15
- }
1
+ import type { Metadata } from "next";
2
+ import type { ReactNode } from "react";
3
+
4
+ export const metadata: Metadata = {
5
+ title: "{{PROJECT_NAME}}",
6
+ description: "A Claudius-powered app",
7
+ };
8
+
9
+ export default function RootLayout({ children }: { children: ReactNode }) {
10
+ return (
11
+ <html lang="en">
12
+ <body style={{ margin: 0 }}>{children}</body>
13
+ </html>
14
+ );
15
+ }
@@ -1,24 +1,24 @@
1
- import { ClaudiusWidget } from "./ClaudiusWidget";
2
-
3
- export default function Home() {
4
- return (
5
- <main
6
- style={{
7
- fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
8
- display: "grid",
9
- placeItems: "center",
10
- minHeight: "100vh",
11
- }}
12
- >
13
- <div style={{ maxWidth: "32rem", padding: "2rem", textAlign: "center" }}>
14
- <h1>{{PROJECT_NAME}}</h1>
15
- <p>
16
- Edit <code>app/ClaudiusWidget.tsx</code> to configure the widget. The launcher
17
- is in the corner.
18
- </p>
19
- </div>
20
-
21
- <ClaudiusWidget />
22
- </main>
23
- );
24
- }
1
+ import { ClaudiusWidget } from "./ClaudiusWidget";
2
+
3
+ export default function Home() {
4
+ return (
5
+ <main
6
+ style={{
7
+ fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
8
+ display: "grid",
9
+ placeItems: "center",
10
+ minHeight: "100vh",
11
+ }}
12
+ >
13
+ <div style={{ maxWidth: "32rem", padding: "2rem", textAlign: "center" }}>
14
+ <h1>{{PROJECT_NAME}}</h1>
15
+ <p>
16
+ Edit <code>app/ClaudiusWidget.tsx</code> to configure the widget. The launcher
17
+ is in the corner.
18
+ </p>
19
+ </div>
20
+
21
+ <ClaudiusWidget />
22
+ </main>
23
+ );
24
+ }
@@ -1,4 +1,4 @@
1
- /** @type {import('next').NextConfig} */
2
- const nextConfig = {};
3
-
4
- export default nextConfig;
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {};
3
+
4
+ export default nextConfig;
@@ -1,22 +1,22 @@
1
- {
2
- "name": "{{PROJECT_NAME}}",
3
- "private": true,
4
- "version": "0.0.0",
5
- "scripts": {
6
- "dev": "next dev",
7
- "build": "next build",
8
- "start": "next start"
9
- },
10
- "dependencies": {
11
- "claudius-chat-widget": "{{WIDGET_VERSION}}",
12
- "next": "^14.2.0",
13
- "react": "^18.3.1",
14
- "react-dom": "^18.3.1"
15
- },
16
- "devDependencies": {
17
- "@types/node": "^22.0.0",
18
- "@types/react": "^18.3.0",
19
- "@types/react-dom": "^18.3.0",
20
- "typescript": "^5.6.0"
21
- }
22
- }
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start"
9
+ },
10
+ "dependencies": {
11
+ "claudius-chat-widget": "{{WIDGET_VERSION}}",
12
+ "next": "^14.2.0",
13
+ "react": "^18.3.1",
14
+ "react-dom": "^18.3.1"
15
+ },
16
+ "devDependencies": {
17
+ "@types/node": "^22.0.0",
18
+ "@types/react": "^18.3.0",
19
+ "@types/react-dom": "^18.3.0",
20
+ "typescript": "^5.6.0"
21
+ }
22
+ }
@@ -1,21 +1,21 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "lib": ["dom", "dom.iterable", "esnext"],
5
- "allowJs": true,
6
- "skipLibCheck": true,
7
- "strict": true,
8
- "noEmit": true,
9
- "esModuleInterop": true,
10
- "module": "esnext",
11
- "moduleResolution": "bundler",
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "jsx": "preserve",
15
- "incremental": true,
16
- "plugins": [{ "name": "next" }],
17
- "paths": { "@/*": ["./*"] }
18
- },
19
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
20
- "exclude": ["node_modules"]
21
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "esModuleInterop": true,
10
+ "module": "esnext",
11
+ "moduleResolution": "bundler",
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "jsx": "preserve",
15
+ "incremental": true,
16
+ "plugins": [{ "name": "next" }],
17
+ "paths": { "@/*": ["./*"] }
18
+ },
19
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
20
+ "exclude": ["node_modules"]
21
+ }
@@ -1,23 +1,23 @@
1
- # {{PROJECT_NAME}}
2
-
3
- A [Vite](https://vite.dev) + React + TypeScript app using the
4
- [`claudius-chat-widget`](https://www.npmjs.com/package/claudius-chat-widget)
5
- component.
6
-
7
- ```bash
8
- pnpm install
9
- pnpm dev
10
- ```
11
-
12
- The widget lives in `src/App.tsx`:
13
-
14
- ```tsx
15
- import { ChatWidget } from "claudius-chat-widget";
16
- import "claudius-chat-widget/style.css";
17
-
18
- <ChatWidget apiUrl="{{API_URL}}" theme="{{THEME}}" accentColor="{{ACCENT_COLOR}}" />;
19
- ```
20
-
21
- You need a running Claudius worker for the chat to respond. See the
22
- [worker setup guide](https://claudius-docs.pages.dev/deployment/worker/), or
23
- re-run the scaffolder with `--worker` to generate one.
1
+ # {{PROJECT_NAME}}
2
+
3
+ A [Vite](https://vite.dev) + React + TypeScript app using the
4
+ [`claudius-chat-widget`](https://www.npmjs.com/package/claudius-chat-widget)
5
+ component.
6
+
7
+ ```bash
8
+ pnpm install
9
+ pnpm dev
10
+ ```
11
+
12
+ The widget lives in `src/App.tsx`:
13
+
14
+ ```tsx
15
+ import { ChatWidget } from "claudius-chat-widget";
16
+ import "claudius-chat-widget/style.css";
17
+
18
+ <ChatWidget apiUrl="{{API_URL}}" theme="{{THEME}}" accentColor="{{ACCENT_COLOR}}" />;
19
+ ```
20
+
21
+ You need a running Claudius worker for the chat to respond. See the
22
+ [worker setup guide](https://claudius-docs.pages.dev/deployment/worker/), or
23
+ re-run the scaffolder with `--worker` to generate one.
@@ -1,4 +1,4 @@
1
- node_modules
2
- dist
3
- *.local
4
- .DS_Store
1
+ node_modules
2
+ dist
3
+ *.local
4
+ .DS_Store
@@ -1,12 +1,12 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>{{PROJECT_NAME}}</title>
7
- </head>
8
- <body>
9
- <div id="root"></div>
10
- <script type="module" src="/src/main.tsx"></script>
11
- </body>
12
- </html>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>{{PROJECT_NAME}}</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.tsx"></script>
11
+ </body>
12
+ </html>