create-curb.js 1.15.0 → 1.16.0-preview.10

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/README.md CHANGED
@@ -1,14 +1,56 @@
1
- # create-curb.js
1
+ <div align="center">
2
+ <a href="https://curbjs.com"><img alt="Curb" src="https://curbjs.com/og.png?v=2" width="360"></a>
3
+ <h1>create-curb.js</h1>
4
+ <p><strong>The framework for production voice agents.</strong></p>
5
+ <p>Dynamic prompting with full control, in plain code you own. Your coding agent can build, test, and simulate conversations before it ships.</p>
6
+ <a href="https://www.npmjs.com/package/create-curb.js"><img alt="npm version" src="https://img.shields.io/npm/v/create-curb.js.svg?style=for-the-badge&labelColor=000000"></a>
7
+ <a href="https://curbjs.com/docs/installation/"><img alt="Node.js version" src="https://img.shields.io/node/v/create-curb.js.svg?style=for-the-badge&labelColor=000000"></a>
8
+ <a href="https://www.apache.org/licenses/LICENSE-2.0"><img alt="License" src="https://img.shields.io/npm/l/create-curb.js.svg?style=for-the-badge&labelColor=000000"></a>
9
+ </div>
2
10
 
3
- Create a voice agent on KugelAudio:
11
+ `create-curb.js` creates a Curb voice agent in one command. You need Node.js 22.12 or newer.
4
12
 
5
- ```sh
13
+ ```bash
6
14
  npm create curb.js my-agent
7
15
  cd my-agent
