@assistant-ui/mcp-docs-server 0.1.14 → 0.1.15

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.
@@ -34,7 +34,6 @@ It didn't take long for developers to start building with assistant-ui. Here are
34
34
  - [Helicone](https://helicone.ai/) - open-source LLM observability platform
35
35
  - [screenpipe](https://screenpi.pe/) - AI to remember everything you see, say or hear
36
36
  - [myresume.guru](http://myresume.guru) - AI resume optimizer to land your dream job
37
- - [Entelligence](https://entelligence.ai/) - AI mentor for software engineers
38
37
 
39
38
  With 250+ stars on [GitHub](https://github.com/assistant-ui/assistant-ui) and over 1k [npm](https://www.npmjs.com/package/@assistant-ui/react) weekly downloads, we got a vibrant growing community of developers who care about the user experience.
40
39
 
@@ -0,0 +1,396 @@
1
+ ---
2
+ title: CLI
3
+ description: Use the assistant-ui CLI to add components and dependencies to your project.
4
+ ---
5
+
6
+ Use the `assistant-ui` CLI to quickly set up new projects and add components to existing ones.
7
+
8
+ ## init
9
+
10
+ Use the `init` command to initialize configuration and dependencies for a new project.
11
+
12
+ The `init` command installs dependencies, adds components, and configures your project for assistant-ui.
13
+
14
+ ```bash
15
+ npx assistant-ui@latest init
16
+ ```
17
+
18
+ This will:
19
+ - Detect if you have an existing project with a `package.json`
20
+ - Use `shadcn add` to install the assistant-ui quick-start component
21
+ - Add the default assistant-ui components (thread, composer, etc.) to your project
22
+ - Configure TypeScript paths and imports
23
+
24
+ **When to use:**
25
+ - Adding assistant-ui to an **existing** Next.js project
26
+ - First-time setup in a project with `package.json`
27
+
28
+ **Options**
29
+
30
+ ```bash
31
+ Usage: assistant-ui init [options]
32
+
33
+ initialize assistant-ui in a new or existing project
34
+
35
+ Options:
36
+ -c, --cwd <cwd> the working directory. defaults to the current directory.
37
+ -h, --help display help for command
38
+ ```
39
+
40
+ ---
41
+
42
+ ## create
43
+
44
+ Use the `create` command to scaffold a new Next.js project with assistant-ui pre-configured.
45
+
46
+ ```bash
47
+ npx assistant-ui@latest create [project-directory]
48
+ ```
49
+
50
+ This command uses `create-next-app` with assistant-ui starter templates.
51
+
52
+ **Available Templates**
53
+
54
+ | Template | Description | Command |
55
+ |----------|-------------|---------|
56
+ | `default` | Basic setup with Vercel AI SDK | `npx assistant-ui create` |
57
+ | `cloud` | With Assistant Cloud for persistence | `npx assistant-ui create -t cloud` |
58
+ | `langgraph` | LangGraph integration | `npx assistant-ui create -t langgraph` |
59
+ | `mcp` | Model Context Protocol support | `npx assistant-ui create -t mcp` |
60
+
61
+ **Examples**
62
+
63
+ ```bash
64
+ # Create with default template
65
+ npx assistant-ui@latest create my-app
66
+
67
+ # Create with cloud template
68
+ npx assistant-ui@latest create my-app -t cloud
69
+
70
+ # Create with specific package manager
71
+ npx assistant-ui@latest create my-app --use-pnpm
72
+
73
+ # Skip package installation
74
+ npx assistant-ui@latest create my-app --skip-install
75
+ ```
76
+
77
+ **Options**
78
+
79
+ ```bash
80
+ Usage: assistant-ui create [project-directory] [options]
81
+
82
+ create a new project
83
+
84
+ Arguments:
85
+ project-directory name of the project directory
86
+
87
+ Options:
88
+ -t, --template <template> template to use (default, cloud, langgraph, mcp)
89
+ --use-npm explicitly use npm
90
+ --use-pnpm explicitly use pnpm
91
+ --use-yarn explicitly use yarn
92
+ --use-bun explicitly use bun
93
+ --skip-install skip installing packages
94
+ -h, --help display help for command
95
+ ```
96
+
97
+ ---
98
+
99
+ ## add
100
+
101
+ Use the `add` command to add individual components to your project.
102
+
103
+ ```bash
104
+ npx assistant-ui@latest add [component]
105
+ ```
106
+
107
+ The `add` command fetches components from the assistant-ui registry and adds them to your project. It automatically:
108
+ - Installs required dependencies
109
+ - Adds TypeScript types
110
+ - Configures imports
111
+
112
+ **Popular Components**
113
+
114
+ ```bash
115
+ # Add the basic thread component
116
+ npx assistant-ui add thread
117
+
118
+ # Add thread list for multi-conversation support
119
+ npx assistant-ui add thread-list
120
+
121
+ # Add assistant modal
122
+ npx assistant-ui add assistant-modal
123
+
124
+ # Add multiple components at once
125
+ npx assistant-ui add thread thread-list assistant-sidebar
126
+ ```
127
+
128
+ **Options**
129
+
130
+ ```bash
131
+ Usage: assistant-ui add [options] <components...>
132
+
133
+ add a component to your project
134
+
135
+ Arguments:
136
+ components the components to add
137
+
138
+ Options:
139
+ -y, --yes skip confirmation prompt. (default: true)
140
+ -o, --overwrite overwrite existing files. (default: false)
141
+ -c, --cwd <cwd> the working directory. defaults to the current directory.
142
+ -p, --path <path> the path to add the component to.
143
+ -h, --help display help for command
144
+ ```
145
+
146
+ ---
147
+
148
+ ## update
149
+
150
+ Use the `update` command to update all `@assistant-ui/*` packages to their latest versions.
151
+
152
+ ```bash
153
+ npx assistant-ui@latest update
154
+ ```
155
+
156
+ This command:
157
+ - Scans your `package.json` for assistant-ui packages
158
+ - Updates them to the latest versions using your package manager
159
+ - Preserves other dependencies
160
+
161
+ **Examples**
162
+
163
+ ```bash
164
+ # Update all assistant-ui packages
165
+ npx assistant-ui update
166
+
167
+ # Dry run to see what would be updated
168
+ npx assistant-ui update --dry
169
+ ```
170
+
171
+ **Options**
172
+
173
+ ```bash
174
+ Usage: assistant-ui update [options]
175
+
176
+ update all '@assistant-ui/*' packages to latest versions
177
+
178
+ Options:
179
+ --dry print the command instead of running it
180
+ -c, --cwd <cwd> the working directory. defaults to the current directory.
181
+ -h, --help display help for command
182
+ ```
183
+
184
+ ---
185
+
186
+ ## upgrade
187
+
188
+ Use the `upgrade` command to automatically migrate your codebase when there are breaking changes.
189
+
190
+ ```bash
191
+ npx assistant-ui@latest upgrade
192
+ ```
193
+
194
+ This command:
195
+ - Runs codemods to transform your code
196
+ - Updates import paths and API usage
197
+ - Detects required dependency changes
198
+ - Prompts to install new packages
199
+
200
+ **What it does:**
201
+ - Applies all available codemods sequentially
202
+ - Shows progress bar with file count
203
+ - Reports any transformation errors
204
+ - Automatically detects and offers to install new dependencies
205
+
206
+ **Example output:**
207
+
208
+ ```bash
209
+ Starting upgrade...
210
+ Found 24 files to process.
211
+ Progress |████████████████████| 100% | ETA: 0s || Running v0-11/content-part-to-message-part...
212
+ Checking for package dependencies...
213
+ ✅ Upgrade complete!
214
+ ```
215
+
216
+ **Options**
217
+
218
+ ```bash
219
+ Usage: assistant-ui upgrade [options]
220
+
221
+ upgrade and apply codemods for breaking changes
222
+
223
+ Options:
224
+ -d, --dry dry run (no changes are made to files)
225
+ -p, --print print transformed files to stdout
226
+ --verbose show more information about the transform process
227
+ -j, --jscodeshift <options> pass options directly to jscodeshift
228
+ -h, --help display help for command
229
+ ```
230
+
231
+ ---
232
+
233
+ ## codemod
234
+
235
+ Use the `codemod` command to run a specific codemod transformation.
236
+
237
+ ```bash
238
+ npx assistant-ui@latest codemod <codemod> <source>
239
+ ```
240
+
241
+ This is useful when you want to run a specific migration rather than all available upgrades.
242
+
243
+ **Examples**
244
+
245
+ ```bash
246
+ # Run specific codemod on a directory
247
+ npx assistant-ui codemod v0-11/content-part-to-message-part ./src
248
+
249
+ # Run with dry run to preview changes
250
+ npx assistant-ui codemod v0-11/content-part-to-message-part ./src --dry
251
+
252
+ # Print transformed output
253
+ npx assistant-ui codemod v0-11/content-part-to-message-part ./src --print
254
+ ```
255
+
256
+ **Options**
257
+
258
+ ```bash
259
+ Usage: assistant-ui codemod [options] <codemod> <source>
260
+
261
+ run a specific codemod transformation
262
+
263
+ Arguments:
264
+ codemod codemod to run
265
+ source path to source files or directory to transform
266
+
267
+ Options:
268
+ -d, --dry dry run (no changes are made to files)
269
+ -p, --print print transformed files to stdout
270
+ --verbose show more information about the transform process
271
+ -j, --jscodeshift <options> pass options directly to jscodeshift
272
+ -h, --help display help for command
273
+ ```
274
+
275
+ ---
276
+
277
+ ## Common Workflows
278
+
279
+ ### Starting a new project
280
+
281
+ ```bash
282
+ # Create a new project with the default template
283
+ npx assistant-ui@latest create my-chatbot
284
+
285
+ # Navigate into the directory
286
+ cd my-chatbot
287
+
288
+ # Start development
289
+ npm run dev
290
+ ```
291
+
292
+ ### Adding to existing project
293
+
294
+ ```bash
295
+ # Initialize assistant-ui
296
+ npx assistant-ui@latest init
297
+
298
+ # Add additional components
299
+ npx assistant-ui@latest add thread-list assistant-modal
300
+
301
+ # Start development
302
+ npm run dev
303
+ ```
304
+
305
+ ### Keeping up to date
306
+
307
+ ```bash
308
+ # Check for updates (dry run)
309
+ npx assistant-ui@latest update --dry
310
+
311
+ # Update all packages
312
+ npx assistant-ui@latest update
313
+
314
+ # Run upgrade codemods if needed
315
+ npx assistant-ui@latest upgrade
316
+ ```
317
+
318
+ ### Migrating versions
319
+
320
+ ```bash
321
+ # Run automated migration
322
+ npx assistant-ui@latest upgrade
323
+
324
+ # Or run specific codemod
325
+ npx assistant-ui@latest codemod v0-11/content-part-to-message-part ./src
326
+
327
+ # Update packages after migration
328
+ npx assistant-ui@latest update
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Component Registry
334
+
335
+ The CLI pulls components from our public registry at [r.assistant-ui.com](https://r.assistant-ui.com).
336
+
337
+ Each component includes:
338
+ - Full TypeScript source code
339
+ - All required dependencies
340
+ - Tailwind CSS configuration
341
+ - Usage examples
342
+
343
+ Components are added directly to your project's source code, giving you full control to customize them.
344
+
345
+ ---
346
+
347
+ ## Troubleshooting
348
+
349
+ ### Command not found
350
+
351
+ If you get a "command not found" error, make sure you're using `npx`:
352
+
353
+ ```bash
354
+ npx assistant-ui@latest init
355
+ ```
356
+
357
+ ### Permission errors
358
+
359
+ On Linux/macOS, if you encounter permission errors:
360
+
361
+ ```bash
362
+ sudo npx assistant-ui@latest init
363
+ ```
364
+
365
+ Or fix npm permissions: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
366
+
367
+ ### Conflicting dependencies
368
+
369
+ If you see dependency conflicts:
370
+
371
+ ```bash
372
+ # Try with --force flag
373
+ npm install --force
374
+
375
+ # Or use legacy peer deps
376
+ npm install --legacy-peer-deps
377
+ ```
378
+
379
+ ### Component already exists
380
+
381
+ Use the `--overwrite` flag to replace existing components:
382
+
383
+ ```bash
384
+ npx assistant-ui@latest add thread --overwrite
385
+ ```
386
+
387
+ ---
388
+
389
+ ## Configuration
390
+
391
+ The CLI respects your project's configuration:
392
+
393
+ - **Package Manager**: Automatically detects npm, pnpm, yarn, or bun
394
+ - **TypeScript**: Works with your `tsconfig.json` paths
395
+ - **Tailwind**: Uses your `tailwind.config.js` settings
396
+ - **Import Aliases**: Respects `components.json` or `assistant-ui.json` configuration
@@ -437,25 +437,23 @@ const MessageError: FC = () => {
437
437
 
438
438
  const AssistantMessage: FC = () => {
439
439
  return (
440
- <MessagePrimitive.Root asChild>
441
- <div
442
- className="aui-assistant-message-root"
443
- data-role="assistant"
444
- >
445
- <div className="aui-assistant-message-content">
446
- <MessagePrimitive.Parts
447
- components={{
448
- Text: MarkdownText,
449
- tools: { Fallback: ToolFallback },
450
- }}
451
- />
452
- <MessageError />
453
- </div>
440
+ <MessagePrimitive.Root
441
+ className="aui-assistant-message-root"
442
+ data-role="assistant"
443
+ >
444
+ <div className="aui-assistant-message-content">
445
+ <MessagePrimitive.Parts
446
+ components={{
447
+ Text: MarkdownText,
448
+ tools: { Fallback: ToolFallback },
449
+ }}
450
+ />
451
+ <MessageError />
452
+ </div>
454
453
 
455
- <div className="aui-assistant-message-footer">
456
- <BranchPicker />
457
- <AssistantActionBar />
458
- </div>
454
+ <div className="aui-assistant-message-footer">
455
+ <BranchPicker />
456
+ <AssistantActionBar />
459
457
  </div>
460
458
  </MessagePrimitive.Root>
461
459
  );
@@ -490,24 +488,22 @@ const AssistantActionBar: FC = () => {
490
488
 
491
489
  const UserMessage: FC = () => {
492
490
  return (
493
- <MessagePrimitive.Root asChild>
494
- <div
495
- className="aui-user-message-root"
496
- data-role="user"
497
- >
498
- <UserMessageAttachments />
491
+ <MessagePrimitive.Root
492
+ className="aui-user-message-root"
493
+ data-role="user"
494
+ >
495
+ <UserMessageAttachments />
499
496
 
500
- <div className="aui-user-message-content-wrapper">
501
- <div className="aui-user-message-content">
502
- <MessagePrimitive.Parts />
503
- </div>
504
- <div className="aui-user-action-bar-wrapper">
505
- <UserActionBar />
506
- </div>
497
+ <div className="aui-user-message-content-wrapper">
498
+ <div className="aui-user-message-content">
499
+ <MessagePrimitive.Parts />
500
+ </div>
501
+ <div className="aui-user-action-bar-wrapper">
502
+ <UserActionBar />
507
503
  </div>
508
-
509
- <BranchPicker className="aui-user-branch-picker" />
510
504
  </div>
505
+
506
+ <BranchPicker className="aui-user-branch-picker" />
511
507
  </MessagePrimitive.Root>
512
508
  );
513
509
  };
@@ -864,8 +860,6 @@ export const ToolFallback: ToolCallMessagePartComponent = ({
864
860
  };
865
861
  ```
866
862
 
867
- ```
868
-
869
863
  ```tsx title="components/assistant-ui/thread-list.tsx"
870
864
  import type { FC } from "react";
871
865
  import {
@@ -1186,7 +1180,7 @@ npm install ai @assistant-ui/react-ai-sdk @ai-sdk/cohere
1186
1180
  ```
1187
1181
 
1188
1182
  ```sh title="Terminal" tab="Ollama"
1189
- npm install ai @assistant-ui/react-ai-sdk ollama-ai-provider
1183
+ npm install ai @assistant-ui/react-ai-sdk ollama-ai-provider-v2
1190
1184
  ```
1191
1185
 
1192
1186
  ```sh title="Terminal" tab="Chrome AI"
@@ -1353,7 +1347,7 @@ export async function POST(req: Request) {
1353
1347
  ```
1354
1348
 
1355
1349
  ```ts title="/app/api/chat/route.ts" tab="Ollama"
1356
- import { ollama } from "ollama-ai-provider";
1350
+ import { ollama } from "ollama-ai-provider-v2";
1357
1351
  import { convertToModelMessages, streamText } from "ai";
1358
1352
 
1359
1353
  export const maxDuration = 30;