@respan/cli 0.13.3 → 0.14.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.
@@ -264,16 +264,16 @@
264
264
  "status.js"
265
265
  ]
266
266
  },
267
- "config:get": {
267
+ "collector:config": {
268
268
  "aliases": [],
269
- "args": {
270
- "key": {
271
- "description": "Config key",
272
- "name": "key",
273
- "required": true
274
- }
275
- },
276
- "description": "Get a configuration value",
269
+ "args": {},
270
+ "description": "Write the Respan collector configuration.\n\nThe Respan collector is the upstream OpenTelemetry Collector (contrib\n0.160.0) with a config that receives OTLP/HTTP from the Respan SDKs\non localhost and forwards it to Respan through a bounded, persistent\n(write-ahead-log) queue — spans survive Respan outages and collector\nrestarts without unbounded local growth.\n\nThe written file never contains your API key: it reads RESPAN_API_KEY from\nthe environment. Use \"respan collector start\" to run it, or run\notelcol-contrib yourself with --config <file>.",
271
+ "examples": [
272
+ "respan collector config",
273
+ "respan collector config --print",
274
+ "respan collector config --output ./collector.yaml --max-size-mib 1024",
275
+ "respan collector config --export-url https://respan.internal/api/v2/traces"
276
+ ],
277
277
  "flags": {
278
278
  "api-key": {
279
279
  "description": "API key (env: RESPAN_API_KEY)",
@@ -315,11 +315,63 @@
315
315
  "name": "verbose",
316
316
  "allowNo": false,
317
317
  "type": "boolean"
318
+ },
319
+ "export-url": {
320
+ "description": "Respan ingest URL (default: <base URL>/api/v2/traces from your auth config)",
321
+ "env": "RESPAN_COLLECTOR_EXPORT_URL",
322
+ "name": "export-url",
323
+ "hasDynamicHelp": false,
324
+ "multiple": false,
325
+ "type": "option"
326
+ },
327
+ "data-dir": {
328
+ "description": "Persistent queue directory, binary mode only (default: ~/.respan/collector/data)",
329
+ "name": "data-dir",
330
+ "hasDynamicHelp": false,
331
+ "multiple": false,
332
+ "type": "option"
333
+ },
334
+ "max-size-mib": {
335
+ "description": "Disk cap for the persistent queue in MiB (minimum 100)",
336
+ "name": "max-size-mib",
337
+ "default": 512,
338
+ "hasDynamicHelp": false,
339
+ "multiple": false,
340
+ "type": "option"
341
+ },
342
+ "queue-size": {
343
+ "description": "Batches kept while Respan is unreachable",
344
+ "name": "queue-size",
345
+ "default": 10000,
346
+ "hasDynamicHelp": false,
347
+ "multiple": false,
348
+ "type": "option"
349
+ },
350
+ "port": {
351
+ "description": "Local OTLP/HTTP port the SDKs send to",
352
+ "name": "port",
353
+ "default": 4318,
354
+ "hasDynamicHelp": false,
355
+ "multiple": false,
356
+ "type": "option"
357
+ },
358
+ "output": {
359
+ "description": "Where to write the config (default: ~/.respan/collector/config.yaml)",
360
+ "name": "output",
361
+ "hasDynamicHelp": false,
362
+ "multiple": false,
363
+ "type": "option"
364
+ },
365
+ "print": {
366
+ "description": "Print the config to stdout instead of writing it",
367
+ "name": "print",
368
+ "allowNo": false,
369
+ "type": "boolean"
318
370
  }
319
371
  },
320
372
  "hasDynamicHelp": false,
321
373
  "hiddenAliases": [],
322
- "id": "config:get",
374
+ "id": "collector:config",
323
375
  "pluginAlias": "@respan/cli",
324
376
  "pluginName": "@respan/cli",
325
377
  "pluginType": "core",
@@ -329,14 +381,21 @@
329
381
  "relativePath": [
330
382
  "dist",
331
383
  "commands",
332
- "config",
333
- "get.js"
384
+ "collector",
385
+ "config.js"
334
386
  ]
335
387
  },
336
- "config:list": {
388
+ "collector:start": {
337
389
  "aliases": [],
338
390
  "args": {},
339
- "description": "List all configuration",
391
+ "description": "Start a local Respan collector.\n\nRuns the OpenTelemetry Collector (contrib) with the Respan config: the SDKs\nsend to http://127.0.0.1:4318, and the collector forwards to Respan through\na bounded, persistent queue so traces survive outages and restarts.\n\nModes:\n --docker docker run otel/opentelemetry-collector-contrib with the queue in\n the respan-collector-queue volume (default when Docker is available)\n --binary download otelcol-contrib to ~/.respan/collector/bin and run it\n detached, logging to ~/.respan/collector/collector.log\n\nThe API key is passed to the collector through its environment only; the\nconfig file never contains it.",
392
+ "examples": [
393
+ "respan collector start",
394
+ "respan collector start --binary",
395
+ "respan collector start --docker --max-size-mib 1024 --queue-size 20000",
396
+ "respan collector start --export-url https://respan.internal/api/v2/traces",
397
+ "respan collector start --dry-run"
398
+ ],
340
399
  "flags": {
341
400
  "api-key": {
342
401
  "description": "API key (env: RESPAN_API_KEY)",
@@ -378,11 +437,74 @@
378
437
  "name": "verbose",
379
438
  "allowNo": false,
380
439
  "type": "boolean"
440
+ },
441
+ "docker": {
442
+ "description": "Use the Docker container (default when Docker is available)",
443
+ "exclusive": [
444
+ "binary"
445
+ ],
446
+ "name": "docker",
447
+ "allowNo": false,
448
+ "type": "boolean"
449
+ },
450
+ "binary": {
451
+ "description": "Use the otelcol-contrib binary in ~/.respan/collector/bin",
452
+ "exclusive": [
453
+ "docker"
454
+ ],
455
+ "name": "binary",
456
+ "allowNo": false,
457
+ "type": "boolean"
458
+ },
459
+ "export-url": {
460
+ "description": "Respan ingest URL (default: <base URL>/api/v2/traces from your auth config)",
461
+ "env": "RESPAN_COLLECTOR_EXPORT_URL",
462
+ "name": "export-url",
463
+ "hasDynamicHelp": false,
464
+ "multiple": false,
465
+ "type": "option"
466
+ },
467
+ "data-dir": {
468
+ "description": "Persistent queue directory, binary mode only (default: ~/.respan/collector/data)",
469
+ "name": "data-dir",
470
+ "hasDynamicHelp": false,
471
+ "multiple": false,
472
+ "type": "option"
473
+ },
474
+ "max-size-mib": {
475
+ "description": "Disk cap for the persistent queue in MiB (minimum 100)",
476
+ "name": "max-size-mib",
477
+ "default": 512,
478
+ "hasDynamicHelp": false,
479
+ "multiple": false,
480
+ "type": "option"
481
+ },
482
+ "queue-size": {
483
+ "description": "Batches kept while Respan is unreachable",
484
+ "name": "queue-size",
485
+ "default": 10000,
486
+ "hasDynamicHelp": false,
487
+ "multiple": false,
488
+ "type": "option"
489
+ },
490
+ "port": {
491
+ "description": "Local OTLP/HTTP port the SDKs send to",
492
+ "name": "port",
493
+ "default": 4318,
494
+ "hasDynamicHelp": false,
495
+ "multiple": false,
496
+ "type": "option"
497
+ },
498
+ "dry-run": {
499
+ "description": "Show what would be done without starting anything",
500
+ "name": "dry-run",
501
+ "allowNo": false,
502
+ "type": "boolean"
381
503
  }
382
504
  },
383
505
  "hasDynamicHelp": false,
384
506
  "hiddenAliases": [],
385
- "id": "config:list",
507
+ "id": "collector:start",
386
508
  "pluginAlias": "@respan/cli",
387
509
  "pluginName": "@respan/cli",
388
510
  "pluginType": "core",
@@ -392,25 +514,18 @@
392
514
  "relativePath": [
393
515
  "dist",
394
516
  "commands",
395
- "config",
396
- "list.js"
517
+ "collector",
518
+ "start.js"
397
519
  ]
398
520
  },
399
- "config:set": {
521
+ "collector:status": {
400
522
  "aliases": [],
401
- "args": {
402
- "key": {
403
- "description": "Config key",
404
- "name": "key",
405
- "required": true
406
- },
407
- "value": {
408
- "description": "Config value",
409
- "name": "value",
410
- "required": true
411
- }
412
- },
413
- "description": "Set a configuration value",
523
+ "args": {},
524
+ "description": "Show the local Respan collector's health and queue.\n\nReports how the collector is running (Docker container or binary), the\nhealth_check result, and the exporter metrics that matter for delivery:\nqueued batches, spans sent, spans dropped because the queue was full\n(enqueue-failed) and spans rejected by Respan (send-failed).",
525
+ "examples": [
526
+ "respan collector status",
527
+ "respan collector status --json"
528
+ ],
414
529
  "flags": {
415
530
  "api-key": {
416
531
  "description": "API key (env: RESPAN_API_KEY)",
@@ -452,11 +567,37 @@
452
567
  "name": "verbose",
453
568
  "allowNo": false,
454
569
  "type": "boolean"
570
+ },
571
+ "docker": {
572
+ "description": "Use the Docker container (default when Docker is available)",
573
+ "exclusive": [
574
+ "binary"
575
+ ],
576
+ "name": "docker",
577
+ "allowNo": false,
578
+ "type": "boolean"
579
+ },
580
+ "binary": {
581
+ "description": "Use the otelcol-contrib binary in ~/.respan/collector/bin",
582
+ "exclusive": [
583
+ "docker"
584
+ ],
585
+ "name": "binary",
586
+ "allowNo": false,
587
+ "type": "boolean"
588
+ },
589
+ "port": {
590
+ "description": "Local OTLP/HTTP port used in the SDK hint",
591
+ "name": "port",
592
+ "default": 4318,
593
+ "hasDynamicHelp": false,
594
+ "multiple": false,
595
+ "type": "option"
455
596
  }
456
597
  },
457
598
  "hasDynamicHelp": false,
458
599
  "hiddenAliases": [],
459
- "id": "config:set",
600
+ "id": "collector:status",
460
601
  "pluginAlias": "@respan/cli",
461
602
  "pluginName": "@respan/cli",
462
603
  "pluginType": "core",
@@ -466,20 +607,18 @@
466
607
  "relativePath": [
467
608
  "dist",
468
609
  "commands",
469
- "config",
470
- "set.js"
610
+ "collector",
611
+ "status.js"
471
612
  ]
472
613
  },
473
- "datasets:create-span": {
614
+ "collector:stop": {
474
615
  "aliases": [],
475
- "args": {
476
- "dataset-id": {
477
- "description": "Dataset ID",
478
- "name": "dataset-id",
479
- "required": true
480
- }
481
- },
482
- "description": "Create a span in a dataset",
616
+ "args": {},
617
+ "description": "Stop the local Respan collector.\n\nRemoves the respan-collector container or stops the detached binary. Spans\nstill queued on disk are kept and delivered the next time the collector\nstarts; pass --purge --yes to delete them.",
618
+ "examples": [
619
+ "respan collector stop",
620
+ "respan collector stop --purge --yes"
621
+ ],
483
622
  "flags": {
484
623
  "api-key": {
485
624
  "description": "API key (env: RESPAN_API_KEY)",
@@ -522,18 +661,40 @@
522
661
  "allowNo": false,
523
662
  "type": "boolean"
524
663
  },
525
- "body": {
526
- "description": "Span body as JSON string",
527
- "name": "body",
528
- "required": true,
529
- "hasDynamicHelp": false,
530
- "multiple": false,
531
- "type": "option"
664
+ "docker": {
665
+ "description": "Use the Docker container (default when Docker is available)",
666
+ "exclusive": [
667
+ "binary"
668
+ ],
669
+ "name": "docker",
670
+ "allowNo": false,
671
+ "type": "boolean"
672
+ },
673
+ "binary": {
674
+ "description": "Use the otelcol-contrib binary in ~/.respan/collector/bin",
675
+ "exclusive": [
676
+ "docker"
677
+ ],
678
+ "name": "binary",
679
+ "allowNo": false,
680
+ "type": "boolean"
681
+ },
682
+ "purge": {
683
+ "description": "Also delete the queued data (the respan-collector-queue volume / data dir). Requires --yes",
684
+ "name": "purge",
685
+ "allowNo": false,
686
+ "type": "boolean"
687
+ },
688
+ "yes": {
689
+ "description": "Confirm deleting queued spans with --purge",
690
+ "name": "yes",
691
+ "allowNo": false,
692
+ "type": "boolean"
532
693
  }
533
694
  },
534
695
  "hasDynamicHelp": false,
535
696
  "hiddenAliases": [],
536
- "id": "datasets:create-span",
697
+ "id": "collector:stop",
537
698
  "pluginAlias": "@respan/cli",
538
699
  "pluginName": "@respan/cli",
539
700
  "pluginType": "core",
@@ -543,14 +704,20 @@
543
704
  "relativePath": [
544
705
  "dist",
545
706
  "commands",
546
- "datasets",
547
- "create-span.js"
707
+ "collector",
708
+ "stop.js"
548
709
  ]
549
710
  },
550
- "datasets:create": {
711
+ "config:get": {
551
712
  "aliases": [],
552
- "args": {},
553
- "description": "Create a new dataset",
713
+ "args": {
714
+ "key": {
715
+ "description": "Config key",
716
+ "name": "key",
717
+ "required": true
718
+ }
719
+ },
720
+ "description": "Get a configuration value",
554
721
  "flags": {
555
722
  "api-key": {
556
723
  "description": "API key (env: RESPAN_API_KEY)",
@@ -592,26 +759,11 @@
592
759
  "name": "verbose",
593
760
  "allowNo": false,
594
761
  "type": "boolean"
595
- },
596
- "name": {
597
- "description": "Dataset name",
598
- "name": "name",
599
- "required": true,
600
- "hasDynamicHelp": false,
601
- "multiple": false,
602
- "type": "option"
603
- },
604
- "description": {
605
- "description": "Dataset description",
606
- "name": "description",
607
- "hasDynamicHelp": false,
608
- "multiple": false,
609
- "type": "option"
610
762
  }
611
763
  },
612
764
  "hasDynamicHelp": false,
613
765
  "hiddenAliases": [],
614
- "id": "datasets:create",
766
+ "id": "config:get",
615
767
  "pluginAlias": "@respan/cli",
616
768
  "pluginName": "@respan/cli",
617
769
  "pluginType": "core",
@@ -621,25 +773,14 @@
621
773
  "relativePath": [
622
774
  "dist",
623
775
  "commands",
624
- "datasets",
625
- "create.js"
776
+ "config",
777
+ "get.js"
626
778
  ]
627
779
  },
628
- "datasets:get-span": {
780
+ "config:list": {
629
781
  "aliases": [],
630
- "args": {
631
- "dataset-id": {
632
- "description": "Dataset ID",
633
- "name": "dataset-id",
634
- "required": true
635
- },
636
- "span-id": {
637
- "description": "Span ID",
638
- "name": "span-id",
639
- "required": true
640
- }
641
- },
642
- "description": "Get a specific span from a dataset",
782
+ "args": {},
783
+ "description": "List all configuration",
643
784
  "flags": {
644
785
  "api-key": {
645
786
  "description": "API key (env: RESPAN_API_KEY)",
@@ -685,7 +826,7 @@
685
826
  },
686
827
  "hasDynamicHelp": false,
687
828
  "hiddenAliases": [],
688
- "id": "datasets:get-span",
829
+ "id": "config:list",
689
830
  "pluginAlias": "@respan/cli",
690
831
  "pluginName": "@respan/cli",
691
832
  "pluginType": "core",
@@ -695,20 +836,25 @@
695
836
  "relativePath": [
696
837
  "dist",
697
838
  "commands",
698
- "datasets",
699
- "get-span.js"
839
+ "config",
840
+ "list.js"
700
841
  ]
701
842
  },
702
- "datasets:get": {
843
+ "config:set": {
703
844
  "aliases": [],
704
845
  "args": {
705
- "id": {
706
- "description": "Dataset ID",
707
- "name": "id",
846
+ "key": {
847
+ "description": "Config key",
848
+ "name": "key",
849
+ "required": true
850
+ },
851
+ "value": {
852
+ "description": "Config value",
853
+ "name": "value",
708
854
  "required": true
709
855
  }
710
856
  },
711
- "description": "Get a specific dataset",
857
+ "description": "Set a configuration value",
712
858
  "flags": {
713
859
  "api-key": {
714
860
  "description": "API key (env: RESPAN_API_KEY)",
@@ -754,7 +900,7 @@
754
900
  },
755
901
  "hasDynamicHelp": false,
756
902
  "hiddenAliases": [],
757
- "id": "datasets:get",
903
+ "id": "config:set",
758
904
  "pluginAlias": "@respan/cli",
759
905
  "pluginName": "@respan/cli",
760
906
  "pluginType": "core",
@@ -764,14 +910,20 @@
764
910
  "relativePath": [
765
911
  "dist",
766
912
  "commands",
767
- "datasets",
768
- "get.js"
913
+ "config",
914
+ "set.js"
769
915
  ]
770
916
  },
771
- "datasets:list": {
917
+ "datasets:create-span": {
772
918
  "aliases": [],
773
- "args": {},
774
- "description": "List datasets",
919
+ "args": {
920
+ "dataset-id": {
921
+ "description": "Dataset ID",
922
+ "name": "dataset-id",
923
+ "required": true
924
+ }
925
+ },
926
+ "description": "Create a span in a dataset",
775
927
  "flags": {
776
928
  "api-key": {
777
929
  "description": "API key (env: RESPAN_API_KEY)",
@@ -814,18 +966,10 @@
814
966
  "allowNo": false,
815
967
  "type": "boolean"
816
968
  },
817
- "limit": {
818
- "description": "Number of results per page",
819
- "name": "limit",
820
- "default": 50,
821
- "hasDynamicHelp": false,
822
- "multiple": false,
823
- "type": "option"
824
- },
825
- "page": {
826
- "description": "Page number",
827
- "name": "page",
828
- "default": 1,
969
+ "body": {
970
+ "description": "Span body as JSON string",
971
+ "name": "body",
972
+ "required": true,
829
973
  "hasDynamicHelp": false,
830
974
  "multiple": false,
831
975
  "type": "option"
@@ -833,7 +977,7 @@
833
977
  },
834
978
  "hasDynamicHelp": false,
835
979
  "hiddenAliases": [],
836
- "id": "datasets:list",
980
+ "id": "datasets:create-span",
837
981
  "pluginAlias": "@respan/cli",
838
982
  "pluginName": "@respan/cli",
839
983
  "pluginType": "core",
@@ -844,19 +988,13 @@
844
988
  "dist",
845
989
  "commands",
846
990
  "datasets",
847
- "list.js"
991
+ "create-span.js"
848
992
  ]
849
993
  },
850
- "datasets:spans": {
994
+ "datasets:create": {
851
995
  "aliases": [],
852
- "args": {
853
- "dataset-id": {
854
- "description": "Dataset ID",
855
- "name": "dataset-id",
856
- "required": true
857
- }
858
- },
859
- "description": "List spans in a dataset",
996
+ "args": {},
997
+ "description": "Create a new dataset",
860
998
  "flags": {
861
999
  "api-key": {
862
1000
  "description": "API key (env: RESPAN_API_KEY)",
@@ -898,11 +1036,26 @@
898
1036
  "name": "verbose",
899
1037
  "allowNo": false,
900
1038
  "type": "boolean"
1039
+ },
1040
+ "name": {
1041
+ "description": "Dataset name",
1042
+ "name": "name",
1043
+ "required": true,
1044
+ "hasDynamicHelp": false,
1045
+ "multiple": false,
1046
+ "type": "option"
1047
+ },
1048
+ "description": {
1049
+ "description": "Dataset description",
1050
+ "name": "description",
1051
+ "hasDynamicHelp": false,
1052
+ "multiple": false,
1053
+ "type": "option"
901
1054
  }
902
1055
  },
903
1056
  "hasDynamicHelp": false,
904
1057
  "hiddenAliases": [],
905
- "id": "datasets:spans",
1058
+ "id": "datasets:create",
906
1059
  "pluginAlias": "@respan/cli",
907
1060
  "pluginName": "@respan/cli",
908
1061
  "pluginType": "core",
@@ -913,19 +1066,24 @@
913
1066
  "dist",
914
1067
  "commands",
915
1068
  "datasets",
916
- "spans.js"
1069
+ "create.js"
917
1070
  ]
918
1071
  },
919
- "datasets:update": {
1072
+ "datasets:get-span": {
920
1073
  "aliases": [],
921
1074
  "args": {
922
- "id": {
1075
+ "dataset-id": {
923
1076
  "description": "Dataset ID",
924
- "name": "id",
1077
+ "name": "dataset-id",
1078
+ "required": true
1079
+ },
1080
+ "span-id": {
1081
+ "description": "Span ID",
1082
+ "name": "span-id",
925
1083
  "required": true
926
1084
  }
927
1085
  },
928
- "description": "Update a dataset",
1086
+ "description": "Get a specific span from a dataset",
929
1087
  "flags": {
930
1088
  "api-key": {
931
1089
  "description": "API key (env: RESPAN_API_KEY)",
@@ -967,25 +1125,11 @@
967
1125
  "name": "verbose",
968
1126
  "allowNo": false,
969
1127
  "type": "boolean"
970
- },
971
- "name": {
972
- "description": "Dataset name",
973
- "name": "name",
974
- "hasDynamicHelp": false,
975
- "multiple": false,
976
- "type": "option"
977
- },
978
- "description": {
979
- "description": "Dataset description",
980
- "name": "description",
981
- "hasDynamicHelp": false,
982
- "multiple": false,
983
- "type": "option"
984
1128
  }
985
1129
  },
986
1130
  "hasDynamicHelp": false,
987
1131
  "hiddenAliases": [],
988
- "id": "datasets:update",
1132
+ "id": "datasets:get-span",
989
1133
  "pluginAlias": "@respan/cli",
990
1134
  "pluginName": "@respan/cli",
991
1135
  "pluginType": "core",
@@ -996,17 +1140,19 @@
996
1140
  "dist",
997
1141
  "commands",
998
1142
  "datasets",
999
- "update.js"
1143
+ "get-span.js"
1000
1144
  ]
1001
1145
  },
1002
- "demo:clear": {
1146
+ "datasets:get": {
1003
1147
  "aliases": [],
1004
- "args": {},
1005
- "description": "Delete the sample prompts, datasets, and evaluators created by `respan demo`. Demo traces are left in place (each run is timestamped history). Idempotent — safe to re-run.",
1006
- "examples": [
1007
- "<%= config.bin %> demo clear",
1008
- "<%= config.bin %> demo clear --yes"
1009
- ],
1148
+ "args": {
1149
+ "id": {
1150
+ "description": "Dataset ID",
1151
+ "name": "id",
1152
+ "required": true
1153
+ }
1154
+ },
1155
+ "description": "Get a specific dataset",
1010
1156
  "flags": {
1011
1157
  "api-key": {
1012
1158
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1048,18 +1194,11 @@
1048
1194
  "name": "verbose",
1049
1195
  "allowNo": false,
1050
1196
  "type": "boolean"
1051
- },
1052
- "yes": {
1053
- "char": "y",
1054
- "description": "Skip the confirmation prompt",
1055
- "name": "yes",
1056
- "allowNo": false,
1057
- "type": "boolean"
1058
1197
  }
1059
1198
  },
1060
1199
  "hasDynamicHelp": false,
1061
1200
  "hiddenAliases": [],
1062
- "id": "demo:clear",
1201
+ "id": "datasets:get",
1063
1202
  "pluginAlias": "@respan/cli",
1064
1203
  "pluginName": "@respan/cli",
1065
1204
  "pluginType": "core",
@@ -1069,17 +1208,14 @@
1069
1208
  "relativePath": [
1070
1209
  "dist",
1071
1210
  "commands",
1072
- "demo",
1073
- "clear.js"
1211
+ "datasets",
1212
+ "get.js"
1074
1213
  ]
1075
1214
  },
1076
- "demo": {
1215
+ "datasets:list": {
1077
1216
  "aliases": [],
1078
1217
  "args": {},
1079
- "description": "Seed your account with sample data (prompts and traces) so you have something to explore. Idempotent — safe to re-run.",
1080
- "examples": [
1081
- "<%= config.bin %> demo"
1082
- ],
1218
+ "description": "List datasets",
1083
1219
  "flags": {
1084
1220
  "api-key": {
1085
1221
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1121,11 +1257,27 @@
1121
1257
  "name": "verbose",
1122
1258
  "allowNo": false,
1123
1259
  "type": "boolean"
1260
+ },
1261
+ "limit": {
1262
+ "description": "Number of results per page",
1263
+ "name": "limit",
1264
+ "default": 50,
1265
+ "hasDynamicHelp": false,
1266
+ "multiple": false,
1267
+ "type": "option"
1268
+ },
1269
+ "page": {
1270
+ "description": "Page number",
1271
+ "name": "page",
1272
+ "default": 1,
1273
+ "hasDynamicHelp": false,
1274
+ "multiple": false,
1275
+ "type": "option"
1124
1276
  }
1125
1277
  },
1126
1278
  "hasDynamicHelp": false,
1127
1279
  "hiddenAliases": [],
1128
- "id": "demo",
1280
+ "id": "datasets:list",
1129
1281
  "pluginAlias": "@respan/cli",
1130
1282
  "pluginName": "@respan/cli",
1131
1283
  "pluginType": "core",
@@ -1135,20 +1287,20 @@
1135
1287
  "relativePath": [
1136
1288
  "dist",
1137
1289
  "commands",
1138
- "demo",
1139
- "index.js"
1290
+ "datasets",
1291
+ "list.js"
1140
1292
  ]
1141
1293
  },
1142
- "eval": {
1294
+ "datasets:spans": {
1143
1295
  "aliases": [],
1144
1296
  "args": {
1145
- "file": {
1146
- "description": "Path to eval JSON file",
1147
- "name": "file",
1297
+ "dataset-id": {
1298
+ "description": "Dataset ID",
1299
+ "name": "dataset-id",
1148
1300
  "required": true
1149
1301
  }
1150
1302
  },
1151
- "description": "Run an eval defined in a JSON file (creates prompt + dataset on the platform)",
1303
+ "description": "List spans in a dataset",
1152
1304
  "flags": {
1153
1305
  "api-key": {
1154
1306
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1194,7 +1346,7 @@
1194
1346
  },
1195
1347
  "hasDynamicHelp": false,
1196
1348
  "hiddenAliases": [],
1197
- "id": "eval",
1349
+ "id": "datasets:spans",
1198
1350
  "pluginAlias": "@respan/cli",
1199
1351
  "pluginName": "@respan/cli",
1200
1352
  "pluginType": "core",
@@ -1204,14 +1356,20 @@
1204
1356
  "relativePath": [
1205
1357
  "dist",
1206
1358
  "commands",
1207
- "eval",
1208
- "index.js"
1359
+ "datasets",
1360
+ "spans.js"
1209
1361
  ]
1210
1362
  },
1211
- "evaluators:create": {
1363
+ "datasets:update": {
1212
1364
  "aliases": [],
1213
- "args": {},
1214
- "description": "Create a new evaluator",
1365
+ "args": {
1366
+ "id": {
1367
+ "description": "Dataset ID",
1368
+ "name": "id",
1369
+ "required": true
1370
+ }
1371
+ },
1372
+ "description": "Update a dataset",
1215
1373
  "flags": {
1216
1374
  "api-key": {
1217
1375
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1255,38 +1413,23 @@
1255
1413
  "type": "boolean"
1256
1414
  },
1257
1415
  "name": {
1258
- "description": "Evaluator name",
1416
+ "description": "Dataset name",
1259
1417
  "name": "name",
1260
- "required": true,
1261
- "hasDynamicHelp": false,
1262
- "multiple": false,
1263
- "type": "option"
1264
- },
1265
- "type": {
1266
- "description": "Evaluator type",
1267
- "name": "type",
1268
1418
  "hasDynamicHelp": false,
1269
1419
  "multiple": false,
1270
1420
  "type": "option"
1271
1421
  },
1272
1422
  "description": {
1273
- "description": "Evaluator description",
1423
+ "description": "Dataset description",
1274
1424
  "name": "description",
1275
1425
  "hasDynamicHelp": false,
1276
1426
  "multiple": false,
1277
1427
  "type": "option"
1278
- },
1279
- "config": {
1280
- "description": "Evaluator config as JSON string",
1281
- "name": "config",
1282
- "hasDynamicHelp": false,
1283
- "multiple": false,
1284
- "type": "option"
1285
1428
  }
1286
1429
  },
1287
1430
  "hasDynamicHelp": false,
1288
1431
  "hiddenAliases": [],
1289
- "id": "evaluators:create",
1432
+ "id": "datasets:update",
1290
1433
  "pluginAlias": "@respan/cli",
1291
1434
  "pluginName": "@respan/cli",
1292
1435
  "pluginType": "core",
@@ -1296,20 +1439,18 @@
1296
1439
  "relativePath": [
1297
1440
  "dist",
1298
1441
  "commands",
1299
- "evaluators",
1300
- "create.js"
1442
+ "datasets",
1443
+ "update.js"
1301
1444
  ]
1302
1445
  },
1303
- "evaluators:get": {
1446
+ "demo:clear": {
1304
1447
  "aliases": [],
1305
- "args": {
1306
- "id": {
1307
- "description": "Evaluator ID",
1308
- "name": "id",
1309
- "required": true
1310
- }
1311
- },
1312
- "description": "Get a specific evaluator",
1448
+ "args": {},
1449
+ "description": "Delete the sample prompts, datasets, and evaluators created by `respan demo`. Demo traces are left in place (each run is timestamped history). Idempotent — safe to re-run.",
1450
+ "examples": [
1451
+ "<%= config.bin %> demo clear",
1452
+ "<%= config.bin %> demo clear --yes"
1453
+ ],
1313
1454
  "flags": {
1314
1455
  "api-key": {
1315
1456
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1351,11 +1492,18 @@
1351
1492
  "name": "verbose",
1352
1493
  "allowNo": false,
1353
1494
  "type": "boolean"
1495
+ },
1496
+ "yes": {
1497
+ "char": "y",
1498
+ "description": "Skip the confirmation prompt",
1499
+ "name": "yes",
1500
+ "allowNo": false,
1501
+ "type": "boolean"
1354
1502
  }
1355
1503
  },
1356
1504
  "hasDynamicHelp": false,
1357
1505
  "hiddenAliases": [],
1358
- "id": "evaluators:get",
1506
+ "id": "demo:clear",
1359
1507
  "pluginAlias": "@respan/cli",
1360
1508
  "pluginName": "@respan/cli",
1361
1509
  "pluginType": "core",
@@ -1365,14 +1513,17 @@
1365
1513
  "relativePath": [
1366
1514
  "dist",
1367
1515
  "commands",
1368
- "evaluators",
1369
- "get.js"
1516
+ "demo",
1517
+ "clear.js"
1370
1518
  ]
1371
1519
  },
1372
- "evaluators:list": {
1520
+ "demo": {
1373
1521
  "aliases": [],
1374
1522
  "args": {},
1375
- "description": "List evaluators",
1523
+ "description": "Seed your account with sample data (prompts and traces) so you have something to explore. Idempotent — safe to re-run.",
1524
+ "examples": [
1525
+ "<%= config.bin %> demo"
1526
+ ],
1376
1527
  "flags": {
1377
1528
  "api-key": {
1378
1529
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1414,27 +1565,11 @@
1414
1565
  "name": "verbose",
1415
1566
  "allowNo": false,
1416
1567
  "type": "boolean"
1417
- },
1418
- "limit": {
1419
- "description": "Number of results per page",
1420
- "name": "limit",
1421
- "default": 20,
1422
- "hasDynamicHelp": false,
1423
- "multiple": false,
1424
- "type": "option"
1425
- },
1426
- "page": {
1427
- "description": "Page number",
1428
- "name": "page",
1429
- "default": 1,
1430
- "hasDynamicHelp": false,
1431
- "multiple": false,
1432
- "type": "option"
1433
1568
  }
1434
1569
  },
1435
1570
  "hasDynamicHelp": false,
1436
1571
  "hiddenAliases": [],
1437
- "id": "evaluators:list",
1572
+ "id": "demo",
1438
1573
  "pluginAlias": "@respan/cli",
1439
1574
  "pluginName": "@respan/cli",
1440
1575
  "pluginType": "core",
@@ -1444,20 +1579,260 @@
1444
1579
  "relativePath": [
1445
1580
  "dist",
1446
1581
  "commands",
1447
- "evaluators",
1448
- "list.js"
1582
+ "demo",
1583
+ "index.js"
1449
1584
  ]
1450
1585
  },
1451
- "evaluators:run": {
1586
+ "evaluators:create": {
1452
1587
  "aliases": [],
1453
- "args": {
1454
- "id": {
1455
- "description": "Evaluator ID",
1456
- "name": "id",
1457
- "required": true
1458
- }
1459
- },
1460
- "description": "Run an evaluator",
1588
+ "args": {},
1589
+ "description": "Create a new evaluator",
1590
+ "flags": {
1591
+ "api-key": {
1592
+ "description": "API key (env: RESPAN_API_KEY)",
1593
+ "env": "RESPAN_API_KEY",
1594
+ "name": "api-key",
1595
+ "hasDynamicHelp": false,
1596
+ "multiple": false,
1597
+ "type": "option"
1598
+ },
1599
+ "base-url": {
1600
+ "description": "Temporary API base URL override for this command",
1601
+ "name": "base-url",
1602
+ "hasDynamicHelp": false,
1603
+ "multiple": false,
1604
+ "type": "option"
1605
+ },
1606
+ "profile": {
1607
+ "description": "Named profile to use",
1608
+ "name": "profile",
1609
+ "hasDynamicHelp": false,
1610
+ "multiple": false,
1611
+ "type": "option"
1612
+ },
1613
+ "json": {
1614
+ "description": "Output as JSON",
1615
+ "name": "json",
1616
+ "allowNo": false,
1617
+ "type": "boolean"
1618
+ },
1619
+ "csv": {
1620
+ "description": "Output as CSV",
1621
+ "name": "csv",
1622
+ "allowNo": false,
1623
+ "type": "boolean"
1624
+ },
1625
+ "verbose": {
1626
+ "char": "v",
1627
+ "description": "Show verbose output",
1628
+ "name": "verbose",
1629
+ "allowNo": false,
1630
+ "type": "boolean"
1631
+ },
1632
+ "name": {
1633
+ "description": "Evaluator name",
1634
+ "name": "name",
1635
+ "required": true,
1636
+ "hasDynamicHelp": false,
1637
+ "multiple": false,
1638
+ "type": "option"
1639
+ },
1640
+ "type": {
1641
+ "description": "Evaluator type",
1642
+ "name": "type",
1643
+ "hasDynamicHelp": false,
1644
+ "multiple": false,
1645
+ "type": "option"
1646
+ },
1647
+ "description": {
1648
+ "description": "Evaluator description",
1649
+ "name": "description",
1650
+ "hasDynamicHelp": false,
1651
+ "multiple": false,
1652
+ "type": "option"
1653
+ },
1654
+ "config": {
1655
+ "description": "Evaluator config as JSON string",
1656
+ "name": "config",
1657
+ "hasDynamicHelp": false,
1658
+ "multiple": false,
1659
+ "type": "option"
1660
+ }
1661
+ },
1662
+ "hasDynamicHelp": false,
1663
+ "hiddenAliases": [],
1664
+ "id": "evaluators:create",
1665
+ "pluginAlias": "@respan/cli",
1666
+ "pluginName": "@respan/cli",
1667
+ "pluginType": "core",
1668
+ "strict": true,
1669
+ "enableJsonFlag": false,
1670
+ "isESM": true,
1671
+ "relativePath": [
1672
+ "dist",
1673
+ "commands",
1674
+ "evaluators",
1675
+ "create.js"
1676
+ ]
1677
+ },
1678
+ "evaluators:get": {
1679
+ "aliases": [],
1680
+ "args": {
1681
+ "id": {
1682
+ "description": "Evaluator ID",
1683
+ "name": "id",
1684
+ "required": true
1685
+ }
1686
+ },
1687
+ "description": "Get a specific evaluator",
1688
+ "flags": {
1689
+ "api-key": {
1690
+ "description": "API key (env: RESPAN_API_KEY)",
1691
+ "env": "RESPAN_API_KEY",
1692
+ "name": "api-key",
1693
+ "hasDynamicHelp": false,
1694
+ "multiple": false,
1695
+ "type": "option"
1696
+ },
1697
+ "base-url": {
1698
+ "description": "Temporary API base URL override for this command",
1699
+ "name": "base-url",
1700
+ "hasDynamicHelp": false,
1701
+ "multiple": false,
1702
+ "type": "option"
1703
+ },
1704
+ "profile": {
1705
+ "description": "Named profile to use",
1706
+ "name": "profile",
1707
+ "hasDynamicHelp": false,
1708
+ "multiple": false,
1709
+ "type": "option"
1710
+ },
1711
+ "json": {
1712
+ "description": "Output as JSON",
1713
+ "name": "json",
1714
+ "allowNo": false,
1715
+ "type": "boolean"
1716
+ },
1717
+ "csv": {
1718
+ "description": "Output as CSV",
1719
+ "name": "csv",
1720
+ "allowNo": false,
1721
+ "type": "boolean"
1722
+ },
1723
+ "verbose": {
1724
+ "char": "v",
1725
+ "description": "Show verbose output",
1726
+ "name": "verbose",
1727
+ "allowNo": false,
1728
+ "type": "boolean"
1729
+ }
1730
+ },
1731
+ "hasDynamicHelp": false,
1732
+ "hiddenAliases": [],
1733
+ "id": "evaluators:get",
1734
+ "pluginAlias": "@respan/cli",
1735
+ "pluginName": "@respan/cli",
1736
+ "pluginType": "core",
1737
+ "strict": true,
1738
+ "enableJsonFlag": false,
1739
+ "isESM": true,
1740
+ "relativePath": [
1741
+ "dist",
1742
+ "commands",
1743
+ "evaluators",
1744
+ "get.js"
1745
+ ]
1746
+ },
1747
+ "evaluators:list": {
1748
+ "aliases": [],
1749
+ "args": {},
1750
+ "description": "List evaluators",
1751
+ "flags": {
1752
+ "api-key": {
1753
+ "description": "API key (env: RESPAN_API_KEY)",
1754
+ "env": "RESPAN_API_KEY",
1755
+ "name": "api-key",
1756
+ "hasDynamicHelp": false,
1757
+ "multiple": false,
1758
+ "type": "option"
1759
+ },
1760
+ "base-url": {
1761
+ "description": "Temporary API base URL override for this command",
1762
+ "name": "base-url",
1763
+ "hasDynamicHelp": false,
1764
+ "multiple": false,
1765
+ "type": "option"
1766
+ },
1767
+ "profile": {
1768
+ "description": "Named profile to use",
1769
+ "name": "profile",
1770
+ "hasDynamicHelp": false,
1771
+ "multiple": false,
1772
+ "type": "option"
1773
+ },
1774
+ "json": {
1775
+ "description": "Output as JSON",
1776
+ "name": "json",
1777
+ "allowNo": false,
1778
+ "type": "boolean"
1779
+ },
1780
+ "csv": {
1781
+ "description": "Output as CSV",
1782
+ "name": "csv",
1783
+ "allowNo": false,
1784
+ "type": "boolean"
1785
+ },
1786
+ "verbose": {
1787
+ "char": "v",
1788
+ "description": "Show verbose output",
1789
+ "name": "verbose",
1790
+ "allowNo": false,
1791
+ "type": "boolean"
1792
+ },
1793
+ "limit": {
1794
+ "description": "Number of results per page",
1795
+ "name": "limit",
1796
+ "default": 20,
1797
+ "hasDynamicHelp": false,
1798
+ "multiple": false,
1799
+ "type": "option"
1800
+ },
1801
+ "page": {
1802
+ "description": "Page number",
1803
+ "name": "page",
1804
+ "default": 1,
1805
+ "hasDynamicHelp": false,
1806
+ "multiple": false,
1807
+ "type": "option"
1808
+ }
1809
+ },
1810
+ "hasDynamicHelp": false,
1811
+ "hiddenAliases": [],
1812
+ "id": "evaluators:list",
1813
+ "pluginAlias": "@respan/cli",
1814
+ "pluginName": "@respan/cli",
1815
+ "pluginType": "core",
1816
+ "strict": true,
1817
+ "enableJsonFlag": false,
1818
+ "isESM": true,
1819
+ "relativePath": [
1820
+ "dist",
1821
+ "commands",
1822
+ "evaluators",
1823
+ "list.js"
1824
+ ]
1825
+ },
1826
+ "evaluators:run": {
1827
+ "aliases": [],
1828
+ "args": {
1829
+ "id": {
1830
+ "description": "Evaluator ID",
1831
+ "name": "id",
1832
+ "required": true
1833
+ }
1834
+ },
1835
+ "description": "Run an evaluator",
1461
1836
  "flags": {
1462
1837
  "api-key": {
1463
1838
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1869,16 +2244,85 @@
1869
2244
  "list.js"
1870
2245
  ]
1871
2246
  },
1872
- "integrate:claude-code": {
2247
+ "eval": {
1873
2248
  "aliases": [],
1874
- "args": {},
1875
- "description": "Integrate Respan with Claude Code.\n\nInstalls a Stop hook that reads conversation transcripts and sends\nthem to Respan as structured spans (chat, tool, thinking).\n\nScope:\n --global Install hook script + register in ~/.claude/settings.json\n --local Write credentials + enable flag to .claude/settings.local.json\n\nDefault behavior installs the global hook and writes local project config.",
1876
- "examples": [
1877
- "respan integrate claude-code",
1878
- "respan integrate claude-code --disable",
1879
- "respan integrate claude-code --global",
1880
- "respan integrate claude-code --local --project-id my-project",
1881
- "respan integrate claude-code --attrs '{\"env\":\"prod\"}'",
2249
+ "args": {
2250
+ "file": {
2251
+ "description": "Path to eval JSON file",
2252
+ "name": "file",
2253
+ "required": true
2254
+ }
2255
+ },
2256
+ "description": "Run an eval defined in a JSON file (creates prompt + dataset on the platform)",
2257
+ "flags": {
2258
+ "api-key": {
2259
+ "description": "API key (env: RESPAN_API_KEY)",
2260
+ "env": "RESPAN_API_KEY",
2261
+ "name": "api-key",
2262
+ "hasDynamicHelp": false,
2263
+ "multiple": false,
2264
+ "type": "option"
2265
+ },
2266
+ "base-url": {
2267
+ "description": "Temporary API base URL override for this command",
2268
+ "name": "base-url",
2269
+ "hasDynamicHelp": false,
2270
+ "multiple": false,
2271
+ "type": "option"
2272
+ },
2273
+ "profile": {
2274
+ "description": "Named profile to use",
2275
+ "name": "profile",
2276
+ "hasDynamicHelp": false,
2277
+ "multiple": false,
2278
+ "type": "option"
2279
+ },
2280
+ "json": {
2281
+ "description": "Output as JSON",
2282
+ "name": "json",
2283
+ "allowNo": false,
2284
+ "type": "boolean"
2285
+ },
2286
+ "csv": {
2287
+ "description": "Output as CSV",
2288
+ "name": "csv",
2289
+ "allowNo": false,
2290
+ "type": "boolean"
2291
+ },
2292
+ "verbose": {
2293
+ "char": "v",
2294
+ "description": "Show verbose output",
2295
+ "name": "verbose",
2296
+ "allowNo": false,
2297
+ "type": "boolean"
2298
+ }
2299
+ },
2300
+ "hasDynamicHelp": false,
2301
+ "hiddenAliases": [],
2302
+ "id": "eval",
2303
+ "pluginAlias": "@respan/cli",
2304
+ "pluginName": "@respan/cli",
2305
+ "pluginType": "core",
2306
+ "strict": true,
2307
+ "enableJsonFlag": false,
2308
+ "isESM": true,
2309
+ "relativePath": [
2310
+ "dist",
2311
+ "commands",
2312
+ "eval",
2313
+ "index.js"
2314
+ ]
2315
+ },
2316
+ "integrate:claude-code": {
2317
+ "aliases": [],
2318
+ "args": {},
2319
+ "description": "Integrate Respan with Claude Code.\n\nInstalls a Stop hook that reads conversation transcripts and sends\nthem to Respan as structured spans (chat, tool, thinking).\n\nScope:\n --global Install hook script + register in ~/.claude/settings.json\n --local Write credentials + enable flag to .claude/settings.local.json\n\nDefault behavior installs the global hook and writes local project config.",
2320
+ "examples": [
2321
+ "respan integrate claude-code",
2322
+ "respan integrate claude-code --disable",
2323
+ "respan integrate claude-code --global",
2324
+ "respan integrate claude-code --local --project-id my-project",
2325
+ "respan integrate claude-code --attrs '{\"env\":\"prod\"}'",
1882
2326
  "respan integrate claude-code --dry-run"
1883
2327
  ],
1884
2328
  "flags": {
@@ -2475,10 +2919,20 @@
2475
2919
  "opencode.js"
2476
2920
  ]
2477
2921
  },
2478
- "logs:create": {
2922
+ "integrate:pi": {
2479
2923
  "aliases": [],
2480
2924
  "args": {},
2481
- "description": "Create a log span",
2925
+ "description": "Integrate Respan with the pi coding agent (https://pi.dev).\n\nInstalls the @respan/instrumentation-pi pi package — a pi extension that\ntraces every agent run as one turn span per prompt with chat and tool spans underneath,\ncorrelating all runs of a pi session by its session id — and writes a\nnon-secret respan.json config for it.\n\nScope:\n --global pi install npm:@respan/instrumentation-pi + ~/.pi/agent/respan.json (default)\n --local pi install -l npm:@respan/instrumentation-pi + .pi/respan.json in the project root\n\nTrace scope (--trace-scope, \"trace_scope\" in respan.json):\n session one multi-root trace per pi session, across processes and pauses (default)\n run one trace per agent run; runs of a session share a thread id\n\nDurable delivery (--with-collector):\n Sets base_url to a local Respan collector (http://127.0.0.1:4318) so traces\n go through its persistent queue and survive Respan outages. Run\n \"respan collector start\" once per machine.\n\nCredentials are never written to these files: the extension reads\nRESPAN_API_KEY or ~/.respan/credentials.json (from \"respan auth login\").",
2926
+ "examples": [
2927
+ "respan integrate pi",
2928
+ "respan integrate pi --disable",
2929
+ "respan integrate pi --local",
2930
+ "respan integrate pi --customer-id frank --workflow-name email-agent",
2931
+ "respan integrate pi --trace-scope run",
2932
+ "respan integrate pi --with-collector",
2933
+ "respan integrate pi --project-id my-project --attrs '{\"env\":\"prod\"}'",
2934
+ "respan integrate pi --dry-run"
2935
+ ],
2482
2936
  "flags": {
2483
2937
  "api-key": {
2484
2938
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2489,8 +2943,9 @@
2489
2943
  "type": "option"
2490
2944
  },
2491
2945
  "base-url": {
2492
- "description": "Temporary API base URL override for this command",
2946
+ "description": "Respan API base URL (for enterprise deployments)",
2493
2947
  "name": "base-url",
2948
+ "default": "https://api.respan.ai/api",
2494
2949
  "hasDynamicHelp": false,
2495
2950
  "multiple": false,
2496
2951
  "type": "option"
@@ -2521,31 +2976,106 @@
2521
2976
  "allowNo": false,
2522
2977
  "type": "boolean"
2523
2978
  },
2524
- "input": {
2525
- "description": "Input text or JSON",
2526
- "name": "input",
2527
- "required": true,
2979
+ "local": {
2980
+ "description": "Write per-project config (default)",
2981
+ "exclusive": [
2982
+ "global"
2983
+ ],
2984
+ "name": "local",
2985
+ "allowNo": false,
2986
+ "type": "boolean"
2987
+ },
2988
+ "global": {
2989
+ "description": "Write user-level global config",
2990
+ "exclusive": [
2991
+ "local"
2992
+ ],
2993
+ "name": "global",
2994
+ "allowNo": false,
2995
+ "type": "boolean"
2996
+ },
2997
+ "enable": {
2998
+ "description": "Enable tracing (default)",
2999
+ "exclusive": [
3000
+ "disable"
3001
+ ],
3002
+ "name": "enable",
3003
+ "allowNo": false,
3004
+ "type": "boolean"
3005
+ },
3006
+ "disable": {
3007
+ "description": "Disable tracing",
3008
+ "exclusive": [
3009
+ "enable"
3010
+ ],
3011
+ "name": "disable",
3012
+ "allowNo": false,
3013
+ "type": "boolean"
3014
+ },
3015
+ "project-id": {
3016
+ "description": "Respan project ID (added to metadata / resource attributes)",
3017
+ "env": "RESPAN_PROJECT_ID",
3018
+ "name": "project-id",
2528
3019
  "hasDynamicHelp": false,
2529
3020
  "multiple": false,
2530
3021
  "type": "option"
2531
3022
  },
2532
- "output": {
2533
- "description": "Output text or JSON",
2534
- "name": "output",
3023
+ "attrs": {
3024
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
3025
+ "name": "attrs",
3026
+ "default": "{}",
2535
3027
  "hasDynamicHelp": false,
2536
3028
  "multiple": false,
2537
3029
  "type": "option"
2538
3030
  },
2539
- "model": {
2540
- "description": "Model name",
2541
- "name": "model",
3031
+ "customer-id": {
3032
+ "description": "Customer/user identifier for traces (e.g. your name or email)",
3033
+ "env": "RESPAN_CUSTOMER_ID",
3034
+ "name": "customer-id",
2542
3035
  "hasDynamicHelp": false,
2543
3036
  "multiple": false,
2544
3037
  "type": "option"
2545
3038
  },
2546
- "metadata": {
2547
- "description": "Metadata as JSON string",
2548
- "name": "metadata",
3039
+ "span-name": {
3040
+ "description": "Alias of --workflow-name (default: pi)",
3041
+ "name": "span-name",
3042
+ "hasDynamicHelp": false,
3043
+ "multiple": false,
3044
+ "type": "option"
3045
+ },
3046
+ "workflow-name": {
3047
+ "description": "traceloop.workflow.name on pi turn spans (default: pi)",
3048
+ "name": "workflow-name",
3049
+ "hasDynamicHelp": false,
3050
+ "multiple": false,
3051
+ "type": "option"
3052
+ },
3053
+ "dry-run": {
3054
+ "description": "Preview changes without writing files",
3055
+ "name": "dry-run",
3056
+ "allowNo": false,
3057
+ "type": "boolean"
3058
+ },
3059
+ "trace-scope": {
3060
+ "description": "Trace scope: \"session\" = one multi-root trace per pi session (default), \"run\" = one trace per agent run",
3061
+ "name": "trace-scope",
3062
+ "hasDynamicHelp": false,
3063
+ "multiple": false,
3064
+ "options": [
3065
+ "run",
3066
+ "session"
3067
+ ],
3068
+ "type": "option"
3069
+ },
3070
+ "with-collector": {
3071
+ "description": "Send traces through a local Respan collector (respan collector start) for durable delivery",
3072
+ "name": "with-collector",
3073
+ "allowNo": false,
3074
+ "type": "boolean"
3075
+ },
3076
+ "collector-port": {
3077
+ "description": "Port of the local collector, with --with-collector (default: 4318)",
3078
+ "name": "collector-port",
2549
3079
  "hasDynamicHelp": false,
2550
3080
  "multiple": false,
2551
3081
  "type": "option"
@@ -2553,7 +3083,7 @@
2553
3083
  },
2554
3084
  "hasDynamicHelp": false,
2555
3085
  "hiddenAliases": [],
2556
- "id": "logs:create",
3086
+ "id": "integrate:pi",
2557
3087
  "pluginAlias": "@respan/cli",
2558
3088
  "pluginName": "@respan/cli",
2559
3089
  "pluginType": "core",
@@ -2563,20 +3093,20 @@
2563
3093
  "relativePath": [
2564
3094
  "dist",
2565
3095
  "commands",
2566
- "logs",
2567
- "create.js"
3096
+ "integrate",
3097
+ "pi.js"
2568
3098
  ]
2569
3099
  },
2570
- "logs:get": {
3100
+ "prompts:create-version": {
2571
3101
  "aliases": [],
2572
3102
  "args": {
2573
- "id": {
2574
- "description": "Span ID",
2575
- "name": "id",
3103
+ "prompt-id": {
3104
+ "description": "Prompt ID",
3105
+ "name": "prompt-id",
2576
3106
  "required": true
2577
3107
  }
2578
3108
  },
2579
- "description": "Get a specific log span",
3109
+ "description": "Create a new version of a prompt",
2580
3110
  "flags": {
2581
3111
  "api-key": {
2582
3112
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2618,11 +3148,40 @@
2618
3148
  "name": "verbose",
2619
3149
  "allowNo": false,
2620
3150
  "type": "boolean"
3151
+ },
3152
+ "messages": {
3153
+ "description": "Messages as JSON array string",
3154
+ "name": "messages",
3155
+ "required": true,
3156
+ "hasDynamicHelp": false,
3157
+ "multiple": false,
3158
+ "type": "option"
3159
+ },
3160
+ "model": {
3161
+ "description": "Model name",
3162
+ "name": "model",
3163
+ "hasDynamicHelp": false,
3164
+ "multiple": false,
3165
+ "type": "option"
3166
+ },
3167
+ "temperature": {
3168
+ "description": "Temperature value",
3169
+ "name": "temperature",
3170
+ "hasDynamicHelp": false,
3171
+ "multiple": false,
3172
+ "type": "option"
3173
+ },
3174
+ "max-tokens": {
3175
+ "description": "Max tokens",
3176
+ "name": "max-tokens",
3177
+ "hasDynamicHelp": false,
3178
+ "multiple": false,
3179
+ "type": "option"
2621
3180
  }
2622
3181
  },
2623
3182
  "hasDynamicHelp": false,
2624
3183
  "hiddenAliases": [],
2625
- "id": "logs:get",
3184
+ "id": "prompts:create-version",
2626
3185
  "pluginAlias": "@respan/cli",
2627
3186
  "pluginName": "@respan/cli",
2628
3187
  "pluginType": "core",
@@ -2632,14 +3191,14 @@
2632
3191
  "relativePath": [
2633
3192
  "dist",
2634
3193
  "commands",
2635
- "logs",
2636
- "get.js"
3194
+ "prompts",
3195
+ "create-version.js"
2637
3196
  ]
2638
3197
  },
2639
- "logs:list": {
3198
+ "prompts:create": {
2640
3199
  "aliases": [],
2641
3200
  "args": {},
2642
- "description": "List and filter LLM request logs (spans).\n\nSupports pagination, sorting, time range, and server-side filtering.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
3201
+ "description": "Create a new prompt",
2643
3202
  "flags": {
2644
3203
  "api-key": {
2645
3204
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2682,67 +3241,17 @@
2682
3241
  "allowNo": false,
2683
3242
  "type": "boolean"
2684
3243
  },
2685
- "limit": {
2686
- "description": "Number of results per page (max 1000)",
2687
- "name": "limit",
2688
- "default": 50,
2689
- "hasDynamicHelp": false,
2690
- "multiple": false,
2691
- "type": "option"
2692
- },
2693
- "page": {
2694
- "description": "Page number",
2695
- "name": "page",
2696
- "default": 1,
2697
- "hasDynamicHelp": false,
2698
- "multiple": false,
2699
- "type": "option"
2700
- },
2701
- "sort-by": {
2702
- "description": "Sort field (prefix with - for descending, e.g. -cost, -latency)",
2703
- "name": "sort-by",
3244
+ "name": {
3245
+ "description": "Prompt name",
3246
+ "name": "name",
3247
+ "required": true,
2704
3248
  "hasDynamicHelp": false,
2705
3249
  "multiple": false,
2706
3250
  "type": "option"
2707
3251
  },
2708
- "start-time": {
2709
- "description": "Start time filter (ISO 8601)",
2710
- "name": "start-time",
2711
- "hasDynamicHelp": false,
2712
- "multiple": false,
2713
- "type": "option"
2714
- },
2715
- "end-time": {
2716
- "description": "End time filter (ISO 8601)",
2717
- "name": "end-time",
2718
- "hasDynamicHelp": false,
2719
- "multiple": false,
2720
- "type": "option"
2721
- },
2722
- "filter": {
2723
- "description": "Filter in field:operator:value format (repeatable)",
2724
- "name": "filter",
2725
- "hasDynamicHelp": false,
2726
- "multiple": true,
2727
- "type": "option"
2728
- },
2729
- "all-envs": {
2730
- "description": "Include all environments (true/false)",
2731
- "name": "all-envs",
2732
- "hasDynamicHelp": false,
2733
- "multiple": false,
2734
- "type": "option"
2735
- },
2736
- "is-test": {
2737
- "description": "Filter by test (true) or production (false) environment",
2738
- "name": "is-test",
2739
- "hasDynamicHelp": false,
2740
- "multiple": false,
2741
- "type": "option"
2742
- },
2743
- "include-fields": {
2744
- "description": "Comma-separated fields to include in response",
2745
- "name": "include-fields",
3252
+ "description": {
3253
+ "description": "Prompt description",
3254
+ "name": "description",
2746
3255
  "hasDynamicHelp": false,
2747
3256
  "multiple": false,
2748
3257
  "type": "option"
@@ -2750,7 +3259,7 @@
2750
3259
  },
2751
3260
  "hasDynamicHelp": false,
2752
3261
  "hiddenAliases": [],
2753
- "id": "logs:list",
3262
+ "id": "prompts:create",
2754
3263
  "pluginAlias": "@respan/cli",
2755
3264
  "pluginName": "@respan/cli",
2756
3265
  "pluginType": "core",
@@ -2760,14 +3269,20 @@
2760
3269
  "relativePath": [
2761
3270
  "dist",
2762
3271
  "commands",
2763
- "logs",
2764
- "list.js"
3272
+ "prompts",
3273
+ "create.js"
2765
3274
  ]
2766
3275
  },
2767
- "logs:summary": {
3276
+ "prompts:get": {
2768
3277
  "aliases": [],
2769
- "args": {},
2770
- "description": "Get aggregated summary statistics for log spans in a time range.\n\nReturns total cost, total tokens, request count, and score summaries.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
3278
+ "args": {
3279
+ "id": {
3280
+ "description": "Prompt ID",
3281
+ "name": "id",
3282
+ "required": true
3283
+ }
3284
+ },
3285
+ "description": "Get a specific prompt",
2771
3286
  "flags": {
2772
3287
  "api-key": {
2773
3288
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2809,48 +3324,11 @@
2809
3324
  "name": "verbose",
2810
3325
  "allowNo": false,
2811
3326
  "type": "boolean"
2812
- },
2813
- "start-time": {
2814
- "description": "Start time (ISO 8601)",
2815
- "name": "start-time",
2816
- "required": true,
2817
- "hasDynamicHelp": false,
2818
- "multiple": false,
2819
- "type": "option"
2820
- },
2821
- "end-time": {
2822
- "description": "End time (ISO 8601)",
2823
- "name": "end-time",
2824
- "required": true,
2825
- "hasDynamicHelp": false,
2826
- "multiple": false,
2827
- "type": "option"
2828
- },
2829
- "filter": {
2830
- "description": "Filter in field:operator:value format (repeatable)",
2831
- "name": "filter",
2832
- "hasDynamicHelp": false,
2833
- "multiple": true,
2834
- "type": "option"
2835
- },
2836
- "all-envs": {
2837
- "description": "Include all environments (true/false)",
2838
- "name": "all-envs",
2839
- "hasDynamicHelp": false,
2840
- "multiple": false,
2841
- "type": "option"
2842
- },
2843
- "is-test": {
2844
- "description": "Filter by test (true) or production (false) environment",
2845
- "name": "is-test",
2846
- "hasDynamicHelp": false,
2847
- "multiple": false,
2848
- "type": "option"
2849
3327
  }
2850
3328
  },
2851
3329
  "hasDynamicHelp": false,
2852
3330
  "hiddenAliases": [],
2853
- "id": "logs:summary",
3331
+ "id": "prompts:get",
2854
3332
  "pluginAlias": "@respan/cli",
2855
3333
  "pluginName": "@respan/cli",
2856
3334
  "pluginType": "core",
@@ -2860,20 +3338,14 @@
2860
3338
  "relativePath": [
2861
3339
  "dist",
2862
3340
  "commands",
2863
- "logs",
2864
- "summary.js"
3341
+ "prompts",
3342
+ "get.js"
2865
3343
  ]
2866
3344
  },
2867
- "prompts:create-version": {
3345
+ "prompts:list": {
2868
3346
  "aliases": [],
2869
- "args": {
2870
- "prompt-id": {
2871
- "description": "Prompt ID",
2872
- "name": "prompt-id",
2873
- "required": true
2874
- }
2875
- },
2876
- "description": "Create a new version of a prompt",
3347
+ "args": {},
3348
+ "description": "List prompts",
2877
3349
  "flags": {
2878
3350
  "api-key": {
2879
3351
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2916,31 +3388,10 @@
2916
3388
  "allowNo": false,
2917
3389
  "type": "boolean"
2918
3390
  },
2919
- "messages": {
2920
- "description": "Messages as JSON array string",
2921
- "name": "messages",
2922
- "required": true,
2923
- "hasDynamicHelp": false,
2924
- "multiple": false,
2925
- "type": "option"
2926
- },
2927
- "model": {
2928
- "description": "Model name",
2929
- "name": "model",
2930
- "hasDynamicHelp": false,
2931
- "multiple": false,
2932
- "type": "option"
2933
- },
2934
- "temperature": {
2935
- "description": "Temperature value",
2936
- "name": "temperature",
2937
- "hasDynamicHelp": false,
2938
- "multiple": false,
2939
- "type": "option"
2940
- },
2941
- "max-tokens": {
2942
- "description": "Max tokens",
2943
- "name": "max-tokens",
3391
+ "limit": {
3392
+ "description": "Number of results per page",
3393
+ "name": "limit",
3394
+ "default": 50,
2944
3395
  "hasDynamicHelp": false,
2945
3396
  "multiple": false,
2946
3397
  "type": "option"
@@ -2948,7 +3399,7 @@
2948
3399
  },
2949
3400
  "hasDynamicHelp": false,
2950
3401
  "hiddenAliases": [],
2951
- "id": "prompts:create-version",
3402
+ "id": "prompts:list",
2952
3403
  "pluginAlias": "@respan/cli",
2953
3404
  "pluginName": "@respan/cli",
2954
3405
  "pluginType": "core",
@@ -2959,13 +3410,19 @@
2959
3410
  "dist",
2960
3411
  "commands",
2961
3412
  "prompts",
2962
- "create-version.js"
3413
+ "list.js"
2963
3414
  ]
2964
3415
  },
2965
- "prompts:create": {
3416
+ "prompts:update": {
2966
3417
  "aliases": [],
2967
- "args": {},
2968
- "description": "Create a new prompt",
3418
+ "args": {
3419
+ "id": {
3420
+ "description": "Prompt ID",
3421
+ "name": "id",
3422
+ "required": true
3423
+ }
3424
+ },
3425
+ "description": "Update a prompt",
2969
3426
  "flags": {
2970
3427
  "api-key": {
2971
3428
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3011,7 +3468,6 @@
3011
3468
  "name": {
3012
3469
  "description": "Prompt name",
3013
3470
  "name": "name",
3014
- "required": true,
3015
3471
  "hasDynamicHelp": false,
3016
3472
  "multiple": false,
3017
3473
  "type": "option"
@@ -3026,7 +3482,7 @@
3026
3482
  },
3027
3483
  "hasDynamicHelp": false,
3028
3484
  "hiddenAliases": [],
3029
- "id": "prompts:create",
3485
+ "id": "prompts:update",
3030
3486
  "pluginAlias": "@respan/cli",
3031
3487
  "pluginName": "@respan/cli",
3032
3488
  "pluginType": "core",
@@ -3037,19 +3493,19 @@
3037
3493
  "dist",
3038
3494
  "commands",
3039
3495
  "prompts",
3040
- "create.js"
3496
+ "update.js"
3041
3497
  ]
3042
3498
  },
3043
- "prompts:get": {
3499
+ "prompts:versions": {
3044
3500
  "aliases": [],
3045
3501
  "args": {
3046
- "id": {
3502
+ "prompt-id": {
3047
3503
  "description": "Prompt ID",
3048
- "name": "id",
3504
+ "name": "prompt-id",
3049
3505
  "required": true
3050
3506
  }
3051
3507
  },
3052
- "description": "Get a specific prompt",
3508
+ "description": "List versions of a prompt",
3053
3509
  "flags": {
3054
3510
  "api-key": {
3055
3511
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3095,7 +3551,7 @@
3095
3551
  },
3096
3552
  "hasDynamicHelp": false,
3097
3553
  "hiddenAliases": [],
3098
- "id": "prompts:get",
3554
+ "id": "prompts:versions",
3099
3555
  "pluginAlias": "@respan/cli",
3100
3556
  "pluginName": "@respan/cli",
3101
3557
  "pluginType": "core",
@@ -3106,13 +3562,17 @@
3106
3562
  "dist",
3107
3563
  "commands",
3108
3564
  "prompts",
3109
- "get.js"
3565
+ "versions.js"
3110
3566
  ]
3111
3567
  },
3112
- "prompts:list": {
3568
+ "setup:doctor": {
3113
3569
  "aliases": [],
3114
3570
  "args": {},
3115
- "description": "List prompts",
3571
+ "description": "Diagnose coding-agent setup for Respan",
3572
+ "examples": [
3573
+ "respan setup doctor",
3574
+ "respan setup doctor --global"
3575
+ ],
3116
3576
  "flags": {
3117
3577
  "api-key": {
3118
3578
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3155,18 +3615,28 @@
3155
3615
  "allowNo": false,
3156
3616
  "type": "boolean"
3157
3617
  },
3158
- "limit": {
3159
- "description": "Number of results per page",
3160
- "name": "limit",
3161
- "default": 50,
3162
- "hasDynamicHelp": false,
3163
- "multiple": false,
3164
- "type": "option"
3618
+ "local": {
3619
+ "description": "Check local project setup",
3620
+ "exclusive": [
3621
+ "global"
3622
+ ],
3623
+ "name": "local",
3624
+ "allowNo": false,
3625
+ "type": "boolean"
3626
+ },
3627
+ "global": {
3628
+ "description": "Check global setup",
3629
+ "exclusive": [
3630
+ "local"
3631
+ ],
3632
+ "name": "global",
3633
+ "allowNo": false,
3634
+ "type": "boolean"
3165
3635
  }
3166
3636
  },
3167
3637
  "hasDynamicHelp": false,
3168
3638
  "hiddenAliases": [],
3169
- "id": "prompts:list",
3639
+ "id": "setup:doctor",
3170
3640
  "pluginAlias": "@respan/cli",
3171
3641
  "pluginName": "@respan/cli",
3172
3642
  "pluginType": "core",
@@ -3176,20 +3646,19 @@
3176
3646
  "relativePath": [
3177
3647
  "dist",
3178
3648
  "commands",
3179
- "prompts",
3180
- "list.js"
3649
+ "setup",
3650
+ "doctor.js"
3181
3651
  ]
3182
3652
  },
3183
- "prompts:update": {
3653
+ "setup:gateway": {
3184
3654
  "aliases": [],
3185
- "args": {
3186
- "id": {
3187
- "description": "Prompt ID",
3188
- "name": "id",
3189
- "required": true
3190
- }
3191
- },
3192
- "description": "Update a prompt",
3655
+ "args": {},
3656
+ "description": "Set up Respan gateway routing in this project.\n\nRuns the gateway setup flow directly (skips the \"Tracing or Gateway?\"\nquestion). Sets up your API key, installs the Respan skill, and optionally\nopens your coding agent to route the detected framework through the gateway.",
3657
+ "examples": [
3658
+ "respan setup gateway",
3659
+ "respan setup gateway --agent claude-code",
3660
+ "respan setup gateway --no-instrument"
3661
+ ],
3193
3662
  "flags": {
3194
3663
  "api-key": {
3195
3664
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3214,13 +3683,13 @@
3214
3683
  "type": "option"
3215
3684
  },
3216
3685
  "json": {
3217
- "description": "Output as JSON",
3686
+ "hidden": true,
3218
3687
  "name": "json",
3219
3688
  "allowNo": false,
3220
3689
  "type": "boolean"
3221
3690
  },
3222
3691
  "csv": {
3223
- "description": "Output as CSV",
3692
+ "hidden": true,
3224
3693
  "name": "csv",
3225
3694
  "allowNo": false,
3226
3695
  "type": "boolean"
@@ -3232,24 +3701,23 @@
3232
3701
  "allowNo": false,
3233
3702
  "type": "boolean"
3234
3703
  },
3235
- "name": {
3236
- "description": "Prompt name",
3237
- "name": "name",
3704
+ "agent": {
3705
+ "description": "Agent to configure (claude-code, cursor, codex-cli, gemini-cli, opencode)",
3706
+ "name": "agent",
3238
3707
  "hasDynamicHelp": false,
3239
3708
  "multiple": false,
3240
3709
  "type": "option"
3241
3710
  },
3242
- "description": {
3243
- "description": "Prompt description",
3244
- "name": "description",
3245
- "hasDynamicHelp": false,
3246
- "multiple": false,
3247
- "type": "option"
3711
+ "no-instrument": {
3712
+ "description": "Skip agent selection and opening after setup",
3713
+ "name": "no-instrument",
3714
+ "allowNo": false,
3715
+ "type": "boolean"
3248
3716
  }
3249
3717
  },
3250
3718
  "hasDynamicHelp": false,
3251
3719
  "hiddenAliases": [],
3252
- "id": "prompts:update",
3720
+ "id": "setup:gateway",
3253
3721
  "pluginAlias": "@respan/cli",
3254
3722
  "pluginName": "@respan/cli",
3255
3723
  "pluginType": "core",
@@ -3259,20 +3727,22 @@
3259
3727
  "relativePath": [
3260
3728
  "dist",
3261
3729
  "commands",
3262
- "prompts",
3263
- "update.js"
3730
+ "setup",
3731
+ "gateway.js"
3264
3732
  ]
3265
3733
  },
3266
- "prompts:versions": {
3734
+ "setup": {
3267
3735
  "aliases": [],
3268
- "args": {
3269
- "prompt-id": {
3270
- "description": "Prompt ID",
3271
- "name": "prompt-id",
3272
- "required": true
3273
- }
3274
- },
3275
- "description": "List versions of a prompt",
3736
+ "args": {},
3737
+ "description": "Interactive setup wizard for Respan.\n\nSets up your API key, installs skills and SDK docs for your preferred\ncoding agents, and optionally runs a setup agent. Asks whether you want\nto set up tracing or gateway routing.\n\nThis is the recommended way to get started with Respan.",
3738
+ "examples": [
3739
+ "npx @respan/cli setup",
3740
+ "respan setup",
3741
+ "respan setup tracing",
3742
+ "respan setup gateway",
3743
+ "respan setup --agent claude-code",
3744
+ "respan setup --no-instrument"
3745
+ ],
3276
3746
  "flags": {
3277
3747
  "api-key": {
3278
3748
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3297,13 +3767,13 @@
3297
3767
  "type": "option"
3298
3768
  },
3299
3769
  "json": {
3300
- "description": "Output as JSON",
3770
+ "hidden": true,
3301
3771
  "name": "json",
3302
3772
  "allowNo": false,
3303
3773
  "type": "boolean"
3304
3774
  },
3305
3775
  "csv": {
3306
- "description": "Output as CSV",
3776
+ "hidden": true,
3307
3777
  "name": "csv",
3308
3778
  "allowNo": false,
3309
3779
  "type": "boolean"
@@ -3314,11 +3784,24 @@
3314
3784
  "name": "verbose",
3315
3785
  "allowNo": false,
3316
3786
  "type": "boolean"
3787
+ },
3788
+ "agent": {
3789
+ "description": "Agent to configure (claude-code, cursor, codex-cli, gemini-cli, opencode)",
3790
+ "name": "agent",
3791
+ "hasDynamicHelp": false,
3792
+ "multiple": false,
3793
+ "type": "option"
3794
+ },
3795
+ "no-instrument": {
3796
+ "description": "Skip agent selection and opening after setup",
3797
+ "name": "no-instrument",
3798
+ "allowNo": false,
3799
+ "type": "boolean"
3317
3800
  }
3318
3801
  },
3319
3802
  "hasDynamicHelp": false,
3320
3803
  "hiddenAliases": [],
3321
- "id": "prompts:versions",
3804
+ "id": "setup",
3322
3805
  "pluginAlias": "@respan/cli",
3323
3806
  "pluginName": "@respan/cli",
3324
3807
  "pluginType": "core",
@@ -3328,17 +3811,18 @@
3328
3811
  "relativePath": [
3329
3812
  "dist",
3330
3813
  "commands",
3331
- "prompts",
3332
- "versions.js"
3814
+ "setup",
3815
+ "index.js"
3333
3816
  ]
3334
3817
  },
3335
- "setup:doctor": {
3818
+ "setup:tracing": {
3336
3819
  "aliases": [],
3337
3820
  "args": {},
3338
- "description": "Diagnose coding-agent setup for Respan",
3821
+ "description": "Set up Respan SDK tracing in this project.\n\nRuns the tracing setup flow directly (skips the \"Tracing or Gateway?\"\nquestion). Sets up your API key, installs the Respan skill, and optionally\nopens your coding agent to instrument the project.",
3339
3822
  "examples": [
3340
- "respan setup doctor",
3341
- "respan setup doctor --global"
3823
+ "respan setup tracing",
3824
+ "respan setup tracing --agent claude-code",
3825
+ "respan setup tracing --no-instrument"
3342
3826
  ],
3343
3827
  "flags": {
3344
3828
  "api-key": {
@@ -3364,13 +3848,13 @@
3364
3848
  "type": "option"
3365
3849
  },
3366
3850
  "json": {
3367
- "description": "Output as JSON",
3851
+ "hidden": true,
3368
3852
  "name": "json",
3369
3853
  "allowNo": false,
3370
3854
  "type": "boolean"
3371
3855
  },
3372
3856
  "csv": {
3373
- "description": "Output as CSV",
3857
+ "hidden": true,
3374
3858
  "name": "csv",
3375
3859
  "allowNo": false,
3376
3860
  "type": "boolean"
@@ -3382,28 +3866,23 @@
3382
3866
  "allowNo": false,
3383
3867
  "type": "boolean"
3384
3868
  },
3385
- "local": {
3386
- "description": "Check local project setup",
3387
- "exclusive": [
3388
- "global"
3389
- ],
3390
- "name": "local",
3391
- "allowNo": false,
3392
- "type": "boolean"
3869
+ "agent": {
3870
+ "description": "Agent to configure (claude-code, cursor, codex-cli, gemini-cli, opencode)",
3871
+ "name": "agent",
3872
+ "hasDynamicHelp": false,
3873
+ "multiple": false,
3874
+ "type": "option"
3393
3875
  },
3394
- "global": {
3395
- "description": "Check global setup",
3396
- "exclusive": [
3397
- "local"
3398
- ],
3399
- "name": "global",
3876
+ "no-instrument": {
3877
+ "description": "Skip agent selection and opening after setup",
3878
+ "name": "no-instrument",
3400
3879
  "allowNo": false,
3401
3880
  "type": "boolean"
3402
3881
  }
3403
3882
  },
3404
3883
  "hasDynamicHelp": false,
3405
3884
  "hiddenAliases": [],
3406
- "id": "setup:doctor",
3885
+ "id": "setup:tracing",
3407
3886
  "pluginAlias": "@respan/cli",
3408
3887
  "pluginName": "@respan/cli",
3409
3888
  "pluginType": "core",
@@ -3414,18 +3893,19 @@
3414
3893
  "dist",
3415
3894
  "commands",
3416
3895
  "setup",
3417
- "doctor.js"
3896
+ "tracing.js"
3418
3897
  ]
3419
3898
  },
3420
- "setup:gateway": {
3899
+ "traces:get": {
3421
3900
  "aliases": [],
3422
- "args": {},
3423
- "description": "Set up Respan gateway routing in this project.\n\nRuns the gateway setup flow directly (skips the \"Tracing or Gateway?\"\nquestion). Sets up your API key, installs the Respan skill, and optionally\nopens your coding agent to route the detected framework through the gateway.",
3424
- "examples": [
3425
- "respan setup gateway",
3426
- "respan setup gateway --agent claude-code",
3427
- "respan setup gateway --no-instrument"
3428
- ],
3901
+ "args": {
3902
+ "id": {
3903
+ "description": "Trace ID",
3904
+ "name": "id",
3905
+ "required": true
3906
+ }
3907
+ },
3908
+ "description": "Get a specific trace",
3429
3909
  "flags": {
3430
3910
  "api-key": {
3431
3911
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3450,13 +3930,13 @@
3450
3930
  "type": "option"
3451
3931
  },
3452
3932
  "json": {
3453
- "hidden": true,
3933
+ "description": "Output as JSON",
3454
3934
  "name": "json",
3455
3935
  "allowNo": false,
3456
3936
  "type": "boolean"
3457
3937
  },
3458
3938
  "csv": {
3459
- "hidden": true,
3939
+ "description": "Output as CSV",
3460
3940
  "name": "csv",
3461
3941
  "allowNo": false,
3462
3942
  "type": "boolean"
@@ -3467,24 +3947,126 @@
3467
3947
  "name": "verbose",
3468
3948
  "allowNo": false,
3469
3949
  "type": "boolean"
3950
+ }
3951
+ },
3952
+ "hasDynamicHelp": false,
3953
+ "hiddenAliases": [],
3954
+ "id": "traces:get",
3955
+ "pluginAlias": "@respan/cli",
3956
+ "pluginName": "@respan/cli",
3957
+ "pluginType": "core",
3958
+ "strict": true,
3959
+ "enableJsonFlag": false,
3960
+ "isESM": true,
3961
+ "relativePath": [
3962
+ "dist",
3963
+ "commands",
3964
+ "traces",
3965
+ "get.js"
3966
+ ]
3967
+ },
3968
+ "traces:list": {
3969
+ "aliases": [],
3970
+ "args": {},
3971
+ "description": "List and filter traces.\n\nA trace represents a complete workflow execution containing multiple spans.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (traces):\n trace_unique_id, customer_identifier, environment, span_count,\n llm_call_count, error_count, total_cost, total_tokens,\n total_prompt_tokens, total_completion_tokens, duration,\n span_workflow_name, metadata__<key>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
3972
+ "flags": {
3973
+ "api-key": {
3974
+ "description": "API key (env: RESPAN_API_KEY)",
3975
+ "env": "RESPAN_API_KEY",
3976
+ "name": "api-key",
3977
+ "hasDynamicHelp": false,
3978
+ "multiple": false,
3979
+ "type": "option"
3470
3980
  },
3471
- "agent": {
3472
- "description": "Agent to configure (claude-code, cursor, codex-cli, gemini-cli, opencode)",
3473
- "name": "agent",
3981
+ "base-url": {
3982
+ "description": "Temporary API base URL override for this command",
3983
+ "name": "base-url",
3474
3984
  "hasDynamicHelp": false,
3475
3985
  "multiple": false,
3476
3986
  "type": "option"
3477
3987
  },
3478
- "no-instrument": {
3479
- "description": "Skip agent selection and opening after setup",
3480
- "name": "no-instrument",
3988
+ "profile": {
3989
+ "description": "Named profile to use",
3990
+ "name": "profile",
3991
+ "hasDynamicHelp": false,
3992
+ "multiple": false,
3993
+ "type": "option"
3994
+ },
3995
+ "json": {
3996
+ "description": "Output as JSON",
3997
+ "name": "json",
3998
+ "allowNo": false,
3999
+ "type": "boolean"
4000
+ },
4001
+ "csv": {
4002
+ "description": "Output as CSV",
4003
+ "name": "csv",
3481
4004
  "allowNo": false,
3482
4005
  "type": "boolean"
4006
+ },
4007
+ "verbose": {
4008
+ "char": "v",
4009
+ "description": "Show verbose output",
4010
+ "name": "verbose",
4011
+ "allowNo": false,
4012
+ "type": "boolean"
4013
+ },
4014
+ "limit": {
4015
+ "description": "Number of results per page",
4016
+ "name": "limit",
4017
+ "default": 10,
4018
+ "hasDynamicHelp": false,
4019
+ "multiple": false,
4020
+ "type": "option"
4021
+ },
4022
+ "page": {
4023
+ "description": "Page number",
4024
+ "name": "page",
4025
+ "default": 1,
4026
+ "hasDynamicHelp": false,
4027
+ "multiple": false,
4028
+ "type": "option"
4029
+ },
4030
+ "sort-by": {
4031
+ "description": "Sort field (prefix with - for descending)",
4032
+ "name": "sort-by",
4033
+ "default": "-timestamp",
4034
+ "hasDynamicHelp": false,
4035
+ "multiple": false,
4036
+ "type": "option"
4037
+ },
4038
+ "start-time": {
4039
+ "description": "Start time filter (ISO 8601)",
4040
+ "name": "start-time",
4041
+ "hasDynamicHelp": false,
4042
+ "multiple": false,
4043
+ "type": "option"
4044
+ },
4045
+ "end-time": {
4046
+ "description": "End time filter (ISO 8601)",
4047
+ "name": "end-time",
4048
+ "hasDynamicHelp": false,
4049
+ "multiple": false,
4050
+ "type": "option"
4051
+ },
4052
+ "environment": {
4053
+ "description": "Environment filter",
4054
+ "name": "environment",
4055
+ "hasDynamicHelp": false,
4056
+ "multiple": false,
4057
+ "type": "option"
4058
+ },
4059
+ "filter": {
4060
+ "description": "Filter in field:operator:value format (repeatable)",
4061
+ "name": "filter",
4062
+ "hasDynamicHelp": false,
4063
+ "multiple": true,
4064
+ "type": "option"
3483
4065
  }
3484
4066
  },
3485
4067
  "hasDynamicHelp": false,
3486
4068
  "hiddenAliases": [],
3487
- "id": "setup:gateway",
4069
+ "id": "traces:list",
3488
4070
  "pluginAlias": "@respan/cli",
3489
4071
  "pluginName": "@respan/cli",
3490
4072
  "pluginType": "core",
@@ -3494,22 +4076,14 @@
3494
4076
  "relativePath": [
3495
4077
  "dist",
3496
4078
  "commands",
3497
- "setup",
3498
- "gateway.js"
4079
+ "traces",
4080
+ "list.js"
3499
4081
  ]
3500
4082
  },
3501
- "setup": {
4083
+ "traces:summary": {
3502
4084
  "aliases": [],
3503
4085
  "args": {},
3504
- "description": "Interactive setup wizard for Respan.\n\nSets up your API key, installs skills and SDK docs for your preferred\ncoding agents, and optionally runs a setup agent. Asks whether you want\nto set up tracing or gateway routing.\n\nThis is the recommended way to get started with Respan.",
3505
- "examples": [
3506
- "npx @respan/cli setup",
3507
- "respan setup",
3508
- "respan setup tracing",
3509
- "respan setup gateway",
3510
- "respan setup --agent claude-code",
3511
- "respan setup --no-instrument"
3512
- ],
4086
+ "description": "Get a span-level summary of activity for a time range (counts, latency, cost, errors aggregated across spans)",
3513
4087
  "flags": {
3514
4088
  "api-key": {
3515
4089
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3534,13 +4108,13 @@
3534
4108
  "type": "option"
3535
4109
  },
3536
4110
  "json": {
3537
- "hidden": true,
4111
+ "description": "Output as JSON",
3538
4112
  "name": "json",
3539
4113
  "allowNo": false,
3540
4114
  "type": "boolean"
3541
4115
  },
3542
4116
  "csv": {
3543
- "hidden": true,
4117
+ "description": "Output as CSV",
3544
4118
  "name": "csv",
3545
4119
  "allowNo": false,
3546
4120
  "type": "boolean"
@@ -3552,23 +4126,26 @@
3552
4126
  "allowNo": false,
3553
4127
  "type": "boolean"
3554
4128
  },
3555
- "agent": {
3556
- "description": "Agent to configure (claude-code, cursor, codex-cli, gemini-cli, opencode)",
3557
- "name": "agent",
4129
+ "start-time": {
4130
+ "description": "Start time (ISO 8601)",
4131
+ "name": "start-time",
4132
+ "required": true,
3558
4133
  "hasDynamicHelp": false,
3559
4134
  "multiple": false,
3560
4135
  "type": "option"
3561
4136
  },
3562
- "no-instrument": {
3563
- "description": "Skip agent selection and opening after setup",
3564
- "name": "no-instrument",
3565
- "allowNo": false,
3566
- "type": "boolean"
4137
+ "end-time": {
4138
+ "description": "End time (ISO 8601)",
4139
+ "name": "end-time",
4140
+ "required": true,
4141
+ "hasDynamicHelp": false,
4142
+ "multiple": false,
4143
+ "type": "option"
3567
4144
  }
3568
4145
  },
3569
4146
  "hasDynamicHelp": false,
3570
4147
  "hiddenAliases": [],
3571
- "id": "setup",
4148
+ "id": "traces:summary",
3572
4149
  "pluginAlias": "@respan/cli",
3573
4150
  "pluginName": "@respan/cli",
3574
4151
  "pluginType": "core",
@@ -3578,19 +4155,14 @@
3578
4155
  "relativePath": [
3579
4156
  "dist",
3580
4157
  "commands",
3581
- "setup",
3582
- "index.js"
4158
+ "traces",
4159
+ "summary.js"
3583
4160
  ]
3584
4161
  },
3585
- "setup:tracing": {
4162
+ "users:create": {
3586
4163
  "aliases": [],
3587
4164
  "args": {},
3588
- "description": "Set up Respan SDK tracing in this project.\n\nRuns the tracing setup flow directly (skips the \"Tracing or Gateway?\"\nquestion). Sets up your API key, installs the Respan skill, and optionally\nopens your coding agent to instrument the project.",
3589
- "examples": [
3590
- "respan setup tracing",
3591
- "respan setup tracing --agent claude-code",
3592
- "respan setup tracing --no-instrument"
3593
- ],
4165
+ "description": "Create a new user (customer)",
3594
4166
  "flags": {
3595
4167
  "api-key": {
3596
4168
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3615,13 +4187,13 @@
3615
4187
  "type": "option"
3616
4188
  },
3617
4189
  "json": {
3618
- "hidden": true,
4190
+ "description": "Output as JSON",
3619
4191
  "name": "json",
3620
4192
  "allowNo": false,
3621
4193
  "type": "boolean"
3622
4194
  },
3623
4195
  "csv": {
3624
- "hidden": true,
4196
+ "description": "Output as CSV",
3625
4197
  "name": "csv",
3626
4198
  "allowNo": false,
3627
4199
  "type": "boolean"
@@ -3633,23 +4205,39 @@
3633
4205
  "allowNo": false,
3634
4206
  "type": "boolean"
3635
4207
  },
3636
- "agent": {
3637
- "description": "Agent to configure (claude-code, cursor, codex-cli, gemini-cli, opencode)",
3638
- "name": "agent",
4208
+ "identifier": {
4209
+ "description": "Customer identifier",
4210
+ "name": "identifier",
4211
+ "required": true,
4212
+ "hasDynamicHelp": false,
4213
+ "multiple": false,
4214
+ "type": "option"
4215
+ },
4216
+ "name": {
4217
+ "description": "Customer name",
4218
+ "name": "name",
3639
4219
  "hasDynamicHelp": false,
3640
4220
  "multiple": false,
3641
4221
  "type": "option"
3642
4222
  },
3643
- "no-instrument": {
3644
- "description": "Skip agent selection and opening after setup",
3645
- "name": "no-instrument",
3646
- "allowNo": false,
3647
- "type": "boolean"
4223
+ "email": {
4224
+ "description": "Customer email",
4225
+ "name": "email",
4226
+ "hasDynamicHelp": false,
4227
+ "multiple": false,
4228
+ "type": "option"
4229
+ },
4230
+ "metadata": {
4231
+ "description": "Metadata as JSON string",
4232
+ "name": "metadata",
4233
+ "hasDynamicHelp": false,
4234
+ "multiple": false,
4235
+ "type": "option"
3648
4236
  }
3649
4237
  },
3650
4238
  "hasDynamicHelp": false,
3651
4239
  "hiddenAliases": [],
3652
- "id": "setup:tracing",
4240
+ "id": "users:create",
3653
4241
  "pluginAlias": "@respan/cli",
3654
4242
  "pluginName": "@respan/cli",
3655
4243
  "pluginType": "core",
@@ -3659,20 +4247,20 @@
3659
4247
  "relativePath": [
3660
4248
  "dist",
3661
4249
  "commands",
3662
- "setup",
3663
- "tracing.js"
4250
+ "users",
4251
+ "create.js"
3664
4252
  ]
3665
4253
  },
3666
- "traces:get": {
4254
+ "users:get": {
3667
4255
  "aliases": [],
3668
4256
  "args": {
3669
4257
  "id": {
3670
- "description": "Trace ID",
4258
+ "description": "Customer identifier",
3671
4259
  "name": "id",
3672
4260
  "required": true
3673
4261
  }
3674
4262
  },
3675
- "description": "Get a specific trace",
4263
+ "description": "Get a specific user (customer)",
3676
4264
  "flags": {
3677
4265
  "api-key": {
3678
4266
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3718,7 +4306,7 @@
3718
4306
  },
3719
4307
  "hasDynamicHelp": false,
3720
4308
  "hiddenAliases": [],
3721
- "id": "traces:get",
4309
+ "id": "users:get",
3722
4310
  "pluginAlias": "@respan/cli",
3723
4311
  "pluginName": "@respan/cli",
3724
4312
  "pluginType": "core",
@@ -3728,14 +4316,14 @@
3728
4316
  "relativePath": [
3729
4317
  "dist",
3730
4318
  "commands",
3731
- "traces",
4319
+ "users",
3732
4320
  "get.js"
3733
4321
  ]
3734
4322
  },
3735
- "traces:list": {
4323
+ "users:list": {
3736
4324
  "aliases": [],
3737
4325
  "args": {},
3738
- "description": "List and filter traces.\n\nA trace represents a complete workflow execution containing multiple spans.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (traces):\n trace_unique_id, customer_identifier, environment, span_count,\n llm_call_count, error_count, total_cost, total_tokens,\n total_prompt_tokens, total_completion_tokens, duration,\n span_workflow_name, metadata__<key>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
4326
+ "description": "List users (customers)",
3739
4327
  "flags": {
3740
4328
  "api-key": {
3741
4329
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3781,7 +4369,7 @@
3781
4369
  "limit": {
3782
4370
  "description": "Number of results per page",
3783
4371
  "name": "limit",
3784
- "default": 10,
4372
+ "default": 20,
3785
4373
  "hasDynamicHelp": false,
3786
4374
  "multiple": false,
3787
4375
  "type": "option"
@@ -3795,23 +4383,8 @@
3795
4383
  "type": "option"
3796
4384
  },
3797
4385
  "sort-by": {
3798
- "description": "Sort field (prefix with - for descending)",
4386
+ "description": "Sort field",
3799
4387
  "name": "sort-by",
3800
- "default": "-timestamp",
3801
- "hasDynamicHelp": false,
3802
- "multiple": false,
3803
- "type": "option"
3804
- },
3805
- "start-time": {
3806
- "description": "Start time filter (ISO 8601)",
3807
- "name": "start-time",
3808
- "hasDynamicHelp": false,
3809
- "multiple": false,
3810
- "type": "option"
3811
- },
3812
- "end-time": {
3813
- "description": "End time filter (ISO 8601)",
3814
- "name": "end-time",
3815
4388
  "hasDynamicHelp": false,
3816
4389
  "multiple": false,
3817
4390
  "type": "option"
@@ -3822,18 +4395,11 @@
3822
4395
  "hasDynamicHelp": false,
3823
4396
  "multiple": false,
3824
4397
  "type": "option"
3825
- },
3826
- "filter": {
3827
- "description": "Filter in field:operator:value format (repeatable)",
3828
- "name": "filter",
3829
- "hasDynamicHelp": false,
3830
- "multiple": true,
3831
- "type": "option"
3832
4398
  }
3833
4399
  },
3834
4400
  "hasDynamicHelp": false,
3835
4401
  "hiddenAliases": [],
3836
- "id": "traces:list",
4402
+ "id": "users:list",
3837
4403
  "pluginAlias": "@respan/cli",
3838
4404
  "pluginName": "@respan/cli",
3839
4405
  "pluginType": "core",
@@ -3843,14 +4409,20 @@
3843
4409
  "relativePath": [
3844
4410
  "dist",
3845
4411
  "commands",
3846
- "traces",
4412
+ "users",
3847
4413
  "list.js"
3848
4414
  ]
3849
4415
  },
3850
- "traces:summary": {
4416
+ "users:update": {
3851
4417
  "aliases": [],
3852
- "args": {},
3853
- "description": "Get a span-level summary of activity for a time range (counts, latency, cost, errors aggregated across spans)",
4418
+ "args": {
4419
+ "id": {
4420
+ "description": "Customer identifier",
4421
+ "name": "id",
4422
+ "required": true
4423
+ }
4424
+ },
4425
+ "description": "Update a user (customer)",
3854
4426
  "flags": {
3855
4427
  "api-key": {
3856
4428
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3893,18 +4465,23 @@
3893
4465
  "allowNo": false,
3894
4466
  "type": "boolean"
3895
4467
  },
3896
- "start-time": {
3897
- "description": "Start time (ISO 8601)",
3898
- "name": "start-time",
3899
- "required": true,
4468
+ "name": {
4469
+ "description": "Customer name",
4470
+ "name": "name",
3900
4471
  "hasDynamicHelp": false,
3901
4472
  "multiple": false,
3902
4473
  "type": "option"
3903
4474
  },
3904
- "end-time": {
3905
- "description": "End time (ISO 8601)",
3906
- "name": "end-time",
3907
- "required": true,
4475
+ "email": {
4476
+ "description": "Customer email",
4477
+ "name": "email",
4478
+ "hasDynamicHelp": false,
4479
+ "multiple": false,
4480
+ "type": "option"
4481
+ },
4482
+ "metadata": {
4483
+ "description": "Metadata as JSON string",
4484
+ "name": "metadata",
3908
4485
  "hasDynamicHelp": false,
3909
4486
  "multiple": false,
3910
4487
  "type": "option"
@@ -3912,7 +4489,7 @@
3912
4489
  },
3913
4490
  "hasDynamicHelp": false,
3914
4491
  "hiddenAliases": [],
3915
- "id": "traces:summary",
4492
+ "id": "users:update",
3916
4493
  "pluginAlias": "@respan/cli",
3917
4494
  "pluginName": "@respan/cli",
3918
4495
  "pluginType": "core",
@@ -3922,14 +4499,14 @@
3922
4499
  "relativePath": [
3923
4500
  "dist",
3924
4501
  "commands",
3925
- "traces",
3926
- "summary.js"
4502
+ "users",
4503
+ "update.js"
3927
4504
  ]
3928
4505
  },
3929
- "users:create": {
4506
+ "logs:create": {
3930
4507
  "aliases": [],
3931
4508
  "args": {},
3932
- "description": "Create a new user (customer)",
4509
+ "description": "Create a log span",
3933
4510
  "flags": {
3934
4511
  "api-key": {
3935
4512
  "description": "API key (env: RESPAN_API_KEY)",
@@ -3972,24 +4549,24 @@
3972
4549
  "allowNo": false,
3973
4550
  "type": "boolean"
3974
4551
  },
3975
- "identifier": {
3976
- "description": "Customer identifier",
3977
- "name": "identifier",
4552
+ "input": {
4553
+ "description": "Input text or JSON",
4554
+ "name": "input",
3978
4555
  "required": true,
3979
4556
  "hasDynamicHelp": false,
3980
4557
  "multiple": false,
3981
4558
  "type": "option"
3982
4559
  },
3983
- "name": {
3984
- "description": "Customer name",
3985
- "name": "name",
4560
+ "output": {
4561
+ "description": "Output text or JSON",
4562
+ "name": "output",
3986
4563
  "hasDynamicHelp": false,
3987
4564
  "multiple": false,
3988
4565
  "type": "option"
3989
4566
  },
3990
- "email": {
3991
- "description": "Customer email",
3992
- "name": "email",
4567
+ "model": {
4568
+ "description": "Model name",
4569
+ "name": "model",
3993
4570
  "hasDynamicHelp": false,
3994
4571
  "multiple": false,
3995
4572
  "type": "option"
@@ -4004,7 +4581,7 @@
4004
4581
  },
4005
4582
  "hasDynamicHelp": false,
4006
4583
  "hiddenAliases": [],
4007
- "id": "users:create",
4584
+ "id": "logs:create",
4008
4585
  "pluginAlias": "@respan/cli",
4009
4586
  "pluginName": "@respan/cli",
4010
4587
  "pluginType": "core",
@@ -4014,20 +4591,20 @@
4014
4591
  "relativePath": [
4015
4592
  "dist",
4016
4593
  "commands",
4017
- "users",
4594
+ "logs",
4018
4595
  "create.js"
4019
4596
  ]
4020
4597
  },
4021
- "users:get": {
4598
+ "logs:get": {
4022
4599
  "aliases": [],
4023
4600
  "args": {
4024
4601
  "id": {
4025
- "description": "Customer identifier",
4602
+ "description": "Span ID",
4026
4603
  "name": "id",
4027
4604
  "required": true
4028
4605
  }
4029
4606
  },
4030
- "description": "Get a specific user (customer)",
4607
+ "description": "Get a specific log span",
4031
4608
  "flags": {
4032
4609
  "api-key": {
4033
4610
  "description": "API key (env: RESPAN_API_KEY)",
@@ -4073,7 +4650,7 @@
4073
4650
  },
4074
4651
  "hasDynamicHelp": false,
4075
4652
  "hiddenAliases": [],
4076
- "id": "users:get",
4653
+ "id": "logs:get",
4077
4654
  "pluginAlias": "@respan/cli",
4078
4655
  "pluginName": "@respan/cli",
4079
4656
  "pluginType": "core",
@@ -4083,14 +4660,14 @@
4083
4660
  "relativePath": [
4084
4661
  "dist",
4085
4662
  "commands",
4086
- "users",
4663
+ "logs",
4087
4664
  "get.js"
4088
4665
  ]
4089
4666
  },
4090
- "users:list": {
4667
+ "logs:list": {
4091
4668
  "aliases": [],
4092
4669
  "args": {},
4093
- "description": "List users (customers)",
4670
+ "description": "List and filter LLM request logs (spans).\n\nSupports pagination, sorting, time range, and server-side filtering.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
4094
4671
  "flags": {
4095
4672
  "api-key": {
4096
4673
  "description": "API key (env: RESPAN_API_KEY)",
@@ -4134,9 +4711,9 @@
4134
4711
  "type": "boolean"
4135
4712
  },
4136
4713
  "limit": {
4137
- "description": "Number of results per page",
4714
+ "description": "Number of results per page (max 1000)",
4138
4715
  "name": "limit",
4139
- "default": 20,
4716
+ "default": 50,
4140
4717
  "hasDynamicHelp": false,
4141
4718
  "multiple": false,
4142
4719
  "type": "option"
@@ -4150,15 +4727,50 @@
4150
4727
  "type": "option"
4151
4728
  },
4152
4729
  "sort-by": {
4153
- "description": "Sort field",
4730
+ "description": "Sort field (prefix with - for descending, e.g. -cost, -latency)",
4154
4731
  "name": "sort-by",
4155
4732
  "hasDynamicHelp": false,
4156
4733
  "multiple": false,
4157
4734
  "type": "option"
4158
4735
  },
4159
- "environment": {
4160
- "description": "Environment filter",
4161
- "name": "environment",
4736
+ "start-time": {
4737
+ "description": "Start time filter (ISO 8601)",
4738
+ "name": "start-time",
4739
+ "hasDynamicHelp": false,
4740
+ "multiple": false,
4741
+ "type": "option"
4742
+ },
4743
+ "end-time": {
4744
+ "description": "End time filter (ISO 8601)",
4745
+ "name": "end-time",
4746
+ "hasDynamicHelp": false,
4747
+ "multiple": false,
4748
+ "type": "option"
4749
+ },
4750
+ "filter": {
4751
+ "description": "Filter in field:operator:value format (repeatable)",
4752
+ "name": "filter",
4753
+ "hasDynamicHelp": false,
4754
+ "multiple": true,
4755
+ "type": "option"
4756
+ },
4757
+ "all-envs": {
4758
+ "description": "Include all environments (true/false)",
4759
+ "name": "all-envs",
4760
+ "hasDynamicHelp": false,
4761
+ "multiple": false,
4762
+ "type": "option"
4763
+ },
4764
+ "is-test": {
4765
+ "description": "Filter by test (true) or production (false) environment",
4766
+ "name": "is-test",
4767
+ "hasDynamicHelp": false,
4768
+ "multiple": false,
4769
+ "type": "option"
4770
+ },
4771
+ "include-fields": {
4772
+ "description": "Comma-separated fields to include in response",
4773
+ "name": "include-fields",
4162
4774
  "hasDynamicHelp": false,
4163
4775
  "multiple": false,
4164
4776
  "type": "option"
@@ -4166,7 +4778,7 @@
4166
4778
  },
4167
4779
  "hasDynamicHelp": false,
4168
4780
  "hiddenAliases": [],
4169
- "id": "users:list",
4781
+ "id": "logs:list",
4170
4782
  "pluginAlias": "@respan/cli",
4171
4783
  "pluginName": "@respan/cli",
4172
4784
  "pluginType": "core",
@@ -4176,20 +4788,14 @@
4176
4788
  "relativePath": [
4177
4789
  "dist",
4178
4790
  "commands",
4179
- "users",
4791
+ "logs",
4180
4792
  "list.js"
4181
4793
  ]
4182
4794
  },
4183
- "users:update": {
4795
+ "logs:summary": {
4184
4796
  "aliases": [],
4185
- "args": {
4186
- "id": {
4187
- "description": "Customer identifier",
4188
- "name": "id",
4189
- "required": true
4190
- }
4191
- },
4192
- "description": "Update a user (customer)",
4797
+ "args": {},
4798
+ "description": "Get aggregated summary statistics for log spans in a time range.\n\nReturns total cost, total tokens, request count, and score summaries.\n\nFILTER SYNTAX: field:operator:value\n\nOPERATORS:\n (empty) Exact match model::gpt-4\n not Not equal status_code:not:200\n gt Greater than cost:gt:0.01\n gte Greater than/equal latency:gte:1.0\n lt Less than cost:lt:0.5\n lte Less than/equal prompt_tokens:lte:100\n contains Contains substring error_message:contains:timeout\n icontains Case-insensitive model:icontains:gpt\n startswith Starts with model:startswith:gpt\n endswith Ends with model:endswith:mini\n in Value in list model:in:gpt-4,gpt-4o\n isnull Is null error_message:isnull:true\n iexact Case-insens. exact status:iexact:success\n\nFILTERABLE FIELDS (logs):\n model, status_code, status, cost, latency, prompt_tokens,\n completion_tokens, customer_identifier, custom_identifier,\n thread_identifier, trace_unique_id, span_name, span_workflow_name,\n environment, log_type, error_message, failed, provider_id,\n deployment_name, prompt_name, prompt_id, unique_id, stream,\n temperature, max_tokens, tokens_per_second, time_to_first_token,\n total_request_tokens, metadata__<key>, scores__<evaluator_id>\n\nEXAMPLES:\n --filter model::gpt-4o --filter cost:gt:0.01\n --filter status_code:not:200\n --filter metadata__env::production\n --filter model:in:gpt-4,gpt-4o",
4193
4799
  "flags": {
4194
4800
  "api-key": {
4195
4801
  "description": "API key (env: RESPAN_API_KEY)",
@@ -4232,23 +4838,39 @@
4232
4838
  "allowNo": false,
4233
4839
  "type": "boolean"
4234
4840
  },
4235
- "name": {
4236
- "description": "Customer name",
4237
- "name": "name",
4841
+ "start-time": {
4842
+ "description": "Start time (ISO 8601)",
4843
+ "name": "start-time",
4844
+ "required": true,
4238
4845
  "hasDynamicHelp": false,
4239
4846
  "multiple": false,
4240
4847
  "type": "option"
4241
4848
  },
4242
- "email": {
4243
- "description": "Customer email",
4244
- "name": "email",
4849
+ "end-time": {
4850
+ "description": "End time (ISO 8601)",
4851
+ "name": "end-time",
4852
+ "required": true,
4245
4853
  "hasDynamicHelp": false,
4246
4854
  "multiple": false,
4247
4855
  "type": "option"
4248
4856
  },
4249
- "metadata": {
4250
- "description": "Metadata as JSON string",
4251
- "name": "metadata",
4857
+ "filter": {
4858
+ "description": "Filter in field:operator:value format (repeatable)",
4859
+ "name": "filter",
4860
+ "hasDynamicHelp": false,
4861
+ "multiple": true,
4862
+ "type": "option"
4863
+ },
4864
+ "all-envs": {
4865
+ "description": "Include all environments (true/false)",
4866
+ "name": "all-envs",
4867
+ "hasDynamicHelp": false,
4868
+ "multiple": false,
4869
+ "type": "option"
4870
+ },
4871
+ "is-test": {
4872
+ "description": "Filter by test (true) or production (false) environment",
4873
+ "name": "is-test",
4252
4874
  "hasDynamicHelp": false,
4253
4875
  "multiple": false,
4254
4876
  "type": "option"
@@ -4256,7 +4878,7 @@
4256
4878
  },
4257
4879
  "hasDynamicHelp": false,
4258
4880
  "hiddenAliases": [],
4259
- "id": "users:update",
4881
+ "id": "logs:summary",
4260
4882
  "pluginAlias": "@respan/cli",
4261
4883
  "pluginName": "@respan/cli",
4262
4884
  "pluginType": "core",
@@ -4266,10 +4888,10 @@
4266
4888
  "relativePath": [
4267
4889
  "dist",
4268
4890
  "commands",
4269
- "users",
4270
- "update.js"
4891
+ "logs",
4892
+ "summary.js"
4271
4893
  ]
4272
4894
  }
4273
4895
  },
4274
- "version": "0.13.3"
4896
+ "version": "0.14.1"
4275
4897
  }