8
- npx curb login
9
- npm run dev
16
+ npx curb login # sign in once in the browser
17
+ npm run dev # open http://127.0.0.1:4000
10
18
  ```
11
19
 
12
- `npx curb login` signs you in once in your browser. `npm run dev` gives you a link to talk to your agent.
20
+ `npx curb login` signs you in once in your browser. `npm run dev` gives you a link to talk to your
21
+ agent. Run `npm create curb.js .` to create the project in an empty folder instead.
22
+
23
+ The framework's package is `curb.js`, not `curb`, which is unrelated. The project depends on it
24
+ through an alias, `"curb": "npm:curb.js@<version>"`, so your code imports from `"curb"`.
25
+
26
+ ## Providers
27
+
28
+ The defaults run speech-to-text, the LLM and text-to-speech on KugelAudio with one sign-in. Nothing
29
+ is asked: flags after `--` pick other providers, and their API keys are read from the environment.
30
+
31
+ ```bash
32
+ npm create curb.js my-agent -- --llm anthropic --tts elevenlabs
33
+ ```
34
+
35
+ | Flag | Providers |
36
+ | --- | --- |
37
+ | `--stt` | `kugelaudio`, `azure`, `deepgram`, `elevenlabs`, `openai` |
38
+ | `--llm` | `kugelaudio`, `anthropic`, `openai`, `openai-compatible` |
39
+ | `--tts` | `kugelaudio`, `cartesia`, `elevenlabs`, `openai` |
40
+
41
+ `npm create curb.js -- --help` lists every option.
42
+
43
+ ## Previews
13
44
 
14
45
  To try the newest preview, create the project with `npm create curb.js@preview my-agent`.
46
+
47
+ ## Documentation
48
+
49
+ - [Installation](https://curbjs.com/docs/installation/): create a project and talk to it.
50
+ - [Project structure](https://curbjs.com/docs/project-structure/): what the installer created.
51
+ - [All docs](https://curbjs.com/docs/) on curbjs.com.
52
+
53
+ ## License
54
+
55
+ Licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
56
+ Copyright 2026 KugelAudio GmbH. Built by [KugelAudio](https://kugelaudio.com).
package/RELEASE_NOTES.md CHANGED
@@ -1,17 +1,14 @@
1
1
 
2
2
  ### Added
3
3
 
4
- - Add a preview channel on npm and stable releases a person triggers (#19)
5
- - Add afterCall and afterEvaluation hooks with a hook runner role (#11)
6
- - A transfer decides what happens when the person it reached hangs up (#13)
7
- - Lead AGENTS.md with the browser project and current MCP tool names (#10)
8
- - Add curb info for bug reports (#18)
9
- - Override the LiveKit pipeline from a project (#7)
10
- - Add the curbjs.com website and the full documentation (#2)
11
- - Bring Curb up to date for development in this repository (#1)
4
+ - Make npm the only way to get and update Curb (#36)
12
5
 
13
6
 
14
7
  ### Fixed
15
8
 
16
- - An old SQLite conversation store now stops the server at boot (#12)
9
+ - Refuse unknown arguments to curb upgrade (#39)
10
+ - Explain a target folder that cannot be created (#40)
11
+ - Say what hosted deploys accept today (#46)
12
+ - Correct what the help and guide say about conversations and build (#41)
13
+ - Start curb outside a project from the npm package (#38)
17
14
 
@@ -12,6 +12,7 @@ import {
12
12
  readFileSync,
13
13
  readdirSync,
14
14
  renameSync,
15
+ statSync,
15
16
  writeFileSync,
16
17
  } from "node:fs";
17
18
  import { basename, dirname, join, resolve } from "node:path";
@@ -40,10 +41,9 @@ Options:
40
41
  --stt-model <id> STT model id (provider default otherwise)
41
42
  --tts-model <id> TTS model id (provider default otherwise)
42
43
  --llm-base-url <url> Endpoint for --llm openai-compatible
43
- --framework <spec> Dependency spec for the "curb" package (a version,
44
- file:/path, or tarball URL). Defaults to the local
45
- framework checkout, else the curb.js release that
46
- matches this package.
44
+ --framework <spec> Dependency spec for the "curb" package (a version or
45
+ file:/path). Defaults to the local framework checkout,
46
+ else the curb.js release that matches this package.
47
47
  --skip-install Do not run npm install.
48
48
  --skip-git Do not initialize a git repository.
49
49
  --yes, -y Accepted and ignored (nothing is asked).
@@ -119,6 +119,9 @@ if (!/^[a-z0-9][a-z0-9._-]*$/.test(appName)) {
119
119
  `"${appName}" is not a valid project name — use lowercase letters, digits, ".", "_", "-" (npm package name rules).`,
120
120
  );
121
121
  }
122
+ if (existsSync(targetDir) && !statSync(targetDir).isDirectory()) {
123
+ fail(`${targetDir} is a file. Choose a new directory.`);
124
+ }
122
125
  if (existsSync(targetDir) && readdirSync(targetDir).length > 0) {
123
126
  fail(`${targetDir} already exists and is not empty. Choose a new directory.`);
124
127
  }
@@ -133,6 +136,8 @@ if (!frameworkSpec) {
133
136
  frameworkSpec = repoCheckout ? `file:${localFramework}` : `${CURB_ON_NPM}@${version}`;
134
137
  } else if (/^\d/.test(frameworkSpec)) {
135
138
  frameworkSpec = `${CURB_ON_NPM}@${frameworkSpec}`;
139
+ } else if (/^https?:/i.test(frameworkSpec)) {
140
+ fail(`--framework takes a version or a file: path, not ${frameworkSpec}: Curb is published to npm only.`);
136
141
  }
137
142
 
138
143
  // ------------------------------------------------------------ provider table
@@ -300,8 +305,12 @@ const envValues = finalizeEnv();
300
305
 
301
306
  // -------------------------------------------------------------- copy template
302
307
  const templateDir = resolve(dirname(fileURLToPath(import.meta.url)), "../templates/default");
303
- mkdirSync(targetDir, { recursive: true });
304
- cpSync(templateDir, targetDir, { recursive: true });
308
+ try {
309
+ mkdirSync(targetDir, { recursive: true });
310
+ cpSync(templateDir, targetDir, { recursive: true });
311
+ } catch (error) {
312
+ fail(`Cannot create the project in ${targetDir} (${error.code ?? error.message}). Choose a directory you can write to.`);
313
+ }
305
314
 
306
315
  // npm strips .gitignore from published tarballs, so the template ships it without the
307
316
  // leading dot. The project carries no .npmrc: hosted builds refuse one.
package/package.json CHANGED
@@ -1,12 +1,34 @@
1
1
  {
2
2
  "name": "create-curb.js",
3
- "version": "1.15.0",
4
- "description": "Create a Curb voice agent: npm create curb.js my-agent",
3
+ "version": "1.16.0-preview.10",
4
+ "description": "Create a Curb voice agent with one command. The framework for production voice agents.",
5
+ "keywords": [
6
+ "curb",
7
+ "curb.js",
8
+ "scaffold",
9
+ "starter",
10
+ "template",
11
+ "cli",
12
+ "voice-agent",
13
+ "voice-ai",
14
+ "agent-framework",
15
+ "conversational-ai",
16
+ "react",
17
+ "typescript"
18
+ ],
5
19
  "license": "Apache-2.0",
20
+ "author": {
21
+ "name": "KugelAudio GmbH",
22
+ "url": "https://kugelaudio.com"
23
+ },
6
24
  "homepage": "https://curbjs.com",
7
25
  "repository": {
8
26
  "type": "git",
9
- "url": "git+https://github.com/Kugelaudio/curb.js.git"
27
+ "url": "git+https://github.com/Kugelaudio/curb.js.git",
28
+ "directory": "packages/create-curb.js"
29
+ },
30
+ "bugs": {
31
+ "url": "https://curbjs.com/docs/reporting-a-bug/"
10
32
  },
11
33
  "type": "module",
12
34
  "engines": {
@@ -68,8 +68,8 @@ A fault in Curb itself is reported as `reporting-a-bug.md` says, with the person
68
68
  4. `npm run dev`: the browser preview with chat and voice on http://127.0.0.1:4000. Open it in the person's own browser yourself (`open http://127.0.0.1:4000` on macOS, `xdg-open` on Linux, `start` on Windows): a browser built into an app, like the Claude app's Browser pane, blocks the microphone, so a call there fails.
