chatbase 0.2.0 → 0.4.0

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
@@ -77,6 +77,7 @@ calls you invoke.
77
77
  * [`chatbase tickets reply [TICKETNUMBER]`](#chatbase-tickets-reply-ticketnumber)
78
78
  * [`chatbase tickets search QUERY`](#chatbase-tickets-search-query)
79
79
  * [`chatbase tickets update TICKETNUMBER`](#chatbase-tickets-update-ticketnumber)
80
+ * [`chatbase voice start`](#chatbase-voice-start)
80
81
  * [`chatbase whatsapp send-template TEMPLATE`](#chatbase-whatsapp-send-template-template)
81
82
  * [`chatbase whatsapp templates`](#chatbase-whatsapp-templates)
82
83
 
@@ -115,7 +116,7 @@ EXAMPLES
115
116
  $ chatbase agents auto-retrain --enabled
116
117
  ```
117
118
 
118
- _See code: [src/commands/agents/auto-retrain.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/agents/auto-retrain.ts)_
119
+ _See code: [src/commands/agents/auto-retrain.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/auto-retrain.ts)_
119
120
 
120
121
  ## `chatbase agents clone AGENTID`
121
122
 
@@ -145,7 +146,7 @@ EXAMPLES
145
146
  $ chatbase agents clone agt_123
146
147
  ```
147
148
 
148
- _See code: [src/commands/agents/clone.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/agents/clone.ts)_
149
+ _See code: [src/commands/agents/clone.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/clone.ts)_
149
150
 
150
151
  ## `chatbase agents create`
151
152
 
@@ -180,7 +181,7 @@ EXAMPLES
180
181
  $ chatbase agents create --data @agent.json
181
182
  ```
182
183
 
183
- _See code: [src/commands/agents/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/agents/create.ts)_
184
+ _See code: [src/commands/agents/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/create.ts)_
184
185
 
185
186
  ## `chatbase agents delete AGENTID`
186
187
 
@@ -211,7 +212,7 @@ EXAMPLES
211
212
  $ chatbase agents delete agt_123 --confirm agt_123
212
213
  ```
213
214
 
214
- _See code: [src/commands/agents/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/agents/delete.ts)_
215
+ _See code: [src/commands/agents/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/delete.ts)_
215
216
 
216
217
  ## `chatbase agents get [AGENTID]`
217
218
 
@@ -246,7 +247,7 @@ EXAMPLES
246
247
  $ chatbase agents get
247
248
  ```
248
249
 
249
- _See code: [src/commands/agents/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/agents/get.ts)_
250
+ _See code: [src/commands/agents/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/get.ts)_
250
251
 
251
252
  ## `chatbase agents list`
252
253
 
@@ -279,7 +280,7 @@ EXAMPLES
279
280
  $ chatbase agents list --json
280
281
  ```
281
282
 
282
- _See code: [src/commands/agents/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/agents/list.ts)_
283
+ _See code: [src/commands/agents/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/list.ts)_
283
284
 
284
285
  ## `chatbase agents styles [AGENTID]`
285
286
 
@@ -316,7 +317,7 @@ EXAMPLES
316
317
  $ chatbase agents styles --data @styles.json
317
318
  ```
318
319
 
319
- _See code: [src/commands/agents/styles.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/agents/styles.ts)_
320
+ _See code: [src/commands/agents/styles.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/styles.ts)_
320
321
 
321
322
  ## `chatbase agents train [AGENTID]`
322
323
 
@@ -351,7 +352,7 @@ EXAMPLES
351
352
  $ chatbase agents train
352
353
  ```
353
354
 
354
- _See code: [src/commands/agents/train.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/agents/train.ts)_
355
+ _See code: [src/commands/agents/train.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/train.ts)_
355
356
 
356
357
  ## `chatbase agents update [AGENTID]`
357
358
 
@@ -393,7 +394,7 @@ EXAMPLES
393
394
  $ chatbase agents update agt_123 --data @agent.json
394
395
  ```
395
396
 
396
- _See code: [src/commands/agents/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/agents/update.ts)_
397
+ _See code: [src/commands/agents/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/agents/update.ts)_
397
398
 
398
399
  ## `chatbase api METHOD PATH`
399
400
 
@@ -434,7 +435,7 @@ EXAMPLES
434
435
  $ chatbase api PATCH /agents/agt_123 --body @patch.json
435
436
  ```
436
437
 
437
- _See code: [src/commands/api.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/api.ts)_
438
+ _See code: [src/commands/api.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/api.ts)_
438
439
 
439
440
  ## `chatbase auth login`
440
441
 
@@ -467,7 +468,7 @@ EXAMPLES
467
468
  cat key.txt | chatbase auth login --with-token
468
469
  ```
469
470
 
470
- _See code: [src/commands/auth/login.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/auth/login.ts)_
471
+ _See code: [src/commands/auth/login.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/auth/login.ts)_
471
472
 
472
473
  ## `chatbase auth logout`
473
474
 
@@ -494,7 +495,7 @@ EXAMPLES
494
495
  $ chatbase auth logout
495
496
  ```
496
497
 
497
- _See code: [src/commands/auth/logout.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/auth/logout.ts)_
498
+ _See code: [src/commands/auth/logout.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/auth/logout.ts)_
498
499
 
499
500
  ## `chatbase auth status`
500
501
 
@@ -521,7 +522,7 @@ EXAMPLES
521
522
  $ chatbase auth status
522
523
  ```
523
524
 
524
- _See code: [src/commands/auth/status.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/auth/status.ts)_
525
+ _See code: [src/commands/auth/status.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/auth/status.ts)_
525
526
 
526
527
  ## `chatbase chat`
527
528
 
@@ -563,7 +564,7 @@ EXAMPLES
563
564
  $ chatbase chat -a agt_123 -m "hi" --json
564
565
  ```
565
566
 
566
- _See code: [src/commands/chat/index.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/chat/index.ts)_
567
+ _See code: [src/commands/chat/index.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/chat/index.ts)_
567
568
 
568
569
  ## `chatbase chat retry`
569
570
 
@@ -598,7 +599,7 @@ EXAMPLES
598
599
  $ chatbase chat retry --conversation c_123 -a agt_123 --message-id msg_456 --no-stream
599
600
  ```
600
601
 
601
- _See code: [src/commands/chat/retry.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/chat/retry.ts)_
602
+ _See code: [src/commands/chat/retry.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/chat/retry.ts)_
602
603
 
603
604
  ## `chatbase config get KEY`
604
605
 
@@ -630,7 +631,7 @@ EXAMPLES
630
631
  $ chatbase config get timeout
631
632
  ```
632
633
 
633
- _See code: [src/commands/config/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/config/get.ts)_
634
+ _See code: [src/commands/config/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/config/get.ts)_
634
635
 
635
636
  ## `chatbase config list`
636
637
 
@@ -657,7 +658,7 @@ EXAMPLES
657
658
  $ chatbase config list
658
659
  ```
659
660
 
660
- _See code: [src/commands/config/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/config/list.ts)_
661
+ _See code: [src/commands/config/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/config/list.ts)_
661
662
 
662
663
  ## `chatbase config set KEY [VALUE]`
663
664
 
@@ -692,7 +693,7 @@ EXAMPLES
692
693
  $ chatbase config set timeout 60000
693
694
  ```
694
695
 
695
- _See code: [src/commands/config/set.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/config/set.ts)_
696
+ _See code: [src/commands/config/set.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/config/set.ts)_
696
697
 
697
698
  ## `chatbase conversations export`
698
699
 
@@ -701,19 +702,28 @@ Export conversations from every source, with full message history
701
702
  ```
702
703
  USAGE
703
704
  $ 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
+ <value>] [--cursor <value>] [--limit <value>] [--all] [-o <value>] [--start-date <value>] [--end-date <value>]
706
+ [--conversation <value>] [--include summary|messages] [--source <value>]
705
707
 
706
708
  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
709
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
710
+ -o, --output=<value> Write export JSON to a file instead of stdout
711
+ -q, --quiet Suppress non-essential output
712
+ --agent-name=<value> Agent display name (looked up to an ID)
713
+ --all Fetch every page
714
+ --conversation=<value> Export only this conversation ID, from any source (widget, API, WhatsApp, …)
715
+ --cursor=<value> Opaque cursor from a previous response
716
+ --end-date=<value> Only conversations created at or before this YYYY-MM-DD date (inclusive) or ISO 8601
717
+ date-time
718
+ --include=<option> Whether to embed message bodies; summary omits them for a cheaper triage pass
719
+ <options: summary|messages>
720
+ --limit=<value> Items per page (1-20, default 20)
721
+ --no-color Disable colored output
722
+ --no-input Never prompt; fail instead
723
+ --source=<value> Restrict to these conversation sources (comma-separated, e.g. "Widget or
724
+ Iframe,WhatsApp"). Omit for all sources
725
+ --start-date=<value> Only conversations created at or after this YYYY-MM-DD date or ISO 8601 date-time
726
+ --verbose Verbose diagnostics
717
727
 
718
728
  OUTPUT FLAGS
719
729
  --json Output raw API JSON
@@ -734,9 +744,15 @@ EXAMPLES
734
744
  $ chatbase conversations export -a agt_123
735
745
 
736
746
  $ chatbase conversations export -a agt_123 --all -o export.json
747
+
748
+ $ chatbase conversations export -a agt_123 --start-date 2024-01-01 --end-date 2024-01-31
749
+
750
+ $ chatbase conversations export -a agt_123 --include summary --source Widget,WhatsApp
751
+
752
+ $ chatbase conversations export -a agt_123 --conversation conv_123
737
753
  ```
738
754
 
739
- _See code: [src/commands/conversations/export.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/conversations/export.ts)_
755
+ _See code: [src/commands/conversations/export.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/conversations/export.ts)_
740
756
 
741
757
  ## `chatbase conversations get [CONVERSATIONID]`
742
758
 
@@ -772,7 +788,7 @@ EXAMPLES
772
788
  $ chatbase conversations get --conversation conv_123 -a agt_123
773
789
  ```
774
790
 
775
- _See code: [src/commands/conversations/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/conversations/get.ts)_
791
+ _See code: [src/commands/conversations/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/conversations/get.ts)_
776
792
 
777
793
  ## `chatbase conversations list`
778
794
 
@@ -781,7 +797,7 @@ List an agent’s API-created conversations
781
797
  ```
782
798
  USAGE
783
799
  $ chatbase conversations list [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
784
- <value>] [--limit <value>] [--cursor <value>] [--all] [--user <value>]
800
+ <value>] [--limit <value>] [--cursor <value>] [--all] [--user <value>] [--start-date <value>] [--end-date <value>]
785
801
 
786
802
  FLAGS
787
803
  -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
@@ -789,9 +805,12 @@ FLAGS
789
805
  --agent-name=<value> Agent display name (looked up to an ID)
790
806
  --all Fetch every page
791
807
  --cursor=<value> Pagination cursor from a previous page
808
+ --end-date=<value> Only conversations created at or before this YYYY-MM-DD date (inclusive) or ISO 8601
809
+ date-time
792
810
  --limit=<value> Maximum items per page
793
811
  --no-color Disable colored output
794
812
  --no-input Never prompt; fail instead
813
+ --start-date=<value> Only conversations created at or after this YYYY-MM-DD date or ISO 8601 date-time
795
814
  --user=<value> List conversations for a specific user (uses GET /users/{userId}/conversations)
796
815
  --verbose Verbose diagnostics
797
816
 
@@ -815,10 +834,12 @@ EXAMPLES
815
834
 
816
835
  $ chatbase conversations list -a agt_123 --user usr_456
817
836
 
837
+ $ chatbase conversations list -a agt_123 --start-date 2024-01-01 --end-date 2024-01-31
838
+
818
839
  $ chatbase conversations list -a agt_123 --all --json
819
840
  ```
820
841
 
821
- _See code: [src/commands/conversations/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/conversations/list.ts)_
842
+ _See code: [src/commands/conversations/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/conversations/list.ts)_
822
843
 
823
844
  ## `chatbase conversations tool-result [CONVERSATIONID]`
824
845
 
@@ -862,7 +883,7 @@ EXAMPLES
862
883
  $ chatbase conversations tool-result conv_123 --tool-call-id tc_1 -a agt_123
863
884
  ```
864
885
 
865
- _See code: [src/commands/conversations/tool-result.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/conversations/tool-result.ts)_
886
+ _See code: [src/commands/conversations/tool-result.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/conversations/tool-result.ts)_
866
887
 
867
888
  ## `chatbase health`
868
889
 
@@ -891,7 +912,7 @@ EXAMPLES
891
912
  $ chatbase health --json
892
913
  ```
893
914
 
894
- _See code: [src/commands/health.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/health.ts)_
915
+ _See code: [src/commands/health.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/health.ts)_
895
916
 
896
917
  ## `chatbase help [COMMAND]`
897
918
 
@@ -941,7 +962,7 @@ EXAMPLES
941
962
  $ chatbase helpdesk statuses -a agt_123
942
963
  ```
943
964
 
944
- _See code: [src/commands/helpdesk/statuses.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/helpdesk/statuses.ts)_
965
+ _See code: [src/commands/helpdesk/statuses.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/helpdesk/statuses.ts)_
945
966
 
946
967
  ## `chatbase helpdesk teams`
947
968
 
@@ -971,7 +992,7 @@ EXAMPLES
971
992
  $ chatbase helpdesk teams -a agt_123
972
993
  ```
973
994
 
974
- _See code: [src/commands/helpdesk/teams.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/helpdesk/teams.ts)_
995
+ _See code: [src/commands/helpdesk/teams.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/helpdesk/teams.ts)_
975
996
 
976
997
  ## `chatbase messages feedback [MESSAGEID]`
977
998
 
@@ -1010,7 +1031,7 @@ EXAMPLES
1010
1031
  $ chatbase messages feedback --conversation conv_123 --message msg_1 --rating clear -a agt_123
1011
1032
  ```
1012
1033
 
1013
- _See code: [src/commands/messages/feedback.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/messages/feedback.ts)_
1034
+ _See code: [src/commands/messages/feedback.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/messages/feedback.ts)_
1014
1035
 
1015
1036
  ## `chatbase messages list`
1016
1037
 
@@ -1046,7 +1067,7 @@ EXAMPLES
1046
1067
  $ chatbase messages list --conversation conv_123 -a agt_123 --all --json
1047
1068
  ```
1048
1069
 
1049
- _See code: [src/commands/messages/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/messages/list.ts)_
1070
+ _See code: [src/commands/messages/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/messages/list.ts)_
1050
1071
 
1051
1072
  ## `chatbase sources create`
1052
1073
 
@@ -1093,7 +1114,7 @@ EXAMPLES
1093
1114
  $ chatbase sources create --file ./guide.pdf -a agt_123
1094
1115
  ```
1095
1116
 
1096
- _See code: [src/commands/sources/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/sources/create.ts)_
1117
+ _See code: [src/commands/sources/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/create.ts)_
1097
1118
 
1098
1119
  ## `chatbase sources delete SOURCEID`
1099
1120
 
@@ -1126,7 +1147,7 @@ EXAMPLES
1126
1147
  $ chatbase sources delete src_1 -a agt_1
1127
1148
  ```
1128
1149
 
1129
- _See code: [src/commands/sources/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/sources/delete.ts)_
1150
+ _See code: [src/commands/sources/delete.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/delete.ts)_
1130
1151
 
1131
1152
  ## `chatbase sources get SOURCEID`
1132
1153
 
@@ -1159,7 +1180,7 @@ EXAMPLES
1159
1180
  $ chatbase sources get src_123 -a agt_123
1160
1181
  ```
1161
1182
 
1162
- _See code: [src/commands/sources/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/sources/get.ts)_
1183
+ _See code: [src/commands/sources/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/get.ts)_
1163
1184
 
1164
1185
  ## `chatbase sources list`
1165
1186
 
@@ -1196,7 +1217,7 @@ EXAMPLES
1196
1217
  $ chatbase sources list -a agt_123 --all --json
1197
1218
  ```
1198
1219
 
1199
- _See code: [src/commands/sources/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/sources/list.ts)_
1220
+ _See code: [src/commands/sources/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/list.ts)_
1200
1221
 
1201
1222
  ## `chatbase sources restore SOURCEID`
1202
1223
 
@@ -1229,7 +1250,7 @@ EXAMPLES
1229
1250
  $ chatbase sources restore src_1 -a agt_1
1230
1251
  ```
1231
1252
 
1232
- _See code: [src/commands/sources/restore.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/sources/restore.ts)_
1253
+ _See code: [src/commands/sources/restore.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/restore.ts)_
1233
1254
 
1234
1255
  ## `chatbase sources summary`
1235
1256
 
@@ -1259,7 +1280,7 @@ EXAMPLES
1259
1280
  $ chatbase sources summary -a agt_123
1260
1281
  ```
1261
1282
 
1262
- _See code: [src/commands/sources/summary.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/sources/summary.ts)_
1283
+ _See code: [src/commands/sources/summary.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/summary.ts)_
1263
1284
 
1264
1285
  ## `chatbase sources update SOURCEID`
1265
1286
 
@@ -1297,7 +1318,7 @@ EXAMPLES
1297
1318
  $ chatbase sources update src_1 --file ./updated.pdf -a agt_1
1298
1319
  ```
1299
1320
 
1300
- _See code: [src/commands/sources/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/sources/update.ts)_
1321
+ _See code: [src/commands/sources/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/sources/update.ts)_
1301
1322
 
1302
1323
  ## `chatbase tickets create`
1303
1324
 
@@ -1335,7 +1356,7 @@ EXAMPLES
1335
1356
  $ chatbase tickets create --subject "Export failing" --data '{"description":"Customer cannot export.","customer":{"email":"jane@example.com"}}' -a agt_123
1336
1357
  ```
1337
1358
 
1338
- _See code: [src/commands/tickets/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/tickets/create.ts)_
1359
+ _See code: [src/commands/tickets/create.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/create.ts)_
1339
1360
 
1340
1361
  ## `chatbase tickets get TICKETNUMBER`
1341
1362
 
@@ -1368,7 +1389,7 @@ EXAMPLES
1368
1389
  $ chatbase tickets get 42 -a agt_123
1369
1390
  ```
1370
1391
 
1371
- _See code: [src/commands/tickets/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/tickets/get.ts)_
1392
+ _See code: [src/commands/tickets/get.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/get.ts)_
1372
1393
 
1373
1394
  ## `chatbase tickets list`
1374
1395
 
@@ -1418,7 +1439,7 @@ EXAMPLES
1418
1439
  $ chatbase tickets list -a agt_123 --all --json
1419
1440
  ```
1420
1441
 
1421
- _See code: [src/commands/tickets/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/tickets/list.ts)_
1442
+ _See code: [src/commands/tickets/list.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/list.ts)_
1422
1443
 
1423
1444
  ## `chatbase tickets messages [TICKETNUMBER]`
1424
1445
 
@@ -1461,7 +1482,7 @@ EXAMPLES
1461
1482
  $ chatbase tickets messages 42 -a agt_123 --all --json
1462
1483
  ```
1463
1484
 
1464
- _See code: [src/commands/tickets/messages.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/tickets/messages.ts)_
1485
+ _See code: [src/commands/tickets/messages.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/messages.ts)_
1465
1486
 
1466
1487
  ## `chatbase tickets reply [TICKETNUMBER]`
1467
1488
 
@@ -1500,7 +1521,7 @@ EXAMPLES
1500
1521
  $ chatbase tickets reply 42 -m "On it" --author-email sam@example.com -a agt_123
1501
1522
  ```
1502
1523
 
1503
- _See code: [src/commands/tickets/reply.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/tickets/reply.ts)_
1524
+ _See code: [src/commands/tickets/reply.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/reply.ts)_
1504
1525
 
1505
1526
  ## `chatbase tickets search QUERY`
1506
1527
 
@@ -1536,7 +1557,7 @@ EXAMPLES
1536
1557
  $ chatbase tickets search "refund" -a agt_123 --limit 10 --json
1537
1558
  ```
1538
1559
 
1539
- _See code: [src/commands/tickets/search.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/tickets/search.ts)_
1560
+ _See code: [src/commands/tickets/search.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/search.ts)_
1540
1561
 
1541
1562
  ## `chatbase tickets update TICKETNUMBER`
1542
1563
 
@@ -1572,7 +1593,51 @@ EXAMPLES
1572
1593
  $ chatbase tickets update 42 --data '{"statusCategory":"closed"}' -a agt_123
1573
1594
  ```
1574
1595
 
1575
- _See code: [src/commands/tickets/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/tickets/update.ts)_
1596
+ _See code: [src/commands/tickets/update.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/tickets/update.ts)_
1597
+
1598
+ ## `chatbase voice start`
1599
+
1600
+ Start a voice session
1601
+
1602
+ ```
1603
+ USAGE
1604
+ $ chatbase voice start [--json] [--plain] [-q] [--verbose] [--no-input] [--no-color] [--agent-name <value> | -a
1605
+ <value>] [--conversation <value>] [--user <value>] [--timezone <value>]
1606
+
1607
+ FLAGS
1608
+ -a, --agent=<value> Agent ID (or set CHATBASE_AGENT_ID)
1609
+ -q, --quiet Suppress non-essential output
1610
+ --agent-name=<value> Agent display name (looked up to an ID)
1611
+ --conversation=<value> Conversation ID to reuse, grouping several sessions into one conversation (default: start
1612
+ a new conversation)
1613
+ --no-color Disable colored output
1614
+ --no-input Never prompt; fail instead
1615
+ --timezone=<value> [default: UTC] IANA timezone of the end user, used by the agent for time-aware answers
1616
+ --user=<value> Your end-user ID; send a stable value so per-user voice limits apply (default: generated
1617
+ per session)
1618
+ --verbose Verbose diagnostics
1619
+
1620
+ OUTPUT FLAGS
1621
+ --json Output raw API JSON
1622
+ --plain Tab-separated output for scripts
1623
+
1624
+ DESCRIPTION
1625
+ Start a voice session
1626
+
1627
+ Create a real-time voice session for an agent and print its credentials. Pass the response to the Chatbase Voice SDK
1628
+ (@chatbase-co/voice-sdk) in your client: the SDK connects, publishes the microphone, and the agent joins
1629
+ automatically. Requires a plan with voice mode enabled; voice minutes consume message credits. The participant token
1630
+ is abbreviated in the default output — use --json or --plain for the full value.
1631
+
1632
+ EXAMPLES
1633
+ $ chatbase voice start -a agt_123
1634
+
1635
+ $ chatbase voice start --user user_42 --timezone Europe/Paris -a agt_123
1636
+
1637
+ $ chatbase voice start --conversation 0b6a1f2e-7c3d-4a5b-8e9f-1a2b3c4d5e6f --json -a agt_123
1638
+ ```
1639
+
1640
+ _See code: [src/commands/voice/start.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/voice/start.ts)_
1576
1641
 
1577
1642
  ## `chatbase whatsapp send-template TEMPLATE`
1578
1643
 
@@ -1616,7 +1681,7 @@ EXAMPLES
1616
1681
  $ chatbase whatsapp send-template order_update --to 14155552671 --language en_US --variables '{"header":{"1":"#1042"},"body":{"1":"Jane","2":"Friday"}}' -a agt_123
1617
1682
  ```
1618
1683
 
1619
- _See code: [src/commands/whatsapp/send-template.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/whatsapp/send-template.ts)_
1684
+ _See code: [src/commands/whatsapp/send-template.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/whatsapp/send-template.ts)_
1620
1685
 
1621
1686
  ## `chatbase whatsapp templates`
1622
1687
 
@@ -1652,5 +1717,5 @@ EXAMPLES
1652
1717
  $ chatbase whatsapp templates -a agt_123 --json
1653
1718
  ```
1654
1719
 
1655
- _See code: [src/commands/whatsapp/templates.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.2.0/src/commands/whatsapp/templates.ts)_
1720
+ _See code: [src/commands/whatsapp/templates.ts](https://github.com/Chatbase-co/chatbase-cli/blob/v0.4.0/src/commands/whatsapp/templates.ts)_
1656
1721
  <!-- commandsstop -->
@@ -16,7 +16,10 @@ export default class ConversationsExport extends AgentCommand {
16
16
  'bubble/integration conversations).';
17
17
  static examples = [
18
18
  '<%= config.bin %> conversations export -a agt_123',
19
- '<%= config.bin %> conversations export -a agt_123 --all -o export.json'
19
+ '<%= config.bin %> conversations export -a agt_123 --all -o export.json',
20
+ '<%= config.bin %> conversations export -a agt_123 --start-date 2024-01-01 --end-date 2024-01-31',
21
+ '<%= config.bin %> conversations export -a agt_123 --include summary --source Widget,WhatsApp',
22
+ '<%= config.bin %> conversations export -a agt_123 --conversation conv_123'
20
23
  ];
21
24
  // Export is a data-export command, not a display one: it always emits
22
25
  // the raw API JSON, in both pretty and --json mode (--plain/--json are
@@ -39,14 +42,50 @@ export default class ConversationsExport extends AgentCommand {
39
42
  output: Flags.string({
40
43
  char: 'o',
41
44
  description: 'Write export JSON to a file instead of stdout'
45
+ }),
46
+ // The API owns the day-boundary semantics (a bare YYYY-MM-DD start is
47
+ // the beginning of that day, an end is the *end* of it) and rejects an
48
+ // inverted window with VALIDATION_INVALID_DATE_RANGE, so these pass
49
+ // through unparsed rather than half-reimplementing that rule here.
50
+ 'start-date': Flags.string({
51
+ description: 'Only conversations created at or after this YYYY-MM-DD date or ISO 8601 date-time'
52
+ }),
53
+ 'end-date': Flags.string({
54
+ description: 'Only conversations created at or before this YYYY-MM-DD date (inclusive) or ISO 8601 date-time'
55
+ }),
56
+ // Named --conversation to match `conversations get`, though the query
57
+ // param is conversationId.
58
+ conversation: Flags.string({
59
+ description: 'Export only this conversation ID, from any source (widget, API, WhatsApp, …)'
60
+ }),
61
+ include: Flags.string({
62
+ description: 'Whether to embed message bodies; summary omits them for a cheaper triage pass',
63
+ options: ['summary', 'messages']
64
+ }),
65
+ source: Flags.string({
66
+ description: 'Restrict to these conversation sources (comma-separated, e.g. "Widget or Iframe,WhatsApp"). Omit for all sources'
42
67
  })
43
68
  };
44
69
  async run() {
45
70
  const { flags } = await this.parse(ConversationsExport);
46
71
  const client = this.apiClient(flags);
47
72
  const agentId = await this.agentId(flags, client);
73
+ const extraQuery = {};
74
+ if (flags['start-date'])
75
+ extraQuery.startDate = flags['start-date'];
76
+ if (flags['end-date'])
77
+ extraQuery.endDate = flags['end-date'];
78
+ if (flags.conversation)
79
+ extraQuery.conversationId = flags.conversation;
80
+ if (flags.include)
81
+ extraQuery.include = flags.include;
82
+ if (flags.source)
83
+ extraQuery.source = flags.source;
48
84
  const { pages, items } = await fetchPages((query) => client.GET('/agents/{agentId}/conversations/export', {
49
- params: { path: { agentId }, query }
85
+ params: {
86
+ path: { agentId },
87
+ query: { ...query, ...extraQuery }
88
+ }
50
89
  }), { limit: flags.limit, cursor: flags.cursor, all: flags.all });
51
90
  const last = pages.at(-1);
52
91
  // Single page stays byte-for-byte the API's envelope; --all merges
@@ -1,6 +1,7 @@
1
1
  import { Flags } from '@oclif/core';
2
2
  import { ListCommand } from '../../base/list-command.js';
3
3
  import { fetchPages } from '../../client/paginate.js';
4
+ import { UsageError } from '../../errors/errors.js';
4
5
  import { formatEpochSeconds } from '../../output/render.js';
5
6
  const COLUMNS = [
6
7
  { key: 'id', header: 'ID' },
@@ -26,12 +27,23 @@ export default class ConversationsList extends ListCommand {
26
27
  static examples = [
27
28
  '<%= config.bin %> conversations list -a agt_123',
28
29
  '<%= config.bin %> conversations list -a agt_123 --user usr_456',
30
+ '<%= config.bin %> conversations list -a agt_123 --start-date 2024-01-01 --end-date 2024-01-31',
29
31
  '<%= config.bin %> conversations list -a agt_123 --all --json'
30
32
  ];
31
33
  static flags = {
32
34
  ...ListCommand.baseFlags,
33
35
  user: Flags.string({
34
36
  description: 'List conversations for a specific user (uses GET /users/{userId}/conversations)'
37
+ }),
38
+ // The API owns the day-boundary semantics (a bare YYYY-MM-DD start is
39
+ // the beginning of that day, an end is the *end* of it) and rejects an
40
+ // inverted window with VALIDATION_INVALID_DATE_RANGE, so these pass
41
+ // through unparsed rather than half-reimplementing that rule here.
42
+ 'start-date': Flags.string({
43
+ description: 'Only conversations created at or after this YYYY-MM-DD date or ISO 8601 date-time'
44
+ }),
45
+ 'end-date': Flags.string({
46
+ description: 'Only conversations created at or before this YYYY-MM-DD date (inclusive) or ISO 8601 date-time'
35
47
  })
36
48
  };
37
49
  async run() {
@@ -41,13 +53,24 @@ export default class ConversationsList extends ListCommand {
41
53
  const fetcherPath = flags.user
42
54
  ? '/agents/{agentId}/users/{userId}/conversations'
43
55
  : '/agents/{agentId}/conversations';
56
+ // The per-user endpoint takes only cursor/limit. Sending a date window
57
+ // there would be dropped server-side and quietly return the unfiltered
58
+ // list, so refuse instead of returning a wrong answer.
59
+ if (flags.user && (flags['start-date'] || flags['end-date'])) {
60
+ throw new UsageError('--start-date/--end-date are not supported with --user. Drop --user to filter by date, then filter the results by userId.');
61
+ }
62
+ const extraQuery = {};
63
+ if (flags['start-date'])
64
+ extraQuery.startDate = flags['start-date'];
65
+ if (flags['end-date'])
66
+ extraQuery.endDate = flags['end-date'];
44
67
  const { pages, items } = await fetchPages((query) => client.GET(fetcherPath, {
45
68
  params: {
46
69
  path: {
47
70
  agentId,
48
71
  ...(flags.user ? { userId: flags.user } : {})
49
72
  },
50
- query
73
+ query: { ...query, ...extraQuery }
51
74
  }
52
75
  }), { limit: flags.limit, cursor: flags.cursor, all: flags.all });
53
76
  // Humans read ISO dates; --plain keeps the raw epoch for scripts.