chatbase 0.0.1 → 0.1.1

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.
Files changed (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1651 -6
  3. package/bin/run.js +4 -0
  4. package/dist/base/agent-command.js +40 -0
  5. package/dist/base/agent-ref.js +16 -0
  6. package/dist/base/assert-file.js +21 -0
  7. package/dist/base/base-command.js +203 -0
  8. package/dist/base/body-input.js +77 -0
  9. package/dist/base/list-command.js +16 -0
  10. package/dist/base/sources.js +33 -0
  11. package/dist/client/chat-helpers.js +173 -0
  12. package/dist/client/client.js +175 -0
  13. package/dist/client/files.js +64 -0
  14. package/dist/client/paginate.js +40 -0
  15. package/dist/client/pairing.js +75 -0
  16. package/dist/client/retry.js +40 -0
  17. package/dist/client/signals.js +43 -0
  18. package/dist/client/stream.js +79 -0
  19. package/dist/commands/agents/auto-retrain.js +46 -0
  20. package/dist/commands/agents/clone.js +28 -0
  21. package/dist/commands/agents/create.js +43 -0
  22. package/dist/commands/agents/delete.js +41 -0
  23. package/dist/commands/agents/get.js +52 -0
  24. package/dist/commands/agents/list.js +48 -0
  25. package/dist/commands/agents/styles.js +44 -0
  26. package/dist/commands/agents/train.js +31 -0
  27. package/dist/commands/agents/update.js +47 -0
  28. package/dist/commands/api.js +69 -0
  29. package/dist/commands/auth/login.js +128 -0
  30. package/dist/commands/auth/logout.js +40 -0
  31. package/dist/commands/auth/status.js +88 -0
  32. package/dist/commands/chat/index.js +210 -0
  33. package/dist/commands/chat/retry.js +49 -0
  34. package/dist/commands/config/get.js +40 -0
  35. package/dist/commands/config/list.js +34 -0
  36. package/dist/commands/config/set.js +106 -0
  37. package/dist/commands/conversations/export.js +75 -0
  38. package/dist/commands/conversations/get.js +69 -0
  39. package/dist/commands/conversations/list.js +75 -0
  40. package/dist/commands/conversations/tool-result.js +74 -0
  41. package/dist/commands/health.js +22 -0
  42. package/dist/commands/helpdesk/statuses.js +31 -0
  43. package/dist/commands/helpdesk/teams.js +25 -0
  44. package/dist/commands/messages/feedback.js +64 -0
  45. package/dist/commands/messages/list.js +55 -0
  46. package/dist/commands/sources/create.js +134 -0
  47. package/dist/commands/sources/delete.js +28 -0
  48. package/dist/commands/sources/get.js +35 -0
  49. package/dist/commands/sources/list.js +47 -0
  50. package/dist/commands/sources/restore.js +22 -0
  51. package/dist/commands/sources/summary.js +33 -0
  52. package/dist/commands/sources/update.js +76 -0
  53. package/dist/commands/tickets/create.js +58 -0
  54. package/dist/commands/tickets/get.js +44 -0
  55. package/dist/commands/tickets/list.js +96 -0
  56. package/dist/commands/tickets/messages.js +87 -0
  57. package/dist/commands/tickets/reply.js +66 -0
  58. package/dist/commands/tickets/search.js +53 -0
  59. package/dist/commands/tickets/update.js +38 -0
  60. package/dist/commands/whatsapp/send-template.js +94 -0
  61. package/dist/commands/whatsapp/templates.js +55 -0
  62. package/dist/config/paths.js +22 -0
  63. package/dist/config/resolve.js +37 -0
  64. package/dist/config/store.js +38 -0
  65. package/dist/errors/errors.js +81 -0
  66. package/dist/hooks/chat-message-hint.js +21 -0
  67. package/dist/output/color.js +30 -0
  68. package/dist/output/mode.js +7 -0
  69. package/dist/output/render.js +0 -0
  70. package/dist/output/spinner.js +37 -0
  71. package/dist/repl/chat-repl.js +129 -0
  72. package/dist/version.js +3 -0
  73. package/oclif.manifest.json +4264 -0
  74. package/package.json +96 -4
  75. package/spec/openapi.json +11880 -0
package/README.md CHANGED
@@ -1,11 +1,1656 @@
1
1
  # chatbase
2
2
 
3
- The official command-line interface for [Chatbase](https://www.chatbase.co) — under active development.
3
+ The official CLI for the [Chatbase API v2](https://www.chatbase.co/docs/api-v2/overview).
4
4
 
5
- This package name is reserved by Chatbase. The CLI will ship here soon:
5
+ ## Install
6
6
 
7
- - Full access to the [Chatbase API v2](https://www.chatbase.co/docs/api-v2/overview) from your terminal
8
- - Interactive agent chat, knowledge-source syncing, CI-friendly JSON output
9
- - MCP server mode for Claude and other AI assistants
7
+ ```sh
8
+ npm install -g chatbase # or: npx chatbase <command>
9
+ ```
10
10
 
11
- Until then, see the [API documentation](https://www.chatbase.co/docs/api-v2/overview).
11
+ Requires Node 20+.
12
+
13
+ ### Uninstall
14
+
15
+ ```sh
16
+ npm uninstall -g chatbase
17
+ rm -rf ~/.config/chatbase ~/.local/state/chatbase ~/.cache/chatbase
18
+ rm -rf ~/Library/Caches/chatbase # macOS: update-check cache
19
+ ```
20
+
21
+ ## Authenticate
22
+
23
+ ```sh
24
+ chatbase auth login # interactive (paste your API key)
25
+ chatbase auth login --with-token < key.txt
26
+ export CHATBASE_API_KEY=... # CI
27
+ ```
28
+
29
+ Keys live in chatbase.co → Workspace Settings → API Keys (Standard plan or higher).
30
+
31
+ ## Privacy
32
+
33
+ The CLI sends no telemetry. Requests carry a `chatbase-cli/<version>` User-Agent so
34
+ Chatbase can distinguish CLI traffic server-side. The only network calls are the API
35
+ calls you invoke.
36
+
37
+ <!-- commands -->
38
+ * [`chatbase agents auto-retrain [AGENTID]`](#chatbase-agents-auto-retrain-agentid)
39
+ * [`chatbase agents clone AGENTID`](#chatbase-agents-clone-agentid)
40
+ * [`chatbase agents create`](#chatbase-agents-create)
41
+ * [`chatbase agents delete AGENTID`](#chatbase-agents-delete-agentid)
42
+ * [`chatbase agents get [AGENTID]`](#chatbase-agents-get-agentid)
43
+ * [`chatbase agents list`](#chatbase-agents-list)
44
+ * [`chatbase agents styles [AGENTID]`](#chatbase-agents-styles-agentid)
45
+ * [`chatbase agents train [AGENTID]`](#chatbase-agents-train-agentid)
46
+ * [`chatbase agents update [AGENTID]`](#chatbase-agents-update-agentid)
47
+ * [`chatbase api METHOD PATH`](#chatbase-api-method-path)
48
+ * [`chatbase auth login`](#chatbase-auth-login)
49
+ * [`chatbase auth logout`](#chatbase-auth-logout)
50
+ * [`chatbase auth status`](#chatbase-auth-status)
51
+ * [`chatbase chat`](#chatbase-chat)
52
+ * [`chatbase chat retry`](#chatbase-chat-retry)
53
+ * [`chatbase config get KEY`](#chatbase-config-get-key)
54
+ * [`chatbase config list`](#chatbase-config-list)
55
+ * [`chatbase config set KEY [VALUE]`](#chatbase-config-set-key-value)
56
+ * [`chatbase conversations export`](#chatbase-conversations-export)
57
+ * [`chatbase conversations get [CONVERSATIONID]`](#chatbase-conversations-get-conversationid)
58
+ * [`chatbase conversations list`](#chatbase-conversations-list)
59
+ * [`chatbase conversations tool-result [CONVERSATIONID]`](#chatbase-conversations-tool-result-conversationid)
60
+ * [`chatbase health`](#chatbase-health)
61
+ * [`chatbase help [COMMAND]`](#chatbase-help-command)
62
+ * [`chatbase helpdesk statuses`](#chatbase-helpdesk-statuses)
63
+ * [`chatbase helpdesk teams`](#chatbase-helpdesk-teams)
64
+ * [`chatbase messages feedback [MESSAGEID]`](#chatbase-messages-feedback-messageid)
65
+ * [`chatbase messages list`](#chatbase-messages-list)
66
+ * [`chatbase sources create`](#chatbase-sources-create)
67
+ * [`chatbase sources delete SOURCEID`](#chatbase-sources-delete-sourceid)
68
+ * [`chatbase sources get SOURCEID`](#chatbase-sources-get-sourceid)
69
+ * [`chatbase sources list`](#chatbase-sources-list)
70
+ * [`chatbase sources restore SOURCEID`](#chatbase-sources-restore-sourceid)
71
+ * [`chatbase sources summary`](#chatbase-sources-summary)
72
+ * [`chatbase sources update SOURCEID`](#chatbase-sources-update-sourceid)
73
+ * [`chatbase tickets create`](#chatbase-tickets-create)
74
+ * [`chatbase tickets get TICKETNUMBER`](#chatbase-tickets-get-ticketnumber)
75
+ * [`chatbase tickets list`](#chatbase-tickets-list)
76
+ * [`chatbase tickets messages [TICKETNUMBER]`](#chatbase-tickets-messages-ticketnumber)
77
+ * [`chatbase tickets reply [TICKETNUMBER]`](#chatbase-tickets-reply-ticketnumber)
78
+ * [`chatbase tickets search QUERY`](#chatbase-tickets-search-query)
79
+ * [`chatbase tickets update TICKETNUMBER`](#chatbase-tickets-update-ticketnumber)
80
+ * [`chatbase whatsapp send-template TEMPLATE`](#chatbase-whatsapp-send-template-template)
81
+ * [`chatbase whatsapp templates`](#chatbase-whatsapp-templates)
82
+
83
+ ## `chatbase agents auto-retrain [AGENTID]`
84
+
85
+ Enable or disable automatic retraining for an agent
86
+
87
+ ```
88
+ USAGE
89
+ $ chatbase agents auto-retrain [AGENTID] [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
90
+ <value> | -a <value>] [--enabled] [--disabled]
91
+
92
+ ARGUMENTS
93
+ [AGENTID] Agent ID
94
+
95
+ FLAGS
96
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
97
+ -q, --quiet Suppress non-essential output
98
+ --agent-name=<value> Agent display name (looked up to an ID)
99
+ --disabled Disable automatic retraining
100
+ --enabled Enable automatic retraining
101
+ --no-color Disable colored output
102
+ --no-input Never prompt; fail instead
103
+ --verbose Verbose diagnostics
104
+
105
+ OUTPUT FLAGS
106
+ --json Output raw API JSON
107
+ --plain Tab-separated output for scripts
108
+
109
+ DESCRIPTION
110
+ Enable or disable automatic retraining for an agent
111
+
112
+ EXAMPLES
113
+ $ chatbase agents auto-retrain agt_123 --enabled
114
+
115
+ $ chatbase agents auto-retrain --enabled
116
+ ```
117
+
118
+ _See code: [src/commands/agents/auto-retrain.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/agents/auto-retrain.ts)_
119
+
120
+ ## `chatbase agents clone AGENTID`
121
+
122
+ Clone an agent, including all its sources (excluding Notion)
123
+
124
+ ```
125
+ USAGE
126
+ $ chatbase agents clone AGENTID [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
127
+
128
+ ARGUMENTS
129
+ AGENTID Agent ID to clone
130
+
131
+ FLAGS
132
+ -q, --quiet Suppress non-essential output
133
+ --no-color Disable colored output
134
+ --no-input Never prompt; fail instead
135
+ --verbose Verbose diagnostics
136
+
137
+ OUTPUT FLAGS
138
+ --json Output raw API JSON
139
+ --plain Tab-separated output for scripts
140
+
141
+ DESCRIPTION
142
+ Clone an agent, including all its sources (excluding Notion)
143
+
144
+ EXAMPLES
145
+ $ chatbase agents clone agt_123
146
+ ```
147
+
148
+ _See code: [src/commands/agents/clone.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/agents/clone.ts)_
149
+
150
+ ## `chatbase agents create`
151
+
152
+ Create a new agent
153
+
154
+ ```
155
+ USAGE
156
+ $ chatbase agents create [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [-f <value>...] [--name
157
+ <value>] [--instructions <value>] [--model <value>] [--data <value>]
158
+
159
+ FLAGS
160
+ -f, --field=<value>... Set a body field: -f key=value (repeatable)
161
+ -q, --quiet Suppress non-essential output
162
+ --data=<value> JSON body (@file, @-, or inline). Fields: name, instructions, model, visibility, temp
163
+ --instructions=<value> System instructions
164
+ --model=<value> Model ID
165
+ --name=<value> Agent name
166
+ --no-color Disable colored output
167
+ --no-input Never prompt; fail instead
168
+ --verbose Verbose diagnostics
169
+
170
+ OUTPUT FLAGS
171
+ --json Output raw API JSON
172
+ --plain Tab-separated output for scripts
173
+
174
+ DESCRIPTION
175
+ Create a new agent
176
+
177
+ EXAMPLES
178
+ $ chatbase agents create --name "Support Bot" --instructions "Be helpful"
179
+
180
+ $ chatbase agents create --data @agent.json
181
+ ```
182
+
183
+ _See code: [src/commands/agents/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/agents/create.ts)_
184
+
185
+ ## `chatbase agents delete AGENTID`
186
+
187
+ Permanently delete an agent (cannot be undone)
188
+
189
+ ```
190
+ USAGE
191
+ $ chatbase agents delete AGENTID [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--confirm <value>]
192
+
193
+ ARGUMENTS
194
+ AGENTID Agent ID
195
+
196
+ FLAGS
197
+ -q, --quiet Suppress non-essential output
198
+ --confirm=<value> Confirm by repeating the agent ID (required in scripts and CI)
199
+ --no-color Disable colored output
200
+ --no-input Never prompt; fail instead
201
+ --verbose Verbose diagnostics
202
+
203
+ OUTPUT FLAGS
204
+ --json Output raw API JSON
205
+ --plain Tab-separated output for scripts
206
+
207
+ DESCRIPTION
208
+ Permanently delete an agent (cannot be undone)
209
+
210
+ EXAMPLES
211
+ $ chatbase agents delete agt_123 --confirm agt_123
212
+ ```
213
+
214
+ _See code: [src/commands/agents/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/agents/delete.ts)_
215
+
216
+ ## `chatbase agents get [AGENTID]`
217
+
218
+ Show one agent
219
+
220
+ ```
221
+ USAGE
222
+ $ chatbase agents get [AGENTID] [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
223
+ <value> | -a <value>]
224
+
225
+ ARGUMENTS
226
+ [AGENTID] Agent ID
227
+
228
+ FLAGS
229
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
230
+ -q, --quiet Suppress non-essential output
231
+ --agent-name=<value> Agent display name (looked up to an ID)
232
+ --no-color Disable colored output
233
+ --no-input Never prompt; fail instead
234
+ --verbose Verbose diagnostics
235
+
236
+ OUTPUT FLAGS
237
+ --json Output raw API JSON
238
+ --plain Tab-separated output for scripts
239
+
240
+ DESCRIPTION
241
+ Show one agent
242
+
243
+ EXAMPLES
244
+ $ chatbase agents get agt_123
245
+
246
+ $ chatbase agents get
247
+ ```
248
+
249
+ _See code: [src/commands/agents/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/agents/get.ts)_
250
+
251
+ ## `chatbase agents list`
252
+
253
+ List all agents in the workspace
254
+
255
+ ```
256
+ USAGE
257
+ $ chatbase agents list [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--limit <value>]
258
+ [--cursor <value>] [--all]
259
+
260
+ FLAGS
261
+ -q, --quiet Suppress non-essential output
262
+ --all Fetch every page
263
+ --cursor=<value> Pagination cursor from a previous page
264
+ --limit=<value> Maximum items per page
265
+ --no-color Disable colored output
266
+ --no-input Never prompt; fail instead
267
+ --verbose Verbose diagnostics
268
+
269
+ OUTPUT FLAGS
270
+ --json Output raw API JSON
271
+ --plain Tab-separated output for scripts
272
+
273
+ DESCRIPTION
274
+ List all agents in the workspace
275
+
276
+ EXAMPLES
277
+ $ chatbase agents list
278
+
279
+ $ chatbase agents list --json
280
+ ```
281
+
282
+ _See code: [src/commands/agents/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/agents/list.ts)_
283
+
284
+ ## `chatbase agents styles [AGENTID]`
285
+
286
+ Update visual styles for an agent
287
+
288
+ ```
289
+ USAGE
290
+ $ chatbase agents styles [AGENTID] --data <value> [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
291
+ [--agent-name <value> | -a <value>] [-f <value>...]
292
+
293
+ ARGUMENTS
294
+ [AGENTID] Agent ID
295
+
296
+ FLAGS
297
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
298
+ -f, --field=<value>... Set a body field: -f key=value (repeatable)
299
+ -q, --quiet Suppress non-essential output
300
+ --agent-name=<value> Agent display name (looked up to an ID)
301
+ --data=<value> (required) JSON body (@file, @-, or inline). See API docs for style properties
302
+ --no-color Disable colored output
303
+ --no-input Never prompt; fail instead
304
+ --verbose Verbose diagnostics
305
+
306
+ OUTPUT FLAGS
307
+ --json Output raw API JSON
308
+ --plain Tab-separated output for scripts
309
+
310
+ DESCRIPTION
311
+ Update visual styles for an agent
312
+
313
+ EXAMPLES
314
+ $ chatbase agents styles agt_123 --data '{"chat":{"theme":"dark"}}'
315
+
316
+ $ chatbase agents styles --data @styles.json
317
+ ```
318
+
319
+ _See code: [src/commands/agents/styles.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/agents/styles.ts)_
320
+
321
+ ## `chatbase agents train [AGENTID]`
322
+
323
+ Queue a training job for an agent
324
+
325
+ ```
326
+ USAGE
327
+ $ chatbase agents train [AGENTID] [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
328
+ <value> | -a <value>]
329
+
330
+ ARGUMENTS
331
+ [AGENTID] Agent ID to train (defaults to the configured agent, like other commands)
332
+
333
+ FLAGS
334
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
335
+ -q, --quiet Suppress non-essential output
336
+ --agent-name=<value> Agent display name (looked up to an ID)
337
+ --no-color Disable colored output
338
+ --no-input Never prompt; fail instead
339
+ --verbose Verbose diagnostics
340
+
341
+ OUTPUT FLAGS
342
+ --json Output raw API JSON
343
+ --plain Tab-separated output for scripts
344
+
345
+ DESCRIPTION
346
+ Queue a training job for an agent
347
+
348
+ EXAMPLES
349
+ $ chatbase agents train agt_123
350
+
351
+ $ chatbase agents train
352
+ ```
353
+
354
+ _See code: [src/commands/agents/train.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/agents/train.ts)_
355
+
356
+ ## `chatbase agents update [AGENTID]`
357
+
358
+ Update an existing agent
359
+
360
+ ```
361
+ USAGE
362
+ $ chatbase agents update [AGENTID] [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
363
+ <value> | -a <value>] [-f <value>...] [--name <value>] [--instructions <value>] [--model <value>] [--data <value>]
364
+
365
+ ARGUMENTS
366
+ [AGENTID] Agent ID
367
+
368
+ FLAGS
369
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
370
+ -f, --field=<value>... Set a body field: -f key=value (repeatable)
371
+ -q, --quiet Suppress non-essential output
372
+ --agent-name=<value> Agent display name (looked up to an ID)
373
+ --data=<value> JSON body (@file, @-, or inline). Fields: name, instructions, model, visibility, temp
374
+ --instructions=<value> System instructions
375
+ --model=<value> Model ID
376
+ --name=<value> Agent name
377
+ --no-color Disable colored output
378
+ --no-input Never prompt; fail instead
379
+ --verbose Verbose diagnostics
380
+
381
+ OUTPUT FLAGS
382
+ --json Output raw API JSON
383
+ --plain Tab-separated output for scripts
384
+
385
+ DESCRIPTION
386
+ Update an existing agent
387
+
388
+ EXAMPLES
389
+ $ chatbase agents update agt_123 --name "New Name"
390
+
391
+ $ chatbase agents update --name "New Name"
392
+
393
+ $ chatbase agents update agt_123 --data @agent.json
394
+ ```
395
+
396
+ _See code: [src/commands/agents/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/agents/update.ts)_
397
+
398
+ ## `chatbase api METHOD PATH`
399
+
400
+ Call the Chatbase API directly — an escape hatch for endpoints without a dedicated command
401
+
402
+ ```
403
+ USAGE
404
+ $ chatbase api METHOD PATH [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [-f
405
+ <value>...] [--query <value>...] [--body <value>]
406
+
407
+ ARGUMENTS
408
+ METHOD (GET|POST|PUT|PATCH|DELETE) HTTP method
409
+ PATH API path relative to /api/v2, e.g. /agents
410
+
411
+ FLAGS
412
+ -f, --field=<value>... Set a body field: -f key=value (repeatable)
413
+ -q, --quiet Suppress non-essential output
414
+ --body=<value> JSON request body (@file, @-, or inline JSON)
415
+ --no-color Disable colored output
416
+ --no-input Never prompt; fail instead
417
+ --query=<value>... Query param k=v (repeatable)
418
+ --verbose Verbose diagnostics
419
+
420
+ OUTPUT FLAGS
421
+ --json Output raw API JSON
422
+ --plain Tab-separated output for scripts
423
+
424
+ DESCRIPTION
425
+ Call the Chatbase API directly — an escape hatch for endpoints without a dedicated command
426
+
427
+ EXAMPLES
428
+ $ chatbase api GET /agents
429
+
430
+ $ chatbase api GET /agents --field limit=5
431
+
432
+ $ chatbase api POST /agents --body '{"name":"Support Bot"}'
433
+
434
+ $ chatbase api PATCH /agents/agt_123 --body @patch.json
435
+ ```
436
+
437
+ _See code: [src/commands/api.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/api.ts)_
438
+
439
+ ## `chatbase auth login`
440
+
441
+ Authenticate with Chatbase — paste an API key or log in via browser
442
+
443
+ ```
444
+ USAGE
445
+ $ chatbase auth login [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--with-token] [--browser]
446
+
447
+ FLAGS
448
+ -q, --quiet Suppress non-essential output
449
+ --browser Log in via browser — approve a code at chatbase.co/activate
450
+ --no-color Disable colored output
451
+ --no-input Never prompt; fail instead
452
+ --verbose Verbose diagnostics
453
+ --with-token Read the API key from stdin
454
+
455
+ OUTPUT FLAGS
456
+ --json Output raw API JSON
457
+ --plain Tab-separated output for scripts
458
+
459
+ DESCRIPTION
460
+ Authenticate with Chatbase — paste an API key or log in via browser
461
+
462
+ EXAMPLES
463
+ $ chatbase auth login
464
+
465
+ $ chatbase auth login --browser
466
+
467
+ cat key.txt | chatbase auth login --with-token
468
+ ```
469
+
470
+ _See code: [src/commands/auth/login.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/auth/login.ts)_
471
+
472
+ ## `chatbase auth logout`
473
+
474
+ Remove the stored API key (revokes CLI-paired keys server-side)
475
+
476
+ ```
477
+ USAGE
478
+ $ chatbase auth logout [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
479
+
480
+ FLAGS
481
+ -q, --quiet Suppress non-essential output
482
+ --no-color Disable colored output
483
+ --no-input Never prompt; fail instead
484
+ --verbose Verbose diagnostics
485
+
486
+ OUTPUT FLAGS
487
+ --json Output raw API JSON
488
+ --plain Tab-separated output for scripts
489
+
490
+ DESCRIPTION
491
+ Remove the stored API key (revokes CLI-paired keys server-side)
492
+
493
+ EXAMPLES
494
+ $ chatbase auth logout
495
+ ```
496
+
497
+ _See code: [src/commands/auth/logout.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/auth/logout.ts)_
498
+
499
+ ## `chatbase auth status`
500
+
501
+ Show the active credential and where it comes from
502
+
503
+ ```
504
+ USAGE
505
+ $ chatbase auth status [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
506
+
507
+ FLAGS
508
+ -q, --quiet Suppress non-essential output
509
+ --no-color Disable colored output
510
+ --no-input Never prompt; fail instead
511
+ --verbose Verbose diagnostics
512
+
513
+ OUTPUT FLAGS
514
+ --json Output raw API JSON
515
+ --plain Tab-separated output for scripts
516
+
517
+ DESCRIPTION
518
+ Show the active credential and where it comes from
519
+
520
+ EXAMPLES
521
+ $ chatbase auth status
522
+ ```
523
+
524
+ _See code: [src/commands/auth/status.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/auth/status.ts)_
525
+
526
+ ## `chatbase chat`
527
+
528
+ Send a message to an agent and print its response
529
+
530
+ ```
531
+ USAGE
532
+ $ chatbase chat [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
533
+ <value>] [-m <value>] [--resume --conversation <value>] [--no-stream]
534
+
535
+ FLAGS
536
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
537
+ -m, --message=<value> Message to send (else read from piped stdin, else an interactive REPL)
538
+ -q, --quiet Suppress non-essential output
539
+ --agent-name=<value> Agent display name (looked up to an ID)
540
+ --conversation=<value> Continue an existing conversation
541
+ --no-color Disable colored output
542
+ --no-input Never prompt; fail instead
543
+ --no-stream Wait for the complete response instead of streaming tokens
544
+ --resume Replay the last few messages when continuing a conversation
545
+ --verbose Verbose diagnostics
546
+
547
+ OUTPUT FLAGS
548
+ --json Output raw API JSON
549
+ --plain Tab-separated output for scripts
550
+
551
+ DESCRIPTION
552
+ Send a message to an agent and print its response
553
+
554
+ EXAMPLES
555
+ $ chatbase chat -a agt_123 -m "How do I reset my password?"
556
+
557
+ echo "summarize our refund policy" | chatbase chat -a agt_123
558
+
559
+ $ chatbase chat -a agt_123 -m "and then?" --conversation conv_123
560
+
561
+ $ chatbase chat -a agt_123 -m "hi" --no-stream
562
+
563
+ $ chatbase chat -a agt_123 -m "hi" --json
564
+ ```
565
+
566
+ _See code: [src/commands/chat/index.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/chat/index.ts)_
567
+
568
+ ## `chatbase chat retry`
569
+
570
+ Retry generating an assistant response (discards that message and everything after it in the conversation)
571
+
572
+ ```
573
+ USAGE
574
+ $ chatbase chat retry --conversation <value> --message-id <value> [--json] [--plain] [-q] [--verbose]
575
+ [--no-input] [--no-color] [--agent-name <value> | -a <value>] [--no-stream]
576
+
577
+ FLAGS
578
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
579
+ -q, --quiet Suppress non-essential output
580
+ --agent-name=<value> Agent display name (looked up to an ID)
581
+ --conversation=<value> (required) The conversation ID to retry in
582
+ --message-id=<value> (required) The message ID to retry from
583
+ --no-color Disable colored output
584
+ --no-input Never prompt; fail instead
585
+ --no-stream Wait for the complete response instead of streaming tokens
586
+ --verbose Verbose diagnostics
587
+
588
+ OUTPUT FLAGS
589
+ --json Output raw API JSON
590
+ --plain Tab-separated output for scripts
591
+
592
+ DESCRIPTION
593
+ Retry generating an assistant response (discards that message and everything after it in the conversation)
594
+
595
+ EXAMPLES
596
+ $ chatbase chat retry --conversation c_123 -a agt_123 --message-id msg_456
597
+
598
+ $ chatbase chat retry --conversation c_123 -a agt_123 --message-id msg_456 --no-stream
599
+ ```
600
+
601
+ _See code: [src/commands/chat/retry.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/chat/retry.ts)_
602
+
603
+ ## `chatbase config get KEY`
604
+
605
+ Print a resolved CLI configuration value and where it comes from
606
+
607
+ ```
608
+ USAGE
609
+ $ chatbase config get KEY [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
610
+
611
+ ARGUMENTS
612
+ KEY agent | timeout
613
+
614
+ FLAGS
615
+ -q, --quiet Suppress non-essential output
616
+ --no-color Disable colored output
617
+ --no-input Never prompt; fail instead
618
+ --verbose Verbose diagnostics
619
+
620
+ OUTPUT FLAGS
621
+ --json Output raw API JSON
622
+ --plain Tab-separated output for scripts
623
+
624
+ DESCRIPTION
625
+ Print a resolved CLI configuration value and where it comes from
626
+
627
+ EXAMPLES
628
+ $ chatbase config get agent
629
+
630
+ $ chatbase config get timeout
631
+ ```
632
+
633
+ _See code: [src/commands/config/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/config/get.ts)_
634
+
635
+ ## `chatbase config list`
636
+
637
+ List every resolved CLI configuration value and its source
638
+
639
+ ```
640
+ USAGE
641
+ $ chatbase config list [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
642
+
643
+ FLAGS
644
+ -q, --quiet Suppress non-essential output
645
+ --no-color Disable colored output
646
+ --no-input Never prompt; fail instead
647
+ --verbose Verbose diagnostics
648
+
649
+ OUTPUT FLAGS
650
+ --json Output raw API JSON
651
+ --plain Tab-separated output for scripts
652
+
653
+ DESCRIPTION
654
+ List every resolved CLI configuration value and its source
655
+
656
+ EXAMPLES
657
+ $ chatbase config list
658
+ ```
659
+
660
+ _See code: [src/commands/config/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/config/list.ts)_
661
+
662
+ ## `chatbase config set KEY [VALUE]`
663
+
664
+ Set a CLI configuration value
665
+
666
+ ```
667
+ USAGE
668
+ $ chatbase config set KEY [VALUE] [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
669
+
670
+ ARGUMENTS
671
+ KEY agent | timeout
672
+ [VALUE] New value (omit for agent to pick interactively)
673
+
674
+ FLAGS
675
+ -q, --quiet Suppress non-essential output
676
+ --no-color Disable colored output
677
+ --no-input Never prompt; fail instead
678
+ --verbose Verbose diagnostics
679
+
680
+ OUTPUT FLAGS
681
+ --json Output raw API JSON
682
+ --plain Tab-separated output for scripts
683
+
684
+ DESCRIPTION
685
+ Set a CLI configuration value
686
+
687
+ EXAMPLES
688
+ $ chatbase config set agent agt_123
689
+
690
+ $ chatbase config set agent
691
+
692
+ $ chatbase config set timeout 60000
693
+ ```
694
+
695
+ _See code: [src/commands/config/set.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/config/set.ts)_
696
+
697
+ ## `chatbase conversations export`
698
+
699
+ Export conversations from every source, with full message history
700
+
701
+ ```
702
+ USAGE
703
+ $ chatbase conversations export [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
704
+ <value>] [--cursor <value>] [--limit <value>] [--all] [-o <value>]
705
+
706
+ FLAGS
707
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
708
+ -o, --output=<value> Write export JSON to a file instead of stdout
709
+ -q, --quiet Suppress non-essential output
710
+ --agent-name=<value> Agent display name (looked up to an ID)
711
+ --all Fetch every page
712
+ --cursor=<value> Opaque cursor from a previous response
713
+ --limit=<value> Items per page (1-20, default 20)
714
+ --no-color Disable colored output
715
+ --no-input Never prompt; fail instead
716
+ --verbose Verbose diagnostics
717
+
718
+ OUTPUT FLAGS
719
+ --json Output raw API JSON
720
+ --plain Tab-separated output for scripts
721
+
722
+ DESCRIPTION
723
+ Export conversations from every source, with full message history
724
+
725
+ Export conversations with full message history, newest first.
726
+
727
+ This is the only endpoint that returns conversations from every source — the chat bubble and external integrations
728
+ (Slack, WhatsApp, Instagram, Messenger, and the like) as well as API-created ones. Prefer it over `conversations list`
729
+ whenever you need real traffic rather than just programmatically created conversations. Each item embeds its own
730
+ `messages` array, so no follow-up `conversations get` or `messages list` call is needed (and neither works for
731
+ bubble/integration conversations).
732
+
733
+ EXAMPLES
734
+ $ chatbase conversations export -a agt_123
735
+
736
+ $ chatbase conversations export -a agt_123 --all -o export.json
737
+ ```
738
+
739
+ _See code: [src/commands/conversations/export.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/conversations/export.ts)_
740
+
741
+ ## `chatbase conversations get [CONVERSATIONID]`
742
+
743
+ Show one conversation
744
+
745
+ ```
746
+ USAGE
747
+ $ chatbase conversations get [CONVERSATIONID] [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
748
+ [--agent-name <value> | -a <value>] [--conversation <value>]
749
+
750
+ ARGUMENTS
751
+ [CONVERSATIONID] Conversation ID (alternative to --conversation)
752
+
753
+ FLAGS
754
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
755
+ -q, --quiet Suppress non-essential output
756
+ --agent-name=<value> Agent display name (looked up to an ID)
757
+ --conversation=<value> Conversation ID
758
+ --no-color Disable colored output
759
+ --no-input Never prompt; fail instead
760
+ --verbose Verbose diagnostics
761
+
762
+ OUTPUT FLAGS
763
+ --json Output raw API JSON
764
+ --plain Tab-separated output for scripts
765
+
766
+ DESCRIPTION
767
+ Show one conversation
768
+
769
+ EXAMPLES
770
+ $ chatbase conversations get conv_123 -a agt_123
771
+
772
+ $ chatbase conversations get --conversation conv_123 -a agt_123
773
+ ```
774
+
775
+ _See code: [src/commands/conversations/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/conversations/get.ts)_
776
+
777
+ ## `chatbase conversations list`
778
+
779
+ List an agent’s API-created conversations
780
+
781
+ ```
782
+ USAGE
783
+ $ chatbase conversations list [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
784
+ <value>] [--limit <value>] [--cursor <value>] [--all] [--user <value>]
785
+
786
+ FLAGS
787
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
788
+ -q, --quiet Suppress non-essential output
789
+ --agent-name=<value> Agent display name (looked up to an ID)
790
+ --all Fetch every page
791
+ --cursor=<value> Pagination cursor from a previous page
792
+ --limit=<value> Maximum items per page
793
+ --no-color Disable colored output
794
+ --no-input Never prompt; fail instead
795
+ --user=<value> List conversations for a specific user (uses GET /users/{userId}/conversations)
796
+ --verbose Verbose diagnostics
797
+
798
+ OUTPUT FLAGS
799
+ --json Output raw API JSON
800
+ --plain Tab-separated output for scripts
801
+
802
+ DESCRIPTION
803
+ List an agent’s API-created conversations
804
+
805
+ List conversations for an agent, newest first.
806
+
807
+ Scope: the API v2 list endpoint returns only conversations created programmatically through the API. Conversations
808
+ from the chat bubble and external integrations (Slack, WhatsApp, Instagram, Messenger, and the like) are not
809
+ accessible here and are not counted in `total`. Use `chatbase conversations export` to read conversations from every
810
+ source — it also embeds full message history, which `conversations get` and `messages list` cannot retrieve for those
811
+ conversations.
812
+
813
+ EXAMPLES
814
+ $ chatbase conversations list -a agt_123
815
+
816
+ $ chatbase conversations list -a agt_123 --user usr_456
817
+
818
+ $ chatbase conversations list -a agt_123 --all --json
819
+ ```
820
+
821
+ _See code: [src/commands/conversations/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/conversations/list.ts)_
822
+
823
+ ## `chatbase conversations tool-result [CONVERSATIONID]`
824
+
825
+ Submit a client-side tool result to a chat turn
826
+
827
+ ```
828
+ USAGE
829
+ $ chatbase conversations tool-result [CONVERSATIONID] --tool-call-id <value> [--json] [--plain] [-q] [--verbose] [--no-input]
830
+ [--no-color] [--agent-name <value> | -a <value>] [--conversation <value>] [--output <value>]
831
+
832
+ ARGUMENTS
833
+ [CONVERSATIONID] Conversation ID (alternative to --conversation)
834
+
835
+ FLAGS
836
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
837
+ -q, --quiet Suppress non-essential output
838
+ --agent-name=<value> Agent display name (looked up to an ID)
839
+ --conversation=<value> Conversation ID
840
+ --no-color Disable colored output
841
+ --no-input Never prompt; fail instead
842
+ --output=<value> Result of executing the tool (inline JSON, @file, or @-); a value that is not valid JSON
843
+ is sent as a plain string
844
+ --tool-call-id=<value> (required) The toolCallId from the tool-call part in the chat response
845
+ --verbose Verbose diagnostics
846
+
847
+ OUTPUT FLAGS
848
+ --json Output raw API JSON
849
+ --plain Tab-separated output for scripts
850
+
851
+ DESCRIPTION
852
+ Submit a client-side tool result to a chat turn
853
+
854
+ Submit the result of a client-side tool call so the paused chat turn can continue. The tool call ID comes from the
855
+ tool-call part of the chat response that requested the execution.
856
+
857
+ EXAMPLES
858
+ $ chatbase conversations tool-result conv_123 --tool-call-id tc_1 --output '{"temperature": 72}' -a agt_123
859
+
860
+ $ chatbase conversations tool-result conv_123 --tool-call-id tc_1 --output @result.json -a agt_123
861
+
862
+ $ chatbase conversations tool-result conv_123 --tool-call-id tc_1 -a agt_123
863
+ ```
864
+
865
+ _See code: [src/commands/conversations/tool-result.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/conversations/tool-result.ts)_
866
+
867
+ ## `chatbase health`
868
+
869
+ Check that the Chatbase API is reachable
870
+
871
+ ```
872
+ USAGE
873
+ $ chatbase health [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
874
+
875
+ FLAGS
876
+ -q, --quiet Suppress non-essential output
877
+ --no-color Disable colored output
878
+ --no-input Never prompt; fail instead
879
+ --verbose Verbose diagnostics
880
+
881
+ OUTPUT FLAGS
882
+ --json Output raw API JSON
883
+ --plain Tab-separated output for scripts
884
+
885
+ DESCRIPTION
886
+ Check that the Chatbase API is reachable
887
+
888
+ EXAMPLES
889
+ $ chatbase health
890
+
891
+ $ chatbase health --json
892
+ ```
893
+
894
+ _See code: [src/commands/health.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/health.ts)_
895
+
896
+ ## `chatbase help [COMMAND]`
897
+
898
+ Display help for chatbase.
899
+
900
+ ```
901
+ USAGE
902
+ $ chatbase help [COMMAND...] [-n]
903
+
904
+ ARGUMENTS
905
+ [COMMAND...] Command to show help for.
906
+
907
+ FLAGS
908
+ -n, --nested-commands Include all nested commands in the output.
909
+
910
+ DESCRIPTION
911
+ Display help for chatbase.
912
+ ```
913
+
914
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.58/src/commands/help.ts)_
915
+
916
+ ## `chatbase helpdesk statuses`
917
+
918
+ List ticket statuses for an agent
919
+
920
+ ```
921
+ USAGE
922
+ $ chatbase helpdesk statuses [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
923
+ <value>]
924
+
925
+ FLAGS
926
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
927
+ -q, --quiet Suppress non-essential output
928
+ --agent-name=<value> Agent display name (looked up to an ID)
929
+ --no-color Disable colored output
930
+ --no-input Never prompt; fail instead
931
+ --verbose Verbose diagnostics
932
+
933
+ OUTPUT FLAGS
934
+ --json Output raw API JSON
935
+ --plain Tab-separated output for scripts
936
+
937
+ DESCRIPTION
938
+ List ticket statuses for an agent
939
+
940
+ EXAMPLES
941
+ $ chatbase helpdesk statuses -a agt_123
942
+ ```
943
+
944
+ _See code: [src/commands/helpdesk/statuses.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/helpdesk/statuses.ts)_
945
+
946
+ ## `chatbase helpdesk teams`
947
+
948
+ List helpdesk teams for an agent
949
+
950
+ ```
951
+ USAGE
952
+ $ chatbase helpdesk teams [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
953
+ <value>]
954
+
955
+ FLAGS
956
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
957
+ -q, --quiet Suppress non-essential output
958
+ --agent-name=<value> Agent display name (looked up to an ID)
959
+ --no-color Disable colored output
960
+ --no-input Never prompt; fail instead
961
+ --verbose Verbose diagnostics
962
+
963
+ OUTPUT FLAGS
964
+ --json Output raw API JSON
965
+ --plain Tab-separated output for scripts
966
+
967
+ DESCRIPTION
968
+ List helpdesk teams for an agent
969
+
970
+ EXAMPLES
971
+ $ chatbase helpdesk teams -a agt_123
972
+ ```
973
+
974
+ _See code: [src/commands/helpdesk/teams.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/helpdesk/teams.ts)_
975
+
976
+ ## `chatbase messages feedback [MESSAGEID]`
977
+
978
+ Set or clear user feedback on an assistant message
979
+
980
+ ```
981
+ USAGE
982
+ $ chatbase messages feedback [MESSAGEID] --conversation <value> --rating positive|negative|clear [--json] [--plain]
983
+ [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a <value>] [--message <value>]
984
+
985
+ ARGUMENTS
986
+ [MESSAGEID] Message ID (alternative to --message)
987
+
988
+ FLAGS
989
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
990
+ -q, --quiet Suppress non-essential output
991
+ --agent-name=<value> Agent display name (looked up to an ID)
992
+ --conversation=<value> (required) Conversation ID
993
+ --message=<value> Message ID
994
+ --no-color Disable colored output
995
+ --no-input Never prompt; fail instead
996
+ --rating=<option> (required) Feedback value ("clear" removes existing feedback)
997
+ <options: positive|negative|clear>
998
+ --verbose Verbose diagnostics
999
+
1000
+ OUTPUT FLAGS
1001
+ --json Output raw API JSON
1002
+ --plain Tab-separated output for scripts
1003
+
1004
+ DESCRIPTION
1005
+ Set or clear user feedback on an assistant message
1006
+
1007
+ EXAMPLES
1008
+ $ chatbase messages feedback msg_1 --conversation conv_123 --rating positive -a agt_123
1009
+
1010
+ $ chatbase messages feedback --conversation conv_123 --message msg_1 --rating clear -a agt_123
1011
+ ```
1012
+
1013
+ _See code: [src/commands/messages/feedback.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/messages/feedback.ts)_
1014
+
1015
+ ## `chatbase messages list`
1016
+
1017
+ List messages in a conversation
1018
+
1019
+ ```
1020
+ USAGE
1021
+ $ chatbase messages list --conversation <value> [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
1022
+ [--agent-name <value> | -a <value>] [--limit <value>] [--cursor <value>] [--all]
1023
+
1024
+ FLAGS
1025
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1026
+ -q, --quiet Suppress non-essential output
1027
+ --agent-name=<value> Agent display name (looked up to an ID)
1028
+ --all Fetch every page
1029
+ --conversation=<value> (required) Conversation ID
1030
+ --cursor=<value> Pagination cursor from a previous page
1031
+ --limit=<value> Maximum items per page
1032
+ --no-color Disable colored output
1033
+ --no-input Never prompt; fail instead
1034
+ --verbose Verbose diagnostics
1035
+
1036
+ OUTPUT FLAGS
1037
+ --json Output raw API JSON
1038
+ --plain Tab-separated output for scripts
1039
+
1040
+ DESCRIPTION
1041
+ List messages in a conversation
1042
+
1043
+ EXAMPLES
1044
+ $ chatbase messages list --conversation conv_123 -a agt_123
1045
+
1046
+ $ chatbase messages list --conversation conv_123 -a agt_123 --all --json
1047
+ ```
1048
+
1049
+ _See code: [src/commands/messages/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/messages/list.ts)_
1050
+
1051
+ ## `chatbase sources create`
1052
+
1053
+ Create a source: text/qna/link (JSON) or a file upload
1054
+
1055
+ ```
1056
+ USAGE
1057
+ $ chatbase sources create [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
1058
+ <value>] [-f <value>...] [--type text|qna|link | --file <value>] [--name <value>] [--content <value>] [--url
1059
+ <value>] [--link-type individual|sitemap|crawl] [--data <value>]
1060
+
1061
+ FLAGS
1062
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1063
+ -f, --field=<value>... Set a body field: -f key=value (repeatable)
1064
+ -q, --quiet Suppress non-essential output
1065
+ --agent-name=<value> Agent display name (looked up to an ID)
1066
+ --content=<value> Text content for --type text (@file, @-, or inline)
1067
+ --data=<value> JSON body (@file, @-, or inline); per-type flags override matching keys
1068
+ --file=<value> Path to a file to upload as a source (mutually exclusive with --type)
1069
+ --link-type=<option> Link crawl mode for --type link
1070
+ <options: individual|sitemap|crawl>
1071
+ --name=<value> Source name (--type text/qna, or a file upload)
1072
+ --no-color Disable colored output
1073
+ --no-input Never prompt; fail instead
1074
+ --type=<option> JSON source type (mutually exclusive with --file)
1075
+ <options: text|qna|link>
1076
+ --url=<value> URL for --type link
1077
+ --verbose Verbose diagnostics
1078
+
1079
+ OUTPUT FLAGS
1080
+ --json Output raw API JSON
1081
+ --plain Tab-separated output for scripts
1082
+
1083
+ DESCRIPTION
1084
+ Create a source: text/qna/link (JSON) or a file upload
1085
+
1086
+ EXAMPLES
1087
+ $ chatbase sources create --type text --name Guide --content "hello" -a agt_123
1088
+
1089
+ $ chatbase sources create --type link --url https://example.com --link-type crawl -a agt_123
1090
+
1091
+ $ chatbase sources create --type qna --data '{"questions":["Q1"],"answer":"A1"}' -a agt_123
1092
+
1093
+ $ chatbase sources create --file ./guide.pdf -a agt_123
1094
+ ```
1095
+
1096
+ _See code: [src/commands/sources/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/sources/create.ts)_
1097
+
1098
+ ## `chatbase sources delete SOURCEID`
1099
+
1100
+ Delete a source (restorable via restore command)
1101
+
1102
+ ```
1103
+ USAGE
1104
+ $ chatbase sources delete SOURCEID [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
1105
+ <value> | -a <value>]
1106
+
1107
+ ARGUMENTS
1108
+ SOURCEID Source ID
1109
+
1110
+ FLAGS
1111
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1112
+ -q, --quiet Suppress non-essential output
1113
+ --agent-name=<value> Agent display name (looked up to an ID)
1114
+ --no-color Disable colored output
1115
+ --no-input Never prompt; fail instead
1116
+ --verbose Verbose diagnostics
1117
+
1118
+ OUTPUT FLAGS
1119
+ --json Output raw API JSON
1120
+ --plain Tab-separated output for scripts
1121
+
1122
+ DESCRIPTION
1123
+ Delete a source (restorable via restore command)
1124
+
1125
+ EXAMPLES
1126
+ $ chatbase sources delete src_1 -a agt_1
1127
+ ```
1128
+
1129
+ _See code: [src/commands/sources/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/sources/delete.ts)_
1130
+
1131
+ ## `chatbase sources get SOURCEID`
1132
+
1133
+ Show one source
1134
+
1135
+ ```
1136
+ USAGE
1137
+ $ chatbase sources get SOURCEID [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
1138
+ <value> | -a <value>]
1139
+
1140
+ ARGUMENTS
1141
+ SOURCEID Source ID
1142
+
1143
+ FLAGS
1144
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1145
+ -q, --quiet Suppress non-essential output
1146
+ --agent-name=<value> Agent display name (looked up to an ID)
1147
+ --no-color Disable colored output
1148
+ --no-input Never prompt; fail instead
1149
+ --verbose Verbose diagnostics
1150
+
1151
+ OUTPUT FLAGS
1152
+ --json Output raw API JSON
1153
+ --plain Tab-separated output for scripts
1154
+
1155
+ DESCRIPTION
1156
+ Show one source
1157
+
1158
+ EXAMPLES
1159
+ $ chatbase sources get src_123 -a agt_123
1160
+ ```
1161
+
1162
+ _See code: [src/commands/sources/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/sources/get.ts)_
1163
+
1164
+ ## `chatbase sources list`
1165
+
1166
+ List sources for an agent
1167
+
1168
+ ```
1169
+ USAGE
1170
+ $ chatbase sources list [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
1171
+ <value>] [--limit <value>] [--cursor <value>] [--all] [--type <value>] [--name <value>]
1172
+
1173
+ FLAGS
1174
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1175
+ -q, --quiet Suppress non-essential output
1176
+ --agent-name=<value> Agent display name (looked up to an ID)
1177
+ --all Fetch every page
1178
+ --cursor=<value> Pagination cursor from a previous page
1179
+ --limit=<value> Maximum items per page
1180
+ --name=<value> Filter by source name
1181
+ --no-color Disable colored output
1182
+ --no-input Never prompt; fail instead
1183
+ --type=<value> Filter by source type
1184
+ --verbose Verbose diagnostics
1185
+
1186
+ OUTPUT FLAGS
1187
+ --json Output raw API JSON
1188
+ --plain Tab-separated output for scripts
1189
+
1190
+ DESCRIPTION
1191
+ List sources for an agent
1192
+
1193
+ EXAMPLES
1194
+ $ chatbase sources list -a agt_123
1195
+
1196
+ $ chatbase sources list -a agt_123 --all --json
1197
+ ```
1198
+
1199
+ _See code: [src/commands/sources/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/sources/list.ts)_
1200
+
1201
+ ## `chatbase sources restore SOURCEID`
1202
+
1203
+ Restore a deleted source
1204
+
1205
+ ```
1206
+ USAGE
1207
+ $ chatbase sources restore SOURCEID [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
1208
+ <value> | -a <value>]
1209
+
1210
+ ARGUMENTS
1211
+ SOURCEID Source ID
1212
+
1213
+ FLAGS
1214
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1215
+ -q, --quiet Suppress non-essential output
1216
+ --agent-name=<value> Agent display name (looked up to an ID)
1217
+ --no-color Disable colored output
1218
+ --no-input Never prompt; fail instead
1219
+ --verbose Verbose diagnostics
1220
+
1221
+ OUTPUT FLAGS
1222
+ --json Output raw API JSON
1223
+ --plain Tab-separated output for scripts
1224
+
1225
+ DESCRIPTION
1226
+ Restore a deleted source
1227
+
1228
+ EXAMPLES
1229
+ $ chatbase sources restore src_1 -a agt_1
1230
+ ```
1231
+
1232
+ _See code: [src/commands/sources/restore.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/sources/restore.ts)_
1233
+
1234
+ ## `chatbase sources summary`
1235
+
1236
+ Show aggregated source counts and sizes for an agent
1237
+
1238
+ ```
1239
+ USAGE
1240
+ $ chatbase sources summary [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
1241
+ <value>]
1242
+
1243
+ FLAGS
1244
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1245
+ -q, --quiet Suppress non-essential output
1246
+ --agent-name=<value> Agent display name (looked up to an ID)
1247
+ --no-color Disable colored output
1248
+ --no-input Never prompt; fail instead
1249
+ --verbose Verbose diagnostics
1250
+
1251
+ OUTPUT FLAGS
1252
+ --json Output raw API JSON
1253
+ --plain Tab-separated output for scripts
1254
+
1255
+ DESCRIPTION
1256
+ Show aggregated source counts and sizes for an agent
1257
+
1258
+ EXAMPLES
1259
+ $ chatbase sources summary -a agt_123
1260
+ ```
1261
+
1262
+ _See code: [src/commands/sources/summary.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/sources/summary.ts)_
1263
+
1264
+ ## `chatbase sources update SOURCEID`
1265
+
1266
+ Update an existing source (text, qna, link, or file)
1267
+
1268
+ ```
1269
+ USAGE
1270
+ $ chatbase sources update SOURCEID [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
1271
+ <value> | -a <value>] [-f <value>...] [--data <value> | --file <value>]
1272
+
1273
+ ARGUMENTS
1274
+ SOURCEID Source ID
1275
+
1276
+ FLAGS
1277
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1278
+ -f, --field=<value>... Set a body field: -f key=value (repeatable)
1279
+ -q, --quiet Suppress non-essential output
1280
+ --agent-name=<value> Agent display name (looked up to an ID)
1281
+ --data=<value> JSON body for text/qna/link sources (@file, @-, or inline)
1282
+ --file=<value> Path to a file to upload as a replacement (mutually exclusive with --data)
1283
+ --no-color Disable colored output
1284
+ --no-input Never prompt; fail instead
1285
+ --verbose Verbose diagnostics
1286
+
1287
+ OUTPUT FLAGS
1288
+ --json Output raw API JSON
1289
+ --plain Tab-separated output for scripts
1290
+
1291
+ DESCRIPTION
1292
+ Update an existing source (text, qna, link, or file)
1293
+
1294
+ EXAMPLES
1295
+ $ chatbase sources update src_1 --data '{"type":"text","content":"new"}' -a agt_1
1296
+
1297
+ $ chatbase sources update src_1 --file ./updated.pdf -a agt_1
1298
+ ```
1299
+
1300
+ _See code: [src/commands/sources/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/sources/update.ts)_
1301
+
1302
+ ## `chatbase tickets create`
1303
+
1304
+ Create a helpdesk ticket
1305
+
1306
+ ```
1307
+ USAGE
1308
+ $ chatbase tickets create [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
1309
+ <value>] [-f <value>...] [--subject <value>] [--customer-name <value> --customer-email <value>] [--data <value>]
1310
+
1311
+ FLAGS
1312
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1313
+ -f, --field=<value>... Set a body field: -f key=value (repeatable)
1314
+ -q, --quiet Suppress non-essential output
1315
+ --agent-name=<value> Agent display name (looked up to an ID)
1316
+ --customer-email=<value> Customer email — builds the required customer object (alternative to customer in --data)
1317
+ --customer-name=<value> Customer display name, used only when the email creates a new customer record
1318
+ --data=<value> JSON body (@file, @-, or inline). Fields: subject, description, customer, statusId,
1319
+ statusCategory, assigneeId, assigneeEmail, teamId
1320
+ --no-color Disable colored output
1321
+ --no-input Never prompt; fail instead
1322
+ --subject=<value> Ticket subject
1323
+ --verbose Verbose diagnostics
1324
+
1325
+ OUTPUT FLAGS
1326
+ --json Output raw API JSON
1327
+ --plain Tab-separated output for scripts
1328
+
1329
+ DESCRIPTION
1330
+ Create a helpdesk ticket
1331
+
1332
+ EXAMPLES
1333
+ $ chatbase tickets create --subject "Export failing" -f description="Customer cannot export." --customer-email jane@example.com -a agt_123
1334
+
1335
+ $ chatbase tickets create --subject "Export failing" --data '{"description":"Customer cannot export.","customer":{"email":"jane@example.com"}}' -a agt_123
1336
+ ```
1337
+
1338
+ _See code: [src/commands/tickets/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/tickets/create.ts)_
1339
+
1340
+ ## `chatbase tickets get TICKETNUMBER`
1341
+
1342
+ Show one helpdesk ticket
1343
+
1344
+ ```
1345
+ USAGE
1346
+ $ chatbase tickets get TICKETNUMBER [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
1347
+ <value> | -a <value>]
1348
+
1349
+ ARGUMENTS
1350
+ TICKETNUMBER Ticket number
1351
+
1352
+ FLAGS
1353
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1354
+ -q, --quiet Suppress non-essential output
1355
+ --agent-name=<value> Agent display name (looked up to an ID)
1356
+ --no-color Disable colored output
1357
+ --no-input Never prompt; fail instead
1358
+ --verbose Verbose diagnostics
1359
+
1360
+ OUTPUT FLAGS
1361
+ --json Output raw API JSON
1362
+ --plain Tab-separated output for scripts
1363
+
1364
+ DESCRIPTION
1365
+ Show one helpdesk ticket
1366
+
1367
+ EXAMPLES
1368
+ $ chatbase tickets get 42 -a agt_123
1369
+ ```
1370
+
1371
+ _See code: [src/commands/tickets/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/tickets/get.ts)_
1372
+
1373
+ ## `chatbase tickets list`
1374
+
1375
+ List helpdesk tickets for an agent
1376
+
1377
+ ```
1378
+ USAGE
1379
+ $ chatbase tickets list [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
1380
+ <value>] [--limit <value>] [--cursor <value>] [--all] [--status <value>] [--channel <value>] [--assignee-id <value>]
1381
+ [--team-id <value>] [--created-after <value>] [--created-before <value>] [--sort-by
1382
+ createdAt|updatedAt|lastMessageAt] [--order asc|desc] [--include-total]
1383
+
1384
+ FLAGS
1385
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1386
+ -q, --quiet Suppress non-essential output
1387
+ --agent-name=<value> Agent display name (looked up to an ID)
1388
+ --all Fetch every page
1389
+ --assignee-id=<value> Filter by assignee UUID, or "none" for unassigned
1390
+ --channel=<value> Filter by channel (comma-separated, e.g. email,api)
1391
+ --created-after=<value> Only tickets created after this ISO 8601 date
1392
+ --created-before=<value> Only tickets created before this ISO 8601 date
1393
+ --cursor=<value> Pagination cursor from a previous page
1394
+ --include-total Include pagination.total in the response
1395
+ --limit=<value> Maximum items per page
1396
+ --no-color Disable colored output
1397
+ --no-input Never prompt; fail instead
1398
+ --order=<option> Sort direction
1399
+ <options: asc|desc>
1400
+ --sort-by=<option> Sort field
1401
+ <options: createdAt|updatedAt|lastMessageAt>
1402
+ --status=<value> Filter by status (comma-separated): new, on_you, on_customer, on_hold, closed, cancelled
1403
+ --team-id=<value> Filter by team UUID, or "none" for no team
1404
+ --verbose Verbose diagnostics
1405
+
1406
+ OUTPUT FLAGS
1407
+ --json Output raw API JSON
1408
+ --plain Tab-separated output for scripts
1409
+
1410
+ DESCRIPTION
1411
+ List helpdesk tickets for an agent
1412
+
1413
+ EXAMPLES
1414
+ $ chatbase tickets list -a agt_123
1415
+
1416
+ $ chatbase tickets list -a agt_123 --status new,on_you
1417
+
1418
+ $ chatbase tickets list -a agt_123 --all --json
1419
+ ```
1420
+
1421
+ _See code: [src/commands/tickets/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/tickets/list.ts)_
1422
+
1423
+ ## `chatbase tickets messages [TICKETNUMBER]`
1424
+
1425
+ List a ticket's message thread
1426
+
1427
+ ```
1428
+ USAGE
1429
+ $ chatbase tickets messages [TICKETNUMBER] [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
1430
+ [--agent-name <value> | -a <value>] [--limit <value>] [--cursor <value>] [--all] [--ticket <value>] [--types
1431
+ <value>] [--order asc|desc]
1432
+
1433
+ ARGUMENTS
1434
+ [TICKETNUMBER] Ticket number (alternative to --ticket)
1435
+
1436
+ FLAGS
1437
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1438
+ -q, --quiet Suppress non-essential output
1439
+ --agent-name=<value> Agent display name (looked up to an ID)
1440
+ --all Fetch every page
1441
+ --cursor=<value> Pagination cursor from a previous page
1442
+ --limit=<value> Maximum items per page
1443
+ --no-color Disable colored output
1444
+ --no-input Never prompt; fail instead
1445
+ --order=<option> Sort direction
1446
+ <options: asc|desc>
1447
+ --ticket=<value> Ticket number
1448
+ --types=<value> Message types to include (comma-separated): reply, note, event (default: reply,note)
1449
+ --verbose Verbose diagnostics
1450
+
1451
+ OUTPUT FLAGS
1452
+ --json Output raw API JSON
1453
+ --plain Tab-separated output for scripts
1454
+
1455
+ DESCRIPTION
1456
+ List a ticket's message thread
1457
+
1458
+ EXAMPLES
1459
+ $ chatbase tickets messages 42 -a agt_123
1460
+
1461
+ $ chatbase tickets messages 42 -a agt_123 --all --json
1462
+ ```
1463
+
1464
+ _See code: [src/commands/tickets/messages.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/tickets/messages.ts)_
1465
+
1466
+ ## `chatbase tickets reply [TICKETNUMBER]`
1467
+
1468
+ Post an agent reply to a ticket's message thread
1469
+
1470
+ ```
1471
+ USAGE
1472
+ $ chatbase tickets reply [TICKETNUMBER] -m <value> [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
1473
+ [--agent-name <value> | -a <value>] [--ticket <value>] [--author-id <value>] [--author-email <value>]
1474
+
1475
+ ARGUMENTS
1476
+ [TICKETNUMBER] Ticket number (alternative to --ticket)
1477
+
1478
+ FLAGS
1479
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1480
+ -m, --message=<value> (required) Reply body as GitHub-flavored Markdown
1481
+ -q, --quiet Suppress non-essential output
1482
+ --agent-name=<value> Agent display name (looked up to an ID)
1483
+ --author-email=<value> Email of the team member the reply is attributed to (exactly one of
1484
+ --author-id/--author-email)
1485
+ --author-id=<value> Platform user id of the team member the reply is attributed to (exactly one of
1486
+ --author-id/--author-email)
1487
+ --no-color Disable colored output
1488
+ --no-input Never prompt; fail instead
1489
+ --ticket=<value> Ticket number
1490
+ --verbose Verbose diagnostics
1491
+
1492
+ OUTPUT FLAGS
1493
+ --json Output raw API JSON
1494
+ --plain Tab-separated output for scripts
1495
+
1496
+ DESCRIPTION
1497
+ Post an agent reply to a ticket's message thread
1498
+
1499
+ EXAMPLES
1500
+ $ chatbase tickets reply 42 -m "On it" --author-email sam@example.com -a agt_123
1501
+ ```
1502
+
1503
+ _See code: [src/commands/tickets/reply.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/tickets/reply.ts)_
1504
+
1505
+ ## `chatbase tickets search QUERY`
1506
+
1507
+ Search tickets by message content
1508
+
1509
+ ```
1510
+ USAGE
1511
+ $ chatbase tickets search QUERY [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
1512
+ <value> | -a <value>] [--limit <value>]
1513
+
1514
+ ARGUMENTS
1515
+ QUERY Free-text search terms (matched against ticket messages)
1516
+
1517
+ FLAGS
1518
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1519
+ -q, --quiet Suppress non-essential output
1520
+ --agent-name=<value> Agent display name (looked up to an ID)
1521
+ --limit=<value> Number of results (1–50, default 20)
1522
+ --no-color Disable colored output
1523
+ --no-input Never prompt; fail instead
1524
+ --verbose Verbose diagnostics
1525
+
1526
+ OUTPUT FLAGS
1527
+ --json Output raw API JSON
1528
+ --plain Tab-separated output for scripts
1529
+
1530
+ DESCRIPTION
1531
+ Search tickets by message content
1532
+
1533
+ EXAMPLES
1534
+ $ chatbase tickets search "refund not received" -a agt_123
1535
+
1536
+ $ chatbase tickets search "refund" -a agt_123 --limit 10 --json
1537
+ ```
1538
+
1539
+ _See code: [src/commands/tickets/search.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/tickets/search.ts)_
1540
+
1541
+ ## `chatbase tickets update TICKETNUMBER`
1542
+
1543
+ Update a ticket's status, assignee, and/or team
1544
+
1545
+ ```
1546
+ USAGE
1547
+ $ chatbase tickets update TICKETNUMBER [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name
1548
+ <value> | -a <value>] [-f <value>...] [--data <value>]
1549
+
1550
+ ARGUMENTS
1551
+ TICKETNUMBER Ticket number
1552
+
1553
+ FLAGS
1554
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1555
+ -f, --field=<value>... Set a body field: -f key=value (repeatable)
1556
+ -q, --quiet Suppress non-essential output
1557
+ --agent-name=<value> Agent display name (looked up to an ID)
1558
+ --data=<value> JSON body (@file, @-, or inline). Fields: statusId, statusCategory, assigneeId,
1559
+ assigneeEmail, teamId
1560
+ --no-color Disable colored output
1561
+ --no-input Never prompt; fail instead
1562
+ --verbose Verbose diagnostics
1563
+
1564
+ OUTPUT FLAGS
1565
+ --json Output raw API JSON
1566
+ --plain Tab-separated output for scripts
1567
+
1568
+ DESCRIPTION
1569
+ Update a ticket's status, assignee, and/or team
1570
+
1571
+ EXAMPLES
1572
+ $ chatbase tickets update 42 --data '{"statusCategory":"closed"}' -a agt_123
1573
+ ```
1574
+
1575
+ _See code: [src/commands/tickets/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/tickets/update.ts)_
1576
+
1577
+ ## `chatbase whatsapp send-template TEMPLATE`
1578
+
1579
+ Send an approved WhatsApp template message
1580
+
1581
+ ```
1582
+ USAGE
1583
+ $ chatbase whatsapp send-template TEMPLATE --to <value> [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color]
1584
+ [--agent-name <value> | -a <value>] [--from <value>] [--language <value>] [--variables <value>]
1585
+
1586
+ ARGUMENTS
1587
+ TEMPLATE Name of the approved template
1588
+
1589
+ FLAGS
1590
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1591
+ -q, --quiet Suppress non-essential output
1592
+ --agent-name=<value> Agent display name (looked up to an ID)
1593
+ --from=<value> Which connected WhatsApp number to send from — optional when the agent has exactly one
1594
+ --language=<value> Template language code (e.g. en_US) — optional when the template exists in a single language
1595
+ --no-color Disable colored output
1596
+ --no-input Never prompt; fail instead
1597
+ --to=<value> (required) Recipient phone number in international format (digits with country code)
1598
+ --variables=<value> Template variable values as JSON grouped by component (@file, @-, or inline), e.g.
1599
+ '{"body":{"1":"Jane"}}'
1600
+ --verbose Verbose diagnostics
1601
+
1602
+ OUTPUT FLAGS
1603
+ --json Output raw API JSON
1604
+ --plain Tab-separated output for scripts
1605
+
1606
+ DESCRIPTION
1607
+ Send an approved WhatsApp template message
1608
+
1609
+ Send an approved WhatsApp template to a phone number from one of the agent’s connected numbers. No user ID is needed —
1610
+ a Chatbase user is resolved or created from the recipient number, and replies flow through the agent’s regular
1611
+ WhatsApp pipeline. Use `whatsapp templates` to see available templates and the variables each expects.
1612
+
1613
+ EXAMPLES
1614
+ $ chatbase whatsapp send-template order_update --to 14155552671 -a agt_123
1615
+
1616
+ $ chatbase whatsapp send-template order_update --to 14155552671 --language en_US --variables '{"header":{"1":"#1042"},"body":{"1":"Jane","2":"Friday"}}' -a agt_123
1617
+ ```
1618
+
1619
+ _See code: [src/commands/whatsapp/send-template.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/whatsapp/send-template.ts)_
1620
+
1621
+ ## `chatbase whatsapp templates`
1622
+
1623
+ List approved WhatsApp templates for an agent
1624
+
1625
+ ```
1626
+ USAGE
1627
+ $ chatbase whatsapp templates [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
1628
+ <value>]
1629
+
1630
+ FLAGS
1631
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1632
+ -q, --quiet Suppress non-essential output
1633
+ --agent-name=<value> Agent display name (looked up to an ID)
1634
+ --no-color Disable colored output
1635
+ --no-input Never prompt; fail instead
1636
+ --verbose Verbose diagnostics
1637
+
1638
+ OUTPUT FLAGS
1639
+ --json Output raw API JSON
1640
+ --plain Tab-separated output for scripts
1641
+
1642
+ DESCRIPTION
1643
+ List approved WhatsApp templates for an agent
1644
+
1645
+ List the approved WhatsApp templates available to the agent, across all of its connected WhatsApp Business Accounts. A
1646
+ template can only be sent from a number on its own Business Account — pick a sender whose WABA matches the template’s
1647
+ WABA column.
1648
+
1649
+ EXAMPLES
1650
+ $ chatbase whatsapp templates -a agt_123
1651
+
1652
+ $ chatbase whatsapp templates -a agt_123 --json
1653
+ ```
1654
+
1655
+ _See code: [src/commands/whatsapp/templates.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.1.0/src/commands/whatsapp/templates.ts)_
1656
+ <!-- commandsstop -->