69
69
 
70
70
  **To improve the agent, read its recent conversations first.** `npx curb conversations`
71
- prints the last ones the preview and `curb say` ran, with every tool call, its
72
- input and its result (`--last <n>`, `--id <id>`, `--json`). Calls to the hosted agent are
71
+ prints the last ones the preview ran, with every tool call, its input and its
72
+ result (`--last <n>`, `--id <id>`, `--json`). Calls to the hosted agent are
73
73
  read with the `kugelaudio` MCP server's `agent_list_calls`, `agent_get_call` and
74
74
  `agent_get_call_timeline` where it is signed in. Find where the agent went wrong, fix that,
75
75
  and turn the conversation into a scenario so it stays fixed.
@@ -90,7 +90,7 @@ src/agent/agent.tsx the agent, where every conversation starts: <Agent l
90
90
  src/agent/<name>/skill.tsx one folder per skill, opened when needed; nested folders are sub-skills
91
91
  context/*.md knowledge a skill reads with <Text src="file.md" />
92
92
  .env other providers' keys, an optional KUGELAUDIO_API_KEY; never commit it
93
- .data/conversations.jsonl every local conversation: tool calls, inputs, results
93
+ .data/conversations.jsonl every preview conversation: tool calls, inputs, results
94
94
  ```
95
95
 
96
96
  ## Rules
@@ -128,12 +128,18 @@ context/*.md knowledge a skill reads with <Text src="file.md" />
128
128
  - **What counts as a successful call is code too**: `defineAgent({ goals, experiments })`
129
129
  names each goal (a tool that must succeed, or a sentence a judge checks) and each A/B test
130
130
  with its weighted variants, and `useVariant("<test>")` reads the call's variant. The
131
- dashboard only shows the results; `authoring.md` ("Goals and A/B experiments") has the rules.
131
+ dashboard only shows the results; `goals-and-experiments.md` has the rules.
132
132
  - Tool names are unique snake_case verbs. Zod `.describe()` texts and error messages are
133
133
  read by the model, so phrase them as the next step.
134
134
 
135
135
  ## Deploy to KugelAudio
136
136
 
137
+ **Hosted deploys do not accept a project that installs Curb from npm yet, and this project
138
+ does.** Tell the user so before you try to deploy, and do not change the `curb` dependency to
139
+ get around it. Today the project runs locally with `npm run dev` and goes live on the user's own
140
+ servers (`node_modules/curb/docs/agent-guide/hosting.md`). The rest of this section applies once
141
+ hosted deploys accept the project.
142
+
137
143
  `.mcp.json` registers two MCP servers for Claude Code started in this folder (it asks once
138
144
  to use them): `kugelaudio`, your KugelAudio account (sign in from `/mcp`), and
139
145
  `kugelaudio-docs`, the docs (no sign-in). Another client adds
@@ -41,6 +41,10 @@ Type or talk in the preview:
41
41
 
42
42
  ## Deploy to KugelAudio
43
43
 
44
+ Hosted deploys do not accept a project that installs Curb from npm yet, and this project does.
45
+ Today it runs locally with `npm run dev` and goes live on your own servers: see
46
+ `node_modules/curb/docs/agent-guide/hosting.md`. Once hosted deploys accept it:
47
+
44
48
  ```bash
45
49
  npx curb login
46
50
  npx curb secrets push
@@ -49,8 +53,7 @@ npx curb deploy
49
53
 
50
54
  `deploy` prints the playground URL where you can call the live agent. Your `.env` is
51
55
  never uploaded; `secrets push` sends its values and prints only their names. Details:
52
- `node_modules/curb/docs/agent-guide/deploying.md`. To run the voice worker on your own LiveKit instead,
53
- see `node_modules/curb/docs/agent-guide/hosting.md`.
56
+ `node_modules/curb/docs/agent-guide/deploying.md`.
54
57
 
55
58
  ## Learn more
56
59