@respan/cli 0.13.3 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,20 @@
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
+ "eval": {
1452
1587
  "aliases": [],
1453
1588
  "args": {
1454
- "id": {
1455
- "description": "Evaluator ID",
1456
- "name": "id",
1589
+ "file": {
1590
+ "description": "Path to eval JSON file",
1591
+ "name": "file",
1457
1592
  "required": true
1458
1593
  }
1459
1594
  },
1460
- "description": "Run an evaluator",
1595
+ "description": "Run an eval defined in a JSON file (creates prompt + dataset on the platform)",
1461
1596
  "flags": {
1462
1597
  "api-key": {
1463
1598
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1499,32 +1634,11 @@
1499
1634
  "name": "verbose",
1500
1635
  "allowNo": false,
1501
1636
  "type": "boolean"
1502
- },
1503
- "dataset-id": {
1504
- "description": "Dataset ID to evaluate against",
1505
- "name": "dataset-id",
1506
- "hasDynamicHelp": false,
1507
- "multiple": false,
1508
- "type": "option"
1509
- },
1510
- "log-ids": {
1511
- "description": "Comma-separated log/span IDs to evaluate",
1512
- "name": "log-ids",
1513
- "hasDynamicHelp": false,
1514
- "multiple": false,
1515
- "type": "option"
1516
- },
1517
- "params": {
1518
- "description": "Additional parameters as JSON string",
1519
- "name": "params",
1520
- "hasDynamicHelp": false,
1521
- "multiple": false,
1522
- "type": "option"
1523
1637
  }
1524
1638
  },
1525
1639
  "hasDynamicHelp": false,
1526
1640
  "hiddenAliases": [],
1527
- "id": "evaluators:run",
1641
+ "id": "eval",
1528
1642
  "pluginAlias": "@respan/cli",
1529
1643
  "pluginName": "@respan/cli",
1530
1644
  "pluginType": "core",
@@ -1534,20 +1648,14 @@
1534
1648
  "relativePath": [
1535
1649
  "dist",
1536
1650
  "commands",
1537
- "evaluators",
1538
- "run.js"
1651
+ "eval",
1652
+ "index.js"
1539
1653
  ]
1540
1654
  },
1541
- "evaluators:update": {
1655
+ "evaluators:create": {
1542
1656
  "aliases": [],
1543
- "args": {
1544
- "id": {
1545
- "description": "Evaluator ID",
1546
- "name": "id",
1547
- "required": true
1548
- }
1549
- },
1550
- "description": "Update an evaluator",
1657
+ "args": {},
1658
+ "description": "Create a new evaluator",
1551
1659
  "flags": {
1552
1660
  "api-key": {
1553
1661
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1593,6 +1701,14 @@
1593
1701
  "name": {
1594
1702
  "description": "Evaluator name",
1595
1703
  "name": "name",
1704
+ "required": true,
1705
+ "hasDynamicHelp": false,
1706
+ "multiple": false,
1707
+ "type": "option"
1708
+ },
1709
+ "type": {
1710
+ "description": "Evaluator type",
1711
+ "name": "type",
1596
1712
  "hasDynamicHelp": false,
1597
1713
  "multiple": false,
1598
1714
  "type": "option"
@@ -1614,7 +1730,7 @@
1614
1730
  },
1615
1731
  "hasDynamicHelp": false,
1616
1732
  "hiddenAliases": [],
1617
- "id": "evaluators:update",
1733
+ "id": "evaluators:create",
1618
1734
  "pluginAlias": "@respan/cli",
1619
1735
  "pluginName": "@respan/cli",
1620
1736
  "pluginType": "core",
@@ -1625,13 +1741,19 @@
1625
1741
  "dist",
1626
1742
  "commands",
1627
1743
  "evaluators",
1628
- "update.js"
1744
+ "create.js"
1629
1745
  ]
1630
1746
  },
1631
- "experiments:create": {
1747
+ "evaluators:get": {
1632
1748
  "aliases": [],
1633
- "args": {},
1634
- "description": "Create a new experiment",
1749
+ "args": {
1750
+ "id": {
1751
+ "description": "Evaluator ID",
1752
+ "name": "id",
1753
+ "required": true
1754
+ }
1755
+ },
1756
+ "description": "Get a specific evaluator",
1635
1757
  "flags": {
1636
1758
  "api-key": {
1637
1759
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1673,33 +1795,82 @@
1673
1795
  "name": "verbose",
1674
1796
  "allowNo": false,
1675
1797
  "type": "boolean"
1798
+ }
1799
+ },
1800
+ "hasDynamicHelp": false,
1801
+ "hiddenAliases": [],
1802
+ "id": "evaluators:get",
1803
+ "pluginAlias": "@respan/cli",
1804
+ "pluginName": "@respan/cli",
1805
+ "pluginType": "core",
1806
+ "strict": true,
1807
+ "enableJsonFlag": false,
1808
+ "isESM": true,
1809
+ "relativePath": [
1810
+ "dist",
1811
+ "commands",
1812
+ "evaluators",
1813
+ "get.js"
1814
+ ]
1815
+ },
1816
+ "evaluators:list": {
1817
+ "aliases": [],
1818
+ "args": {},
1819
+ "description": "List evaluators",
1820
+ "flags": {
1821
+ "api-key": {
1822
+ "description": "API key (env: RESPAN_API_KEY)",
1823
+ "env": "RESPAN_API_KEY",
1824
+ "name": "api-key",
1825
+ "hasDynamicHelp": false,
1826
+ "multiple": false,
1827
+ "type": "option"
1676
1828
  },
1677
- "name": {
1678
- "description": "Experiment name",
1679
- "name": "name",
1680
- "required": true,
1829
+ "base-url": {
1830
+ "description": "Temporary API base URL override for this command",
1831
+ "name": "base-url",
1681
1832
  "hasDynamicHelp": false,
1682
1833
  "multiple": false,
1683
1834
  "type": "option"
1684
1835
  },
1685
- "dataset-id": {
1686
- "description": "Dataset ID",
1687
- "name": "dataset-id",
1688
- "required": true,
1836
+ "profile": {
1837
+ "description": "Named profile to use",
1838
+ "name": "profile",
1689
1839
  "hasDynamicHelp": false,
1690
1840
  "multiple": false,
1691
1841
  "type": "option"
1692
1842
  },
1693
- "description": {
1694
- "description": "Experiment description",
1695
- "name": "description",
1843
+ "json": {
1844
+ "description": "Output as JSON",
1845
+ "name": "json",
1846
+ "allowNo": false,
1847
+ "type": "boolean"
1848
+ },
1849
+ "csv": {
1850
+ "description": "Output as CSV",
1851
+ "name": "csv",
1852
+ "allowNo": false,
1853
+ "type": "boolean"
1854
+ },
1855
+ "verbose": {
1856
+ "char": "v",
1857
+ "description": "Show verbose output",
1858
+ "name": "verbose",
1859
+ "allowNo": false,
1860
+ "type": "boolean"
1861
+ },
1862
+ "limit": {
1863
+ "description": "Number of results per page",
1864
+ "name": "limit",
1865
+ "default": 20,
1696
1866
  "hasDynamicHelp": false,
1697
1867
  "multiple": false,
1698
1868
  "type": "option"
1699
1869
  },
1700
- "workflows": {
1701
- "description": "Workflows configuration as JSON string",
1702
- "name": "workflows",
1870
+ "page": {
1871
+ "description": "Page number",
1872
+ "name": "page",
1873
+ "default": 1,
1703
1874
  "hasDynamicHelp": false,
1704
1875
  "multiple": false,
1705
1876
  "type": "option"
@@ -1707,7 +1878,7 @@
1707
1878
  },
1708
1879
  "hasDynamicHelp": false,
1709
1880
  "hiddenAliases": [],
1710
- "id": "experiments:create",
1881
+ "id": "evaluators:list",
1711
1882
  "pluginAlias": "@respan/cli",
1712
1883
  "pluginName": "@respan/cli",
1713
1884
  "pluginType": "core",
@@ -1717,20 +1888,20 @@
1717
1888
  "relativePath": [
1718
1889
  "dist",
1719
1890
  "commands",
1720
- "experiments",
1721
- "create.js"
1891
+ "evaluators",
1892
+ "list.js"
1722
1893
  ]
1723
1894
  },
1724
- "experiments:get": {
1895
+ "evaluators:run": {
1725
1896
  "aliases": [],
1726
1897
  "args": {
1727
1898
  "id": {
1728
- "description": "Experiment ID",
1899
+ "description": "Evaluator ID",
1729
1900
  "name": "id",
1730
1901
  "required": true
1731
1902
  }
1732
1903
  },
1733
- "description": "Get a specific experiment",
1904
+ "description": "Run an evaluator",
1734
1905
  "flags": {
1735
1906
  "api-key": {
1736
1907
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1772,11 +1943,32 @@
1772
1943
  "name": "verbose",
1773
1944
  "allowNo": false,
1774
1945
  "type": "boolean"
1946
+ },
1947
+ "dataset-id": {
1948
+ "description": "Dataset ID to evaluate against",
1949
+ "name": "dataset-id",
1950
+ "hasDynamicHelp": false,
1951
+ "multiple": false,
1952
+ "type": "option"
1953
+ },
1954
+ "log-ids": {
1955
+ "description": "Comma-separated log/span IDs to evaluate",
1956
+ "name": "log-ids",
1957
+ "hasDynamicHelp": false,
1958
+ "multiple": false,
1959
+ "type": "option"
1960
+ },
1961
+ "params": {
1962
+ "description": "Additional parameters as JSON string",
1963
+ "name": "params",
1964
+ "hasDynamicHelp": false,
1965
+ "multiple": false,
1966
+ "type": "option"
1775
1967
  }
1776
1968
  },
1777
1969
  "hasDynamicHelp": false,
1778
1970
  "hiddenAliases": [],
1779
- "id": "experiments:get",
1971
+ "id": "evaluators:run",
1780
1972
  "pluginAlias": "@respan/cli",
1781
1973
  "pluginName": "@respan/cli",
1782
1974
  "pluginType": "core",
@@ -1786,14 +1978,20 @@
1786
1978
  "relativePath": [
1787
1979
  "dist",
1788
1980
  "commands",
1789
- "experiments",
1790
- "get.js"
1981
+ "evaluators",
1982
+ "run.js"
1791
1983
  ]
1792
1984
  },
1793
- "experiments:list": {
1985
+ "evaluators:update": {
1794
1986
  "aliases": [],
1795
- "args": {},
1796
- "description": "List experiments",
1987
+ "args": {
1988
+ "id": {
1989
+ "description": "Evaluator ID",
1990
+ "name": "id",
1991
+ "required": true
1992
+ }
1993
+ },
1994
+ "description": "Update an evaluator",
1797
1995
  "flags": {
1798
1996
  "api-key": {
1799
1997
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1836,18 +2034,23 @@
1836
2034
  "allowNo": false,
1837
2035
  "type": "boolean"
1838
2036
  },
1839
- "limit": {
1840
- "description": "Number of results per page",
1841
- "name": "limit",
1842
- "default": 20,
2037
+ "name": {
2038
+ "description": "Evaluator name",
2039
+ "name": "name",
1843
2040
  "hasDynamicHelp": false,
1844
2041
  "multiple": false,
1845
2042
  "type": "option"
1846
2043
  },
1847
- "page": {
1848
- "description": "Page number",
1849
- "name": "page",
1850
- "default": 1,
2044
+ "description": {
2045
+ "description": "Evaluator description",
2046
+ "name": "description",
2047
+ "hasDynamicHelp": false,
2048
+ "multiple": false,
2049
+ "type": "option"
2050
+ },
2051
+ "config": {
2052
+ "description": "Evaluator config as JSON string",
2053
+ "name": "config",
1851
2054
  "hasDynamicHelp": false,
1852
2055
  "multiple": false,
1853
2056
  "type": "option"
@@ -1855,7 +2058,7 @@
1855
2058
  },
1856
2059
  "hasDynamicHelp": false,
1857
2060
  "hiddenAliases": [],
1858
- "id": "experiments:list",
2061
+ "id": "evaluators:update",
1859
2062
  "pluginAlias": "@respan/cli",
1860
2063
  "pluginName": "@respan/cli",
1861
2064
  "pluginType": "core",
@@ -1865,22 +2068,14 @@
1865
2068
  "relativePath": [
1866
2069
  "dist",
1867
2070
  "commands",
1868
- "experiments",
1869
- "list.js"
2071
+ "evaluators",
2072
+ "update.js"
1870
2073
  ]
1871
2074
  },
1872
- "integrate:claude-code": {
2075
+ "experiments:create": {
1873
2076
  "aliases": [],
1874
2077
  "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\"}'",
1882
- "respan integrate claude-code --dry-run"
1883
- ],
2078
+ "description": "Create a new experiment",
1884
2079
  "flags": {
1885
2080
  "api-key": {
1886
2081
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1891,9 +2086,8 @@
1891
2086
  "type": "option"
1892
2087
  },
1893
2088
  "base-url": {
1894
- "description": "Respan API base URL (for enterprise deployments)",
2089
+ "description": "Temporary API base URL override for this command",
1895
2090
  "name": "base-url",
1896
- "default": "https://api.respan.ai/api",
1897
2091
  "hasDynamicHelp": false,
1898
2092
  "multiple": false,
1899
2093
  "type": "option"
@@ -1924,90 +2118,109 @@
1924
2118
  "allowNo": false,
1925
2119
  "type": "boolean"
1926
2120
  },
1927
- "local": {
1928
- "description": "Write per-project config (default)",
1929
- "exclusive": [
1930
- "global"
1931
- ],
1932
- "name": "local",
1933
- "allowNo": false,
1934
- "type": "boolean"
1935
- },
1936
- "global": {
1937
- "description": "Write user-level global config",
1938
- "exclusive": [
1939
- "local"
1940
- ],
1941
- "name": "global",
1942
- "allowNo": false,
1943
- "type": "boolean"
2121
+ "name": {
2122
+ "description": "Experiment name",
2123
+ "name": "name",
2124
+ "required": true,
2125
+ "hasDynamicHelp": false,
2126
+ "multiple": false,
2127
+ "type": "option"
1944
2128
  },
1945
- "enable": {
1946
- "description": "Enable tracing (default)",
1947
- "exclusive": [
1948
- "disable"
1949
- ],
1950
- "name": "enable",
1951
- "allowNo": false,
1952
- "type": "boolean"
1953
- },
1954
- "disable": {
1955
- "description": "Disable tracing",
1956
- "exclusive": [
1957
- "enable"
1958
- ],
1959
- "name": "disable",
1960
- "allowNo": false,
1961
- "type": "boolean"
1962
- },
1963
- "project-id": {
1964
- "description": "Respan project ID (added to metadata / resource attributes)",
1965
- "env": "RESPAN_PROJECT_ID",
1966
- "name": "project-id",
2129
+ "dataset-id": {
2130
+ "description": "Dataset ID",
2131
+ "name": "dataset-id",
2132
+ "required": true,
1967
2133
  "hasDynamicHelp": false,
1968
2134
  "multiple": false,
1969
2135
  "type": "option"
1970
2136
  },
1971
- "attrs": {
1972
- "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1973
- "name": "attrs",
1974
- "default": "{}",
2137
+ "description": {
2138
+ "description": "Experiment description",
2139
+ "name": "description",
1975
2140
  "hasDynamicHelp": false,
1976
2141
  "multiple": false,
1977
2142
  "type": "option"
1978
2143
  },
1979
- "customer-id": {
1980
- "description": "Customer/user identifier for traces (e.g. your name or email)",
1981
- "env": "RESPAN_CUSTOMER_ID",
1982
- "name": "customer-id",
2144
+ "workflows": {
2145
+ "description": "Workflows configuration as JSON string",
2146
+ "name": "workflows",
2147
+ "hasDynamicHelp": false,
2148
+ "multiple": false,
2149
+ "type": "option"
2150
+ }
2151
+ },
2152
+ "hasDynamicHelp": false,
2153
+ "hiddenAliases": [],
2154
+ "id": "experiments:create",
2155
+ "pluginAlias": "@respan/cli",
2156
+ "pluginName": "@respan/cli",
2157
+ "pluginType": "core",
2158
+ "strict": true,
2159
+ "enableJsonFlag": false,
2160
+ "isESM": true,
2161
+ "relativePath": [
2162
+ "dist",
2163
+ "commands",
2164
+ "experiments",
2165
+ "create.js"
2166
+ ]
2167
+ },
2168
+ "experiments:get": {
2169
+ "aliases": [],
2170
+ "args": {
2171
+ "id": {
2172
+ "description": "Experiment ID",
2173
+ "name": "id",
2174
+ "required": true
2175
+ }
2176
+ },
2177
+ "description": "Get a specific experiment",
2178
+ "flags": {
2179
+ "api-key": {
2180
+ "description": "API key (env: RESPAN_API_KEY)",
2181
+ "env": "RESPAN_API_KEY",
2182
+ "name": "api-key",
1983
2183
  "hasDynamicHelp": false,
1984
2184
  "multiple": false,
1985
2185
  "type": "option"
1986
2186
  },
1987
- "span-name": {
1988
- "description": "Root span name for traces (default: claude-code)",
1989
- "name": "span-name",
2187
+ "base-url": {
2188
+ "description": "Temporary API base URL override for this command",
2189
+ "name": "base-url",
1990
2190
  "hasDynamicHelp": false,
1991
2191
  "multiple": false,
1992
2192
  "type": "option"
1993
2193
  },
1994
- "workflow-name": {
1995
- "description": "Workflow name for traces (default: claude-code)",
1996
- "name": "workflow-name",
2194
+ "profile": {
2195
+ "description": "Named profile to use",
2196
+ "name": "profile",
1997
2197
  "hasDynamicHelp": false,
1998
2198
  "multiple": false,
1999
2199
  "type": "option"
2000
2200
  },
2001
- "dry-run": {
2002
- "description": "Preview changes without writing files",
2003
- "name": "dry-run",
2201
+ "json": {
2202
+ "description": "Output as JSON",
2203
+ "name": "json",
2204
+ "allowNo": false,
2205
+ "type": "boolean"
2206
+ },
2207
+ "csv": {
2208
+ "description": "Output as CSV",
2209
+ "name": "csv",
2210
+ "allowNo": false,
2211
+ "type": "boolean"
2212
+ },
2213
+ "verbose": {
2214
+ "char": "v",
2215
+ "description": "Show verbose output",
2216
+ "name": "verbose",
2004
2217
  "allowNo": false,
2005
2218
  "type": "boolean"
2006
2219
  }
2007
2220
  },
2008
2221
  "hasDynamicHelp": false,
2009
2222
  "hiddenAliases": [],
2010
- "id": "integrate:claude-code",
2223
+ "id": "experiments:get",
2011
2224
  "pluginAlias": "@respan/cli",
2012
2225
  "pluginName": "@respan/cli",
2013
2226
  "pluginType": "core",
@@ -2017,22 +2230,14 @@
2017
2230
  "relativePath": [
2018
2231
  "dist",
2019
2232
  "commands",
2020
- "integrate",
2021
- "claude-code.js"
2233
+ "experiments",
2234
+ "get.js"
2022
2235
  ]
2023
2236
  },
2024
- "integrate:codex-cli": {
2237
+ "experiments:list": {
2025
2238
  "aliases": [],
2026
2239
  "args": {},
2027
- "description": "Integrate Respan with Codex CLI.\n\nInstalls a notify hook that reads session JSONL files and sends\nthem to Respan as structured spans (chat, tool, reasoning).\n\nScope:\n --global Install hook script + register notify in ~/.codex/config.toml\n --local Write .codex/respan.json with customer_id, span_name, etc.\n\nDefault behavior installs the global notify hook and writes local project config.",
2028
- "examples": [
2029
- "respan integrate codex-cli",
2030
- "respan integrate codex-cli --disable",
2031
- "respan integrate codex-cli --global",
2032
- "respan integrate codex-cli --local --customer-id frank",
2033
- "respan integrate codex-cli --attrs '{\"env\":\"prod\"}'",
2034
- "respan integrate codex-cli --dry-run"
2035
- ],
2240
+ "description": "List experiments",
2036
2241
  "flags": {
2037
2242
  "api-key": {
2038
2243
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2043,9 +2248,8 @@
2043
2248
  "type": "option"
2044
2249
  },
2045
2250
  "base-url": {
2046
- "description": "Respan API base URL (for enterprise deployments)",
2251
+ "description": "Temporary API base URL override for this command",
2047
2252
  "name": "base-url",
2048
- "default": "https://api.respan.ai/api",
2049
2253
  "hasDynamicHelp": false,
2050
2254
  "multiple": false,
2051
2255
  "type": "option"
@@ -2076,90 +2280,26 @@
2076
2280
  "allowNo": false,
2077
2281
  "type": "boolean"
2078
2282
  },
2079
- "local": {
2080
- "description": "Write per-project config (default)",
2081
- "exclusive": [
2082
- "global"
2083
- ],
2084
- "name": "local",
2085
- "allowNo": false,
2086
- "type": "boolean"
2087
- },
2088
- "global": {
2089
- "description": "Write user-level global config",
2090
- "exclusive": [
2091
- "local"
2092
- ],
2093
- "name": "global",
2094
- "allowNo": false,
2095
- "type": "boolean"
2096
- },
2097
- "enable": {
2098
- "description": "Enable tracing (default)",
2099
- "exclusive": [
2100
- "disable"
2101
- ],
2102
- "name": "enable",
2103
- "allowNo": false,
2104
- "type": "boolean"
2105
- },
2106
- "disable": {
2107
- "description": "Disable tracing",
2108
- "exclusive": [
2109
- "enable"
2110
- ],
2111
- "name": "disable",
2112
- "allowNo": false,
2113
- "type": "boolean"
2114
- },
2115
- "project-id": {
2116
- "description": "Respan project ID (added to metadata / resource attributes)",
2117
- "env": "RESPAN_PROJECT_ID",
2118
- "name": "project-id",
2119
- "hasDynamicHelp": false,
2120
- "multiple": false,
2121
- "type": "option"
2122
- },
2123
- "attrs": {
2124
- "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
2125
- "name": "attrs",
2126
- "default": "{}",
2127
- "hasDynamicHelp": false,
2128
- "multiple": false,
2129
- "type": "option"
2130
- },
2131
- "customer-id": {
2132
- "description": "Customer/user identifier for traces (e.g. your name or email)",
2133
- "env": "RESPAN_CUSTOMER_ID",
2134
- "name": "customer-id",
2135
- "hasDynamicHelp": false,
2136
- "multiple": false,
2137
- "type": "option"
2138
- },
2139
- "span-name": {
2140
- "description": "Root span name for traces (default: claude-code)",
2141
- "name": "span-name",
2283
+ "limit": {
2284
+ "description": "Number of results per page",
2285
+ "name": "limit",
2286
+ "default": 20,
2142
2287
  "hasDynamicHelp": false,
2143
2288
  "multiple": false,
2144
2289
  "type": "option"
2145
2290
  },
2146
- "workflow-name": {
2147
- "description": "Workflow name for traces (default: claude-code)",
2148
- "name": "workflow-name",
2291
+ "page": {
2292
+ "description": "Page number",
2293
+ "name": "page",
2294
+ "default": 1,
2149
2295
  "hasDynamicHelp": false,
2150
2296
  "multiple": false,
2151
2297
  "type": "option"
2152
- },
2153
- "dry-run": {
2154
- "description": "Preview changes without writing files",
2155
- "name": "dry-run",
2156
- "allowNo": false,
2157
- "type": "boolean"
2158
2298
  }
2159
2299
  },
2160
2300
  "hasDynamicHelp": false,
2161
2301
  "hiddenAliases": [],
2162
- "id": "integrate:codex-cli",
2302
+ "id": "experiments:list",
2163
2303
  "pluginAlias": "@respan/cli",
2164
2304
  "pluginName": "@respan/cli",
2165
2305
  "pluginType": "core",
@@ -2169,21 +2309,14 @@
2169
2309
  "relativePath": [
2170
2310
  "dist",
2171
2311
  "commands",
2172
- "integrate",
2173
- "codex-cli.js"
2312
+ "experiments",
2313
+ "list.js"
2174
2314
  ]
2175
2315
  },
2176
- "integrate:gemini-cli": {
2316
+ "logs:create": {
2177
2317
  "aliases": [],
2178
2318
  "args": {},
2179
- "description": "Integrate Respan with Gemini CLI.\n\nInstalls an AfterModel hook that captures LLM request/response data\nand sends it to Respan as structured spans with model, token counts,\nand input/output.\n\nScope:\n --global Write to ~/.gemini/settings.json (default)\n --local Write to .gemini/settings.json in project root\n\nGemini CLI ignores workspace-level telemetry settings, so --global is the default.",
2180
- "examples": [
2181
- "respan integrate gemini-cli",
2182
- "respan integrate gemini-cli --disable",
2183
- "respan integrate gemini-cli --local",
2184
- "respan integrate gemini-cli --project-id my-project --attrs '{\"env\":\"prod\"}'",
2185
- "respan integrate gemini-cli --dry-run"
2186
- ],
2319
+ "description": "Create a log span",
2187
2320
  "flags": {
2188
2321
  "api-key": {
2189
2322
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2194,9 +2327,8 @@
2194
2327
  "type": "option"
2195
2328
  },
2196
2329
  "base-url": {
2197
- "description": "Respan API base URL (for enterprise deployments)",
2330
+ "description": "Temporary API base URL override for this command",
2198
2331
  "name": "base-url",
2199
- "default": "https://api.respan.ai/api",
2200
2332
  "hasDynamicHelp": false,
2201
2333
  "multiple": false,
2202
2334
  "type": "option"
@@ -2227,90 +2359,39 @@
2227
2359
  "allowNo": false,
2228
2360
  "type": "boolean"
2229
2361
  },
2230
- "local": {
2231
- "description": "Write per-project config (default)",
2232
- "exclusive": [
2233
- "global"
2234
- ],
2235
- "name": "local",
2236
- "allowNo": false,
2237
- "type": "boolean"
2362
+ "input": {
2363
+ "description": "Input text or JSON",
2364
+ "name": "input",
2365
+ "required": true,
2366
+ "hasDynamicHelp": false,
2367
+ "multiple": false,
2368
+ "type": "option"
2238
2369
  },
2239
- "global": {
2240
- "description": "Write user-level global config",
2241
- "exclusive": [
2242
- "local"
2243
- ],
2244
- "name": "global",
2245
- "allowNo": false,
2246
- "type": "boolean"
2370
+ "output": {
2371
+ "description": "Output text or JSON",
2372
+ "name": "output",
2373
+ "hasDynamicHelp": false,
2374
+ "multiple": false,
2375
+ "type": "option"
2247
2376
  },
2248
- "enable": {
2249
- "description": "Enable tracing (default)",
2250
- "exclusive": [
2251
- "disable"
2252
- ],
2253
- "name": "enable",
2254
- "allowNo": false,
2255
- "type": "boolean"
2256
- },
2257
- "disable": {
2258
- "description": "Disable tracing",
2259
- "exclusive": [
2260
- "enable"
2261
- ],
2262
- "name": "disable",
2263
- "allowNo": false,
2264
- "type": "boolean"
2265
- },
2266
- "project-id": {
2267
- "description": "Respan project ID (added to metadata / resource attributes)",
2268
- "env": "RESPAN_PROJECT_ID",
2269
- "name": "project-id",
2270
- "hasDynamicHelp": false,
2271
- "multiple": false,
2272
- "type": "option"
2273
- },
2274
- "attrs": {
2275
- "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
2276
- "name": "attrs",
2277
- "default": "{}",
2278
- "hasDynamicHelp": false,
2279
- "multiple": false,
2280
- "type": "option"
2281
- },
2282
- "customer-id": {
2283
- "description": "Customer/user identifier for traces (e.g. your name or email)",
2284
- "env": "RESPAN_CUSTOMER_ID",
2285
- "name": "customer-id",
2286
- "hasDynamicHelp": false,
2287
- "multiple": false,
2288
- "type": "option"
2289
- },
2290
- "span-name": {
2291
- "description": "Root span name for traces (default: claude-code)",
2292
- "name": "span-name",
2377
+ "model": {
2378
+ "description": "Model name",
2379
+ "name": "model",
2293
2380
  "hasDynamicHelp": false,
2294
2381
  "multiple": false,
2295
2382
  "type": "option"
2296
2383
  },
2297
- "workflow-name": {
2298
- "description": "Workflow name for traces (default: claude-code)",
2299
- "name": "workflow-name",
2384
+ "metadata": {
2385
+ "description": "Metadata as JSON string",
2386
+ "name": "metadata",
2300
2387
  "hasDynamicHelp": false,
2301
2388
  "multiple": false,
2302
2389
  "type": "option"
2303
- },
2304
- "dry-run": {
2305
- "description": "Preview changes without writing files",
2306
- "name": "dry-run",
2307
- "allowNo": false,
2308
- "type": "boolean"
2309
2390
  }
2310
2391
  },
2311
2392
  "hasDynamicHelp": false,
2312
2393
  "hiddenAliases": [],
2313
- "id": "integrate:gemini-cli",
2394
+ "id": "logs:create",
2314
2395
  "pluginAlias": "@respan/cli",
2315
2396
  "pluginName": "@respan/cli",
2316
2397
  "pluginType": "core",
@@ -2320,21 +2401,20 @@
2320
2401
  "relativePath": [
2321
2402
  "dist",
2322
2403
  "commands",
2323
- "integrate",
2324
- "gemini-cli.js"
2404
+ "logs",
2405
+ "create.js"
2325
2406
  ]
2326
2407
  },
2327
- "integrate:opencode": {
2408
+ "logs:get": {
2328
2409
  "aliases": [],
2329
- "args": {},
2330
- "description": "Integrate Respan with OpenCode.\n\nOpenCode's built-in OTel does not work reliably, so this uses the\ncommunity opencode-otel plugin instead.\n\nScope:\n --local Write plugin config to project root (default)\n --global Write to ~/.config/opencode/plugins/otel.json\n The opencode-otel package is always installed globally.",
2331
- "examples": [
2332
- "respan integrate opencode",
2333
- "respan integrate opencode --disable",
2334
- "respan integrate opencode --global",
2335
- "respan integrate opencode --project-id my-project --attrs '{\"env\":\"prod\"}'",
2336
- "respan integrate opencode --dry-run"
2337
- ],
2410
+ "args": {
2411
+ "id": {
2412
+ "description": "Span ID",
2413
+ "name": "id",
2414
+ "required": true
2415
+ }
2416
+ },
2417
+ "description": "Get a specific log span",
2338
2418
  "flags": {
2339
2419
  "api-key": {
2340
2420
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2345,9 +2425,8 @@
2345
2425
  "type": "option"
2346
2426
  },
2347
2427
  "base-url": {
2348
- "description": "Respan API base URL (for enterprise deployments)",
2428
+ "description": "Temporary API base URL override for this command",
2349
2429
  "name": "base-url",
2350
- "default": "https://api.respan.ai/api",
2351
2430
  "hasDynamicHelp": false,
2352
2431
  "multiple": false,
2353
2432
  "type": "option"
@@ -2377,91 +2456,11 @@
2377
2456
  "name": "verbose",
2378
2457
  "allowNo": false,
2379
2458
  "type": "boolean"
2380
- },
2381
- "local": {
2382
- "description": "Write per-project config (default)",
2383
- "exclusive": [
2384
- "global"
2385
- ],
2386
- "name": "local",
2387
- "allowNo": false,
2388
- "type": "boolean"
2389
- },
2390
- "global": {
2391
- "description": "Write user-level global config",
2392
- "exclusive": [
2393
- "local"
2394
- ],
2395
- "name": "global",
2396
- "allowNo": false,
2397
- "type": "boolean"
2398
- },
2399
- "enable": {
2400
- "description": "Enable tracing (default)",
2401
- "exclusive": [
2402
- "disable"
2403
- ],
2404
- "name": "enable",
2405
- "allowNo": false,
2406
- "type": "boolean"
2407
- },
2408
- "disable": {
2409
- "description": "Disable tracing",
2410
- "exclusive": [
2411
- "enable"
2412
- ],
2413
- "name": "disable",
2414
- "allowNo": false,
2415
- "type": "boolean"
2416
- },
2417
- "project-id": {
2418
- "description": "Respan project ID (added to metadata / resource attributes)",
2419
- "env": "RESPAN_PROJECT_ID",
2420
- "name": "project-id",
2421
- "hasDynamicHelp": false,
2422
- "multiple": false,
2423
- "type": "option"
2424
- },
2425
- "attrs": {
2426
- "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
2427
- "name": "attrs",
2428
- "default": "{}",
2429
- "hasDynamicHelp": false,
2430
- "multiple": false,
2431
- "type": "option"
2432
- },
2433
- "customer-id": {
2434
- "description": "Customer/user identifier for traces (e.g. your name or email)",
2435
- "env": "RESPAN_CUSTOMER_ID",
2436
- "name": "customer-id",
2437
- "hasDynamicHelp": false,
2438
- "multiple": false,
2439
- "type": "option"
2440
- },
2441
- "span-name": {
2442
- "description": "Root span name for traces (default: claude-code)",
2443
- "name": "span-name",
2444
- "hasDynamicHelp": false,
2445
- "multiple": false,
2446
- "type": "option"
2447
- },
2448
- "workflow-name": {
2449
- "description": "Workflow name for traces (default: claude-code)",
2450
- "name": "workflow-name",
2451
- "hasDynamicHelp": false,
2452
- "multiple": false,
2453
- "type": "option"
2454
- },
2455
- "dry-run": {
2456
- "description": "Preview changes without writing files",
2457
- "name": "dry-run",
2458
- "allowNo": false,
2459
- "type": "boolean"
2460
2459
  }
2461
2460
  },
2462
2461
  "hasDynamicHelp": false,
2463
2462
  "hiddenAliases": [],
2464
- "id": "integrate:opencode",
2463
+ "id": "logs:get",
2465
2464
  "pluginAlias": "@respan/cli",
2466
2465
  "pluginName": "@respan/cli",
2467
2466
  "pluginType": "core",
@@ -2471,14 +2470,14 @@
2471
2470
  "relativePath": [
2472
2471
  "dist",
2473
2472
  "commands",
2474
- "integrate",
2475
- "opencode.js"
2473
+ "logs",
2474
+ "get.js"
2476
2475
  ]
2477
2476
  },
2478
- "logs:create": {
2477
+ "logs:list": {
2479
2478
  "aliases": [],
2480
2479
  "args": {},
2481
- "description": "Create a log span",
2480
+ "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",
2482
2481
  "flags": {
2483
2482
  "api-key": {
2484
2483
  "description": "API key (env: RESPAN_API_KEY)",
@@ -2521,31 +2520,67 @@
2521
2520
  "allowNo": false,
2522
2521
  "type": "boolean"
2523
2522
  },
2524
- "input": {
2525
- "description": "Input text or JSON",
2526
- "name": "input",
2527
- "required": true,
2523
+ "limit": {
2524
+ "description": "Number of results per page (max 1000)",
2525
+ "name": "limit",
2526
+ "default": 50,
2528
2527
  "hasDynamicHelp": false,
2529
2528
  "multiple": false,
2530
2529
  "type": "option"
2531
2530
  },
2532
- "output": {
2533
- "description": "Output text or JSON",
2534
- "name": "output",
2531
+ "page": {
2532
+ "description": "Page number",
2533
+ "name": "page",
2534
+ "default": 1,
2535
2535
  "hasDynamicHelp": false,
2536
2536
  "multiple": false,
2537
2537
  "type": "option"
2538
2538
  },
2539
- "model": {
2540
- "description": "Model name",
2541
- "name": "model",
2539
+ "sort-by": {
2540
+ "description": "Sort field (prefix with - for descending, e.g. -cost, -latency)",
2541
+ "name": "sort-by",
2542
2542
  "hasDynamicHelp": false,
2543
2543
  "multiple": false,
2544
2544
  "type": "option"
2545
2545
  },
2546
- "metadata": {
2547
- "description": "Metadata as JSON string",
2548
- "name": "metadata",
2546
+ "start-time": {
2547
+ "description": "Start time filter (ISO 8601)",
2548
+ "name": "start-time",
2549
+ "hasDynamicHelp": false,
2550
+ "multiple": false,
2551
+ "type": "option"
2552
+ },
2553
+ "end-time": {
2554
+ "description": "End time filter (ISO 8601)",
2555
+ "name": "end-time",
2556
+ "hasDynamicHelp": false,
2557
+ "multiple": false,
2558
+ "type": "option"
2559
+ },
2560
+ "filter": {
2561
+ "description": "Filter in field:operator:value format (repeatable)",
2562
+ "name": "filter",
2563
+ "hasDynamicHelp": false,
2564
+ "multiple": true,
2565
+ "type": "option"
2566
+ },
2567
+ "all-envs": {
2568
+ "description": "Include all environments (true/false)",
2569
+ "name": "all-envs",
2570
+ "hasDynamicHelp": false,
2571
+ "multiple": false,
2572
+ "type": "option"
2573
+ },
2574
+ "is-test": {
2575
+ "description": "Filter by test (true) or production (false) environment",
2576
+ "name": "is-test",
2577
+ "hasDynamicHelp": false,
2578
+ "multiple": false,
2579
+ "type": "option"
2580
+ },
2581
+ "include-fields": {
2582
+ "description": "Comma-separated fields to include in response",
2583
+ "name": "include-fields",
2549
2584
  "hasDynamicHelp": false,
2550
2585
  "multiple": false,
2551
2586
  "type": "option"
@@ -2553,7 +2588,7 @@
2553
2588
  },
2554
2589
  "hasDynamicHelp": false,
2555
2590
  "hiddenAliases": [],
2556
- "id": "logs:create",
2591
+ "id": "logs:list",
2557
2592
  "pluginAlias": "@respan/cli",
2558
2593
  "pluginName": "@respan/cli",
2559
2594
  "pluginType": "core",
@@ -2564,210 +2599,13 @@
2564
2599
  "dist",
2565
2600
  "commands",
2566
2601
  "logs",
2567
- "create.js"
2602
+ "list.js"
2568
2603
  ]
2569
2604
  },
2570
- "logs:get": {
2605
+ "logs:summary": {
2571
2606
  "aliases": [],
2572
- "args": {
2573
- "id": {
2574
- "description": "Span ID",
2575
- "name": "id",
2576
- "required": true
2577
- }
2578
- },
2579
- "description": "Get a specific log span",
2580
- "flags": {
2581
- "api-key": {
2582
- "description": "API key (env: RESPAN_API_KEY)",
2583
- "env": "RESPAN_API_KEY",
2584
- "name": "api-key",
2585
- "hasDynamicHelp": false,
2586
- "multiple": false,
2587
- "type": "option"
2588
- },
2589
- "base-url": {
2590
- "description": "Temporary API base URL override for this command",
2591
- "name": "base-url",
2592
- "hasDynamicHelp": false,
2593
- "multiple": false,
2594
- "type": "option"
2595
- },
2596
- "profile": {
2597
- "description": "Named profile to use",
2598
- "name": "profile",
2599
- "hasDynamicHelp": false,
2600
- "multiple": false,
2601
- "type": "option"
2602
- },
2603
- "json": {
2604
- "description": "Output as JSON",
2605
- "name": "json",
2606
- "allowNo": false,
2607
- "type": "boolean"
2608
- },
2609
- "csv": {
2610
- "description": "Output as CSV",
2611
- "name": "csv",
2612
- "allowNo": false,
2613
- "type": "boolean"
2614
- },
2615
- "verbose": {
2616
- "char": "v",
2617
- "description": "Show verbose output",
2618
- "name": "verbose",
2619
- "allowNo": false,
2620
- "type": "boolean"
2621
- }
2622
- },
2623
- "hasDynamicHelp": false,
2624
- "hiddenAliases": [],
2625
- "id": "logs:get",
2626
- "pluginAlias": "@respan/cli",
2627
- "pluginName": "@respan/cli",
2628
- "pluginType": "core",
2629
- "strict": true,
2630
- "enableJsonFlag": false,
2631
- "isESM": true,
2632
- "relativePath": [
2633
- "dist",
2634
- "commands",
2635
- "logs",
2636
- "get.js"
2637
- ]
2638
- },
2639
- "logs:list": {
2640
- "aliases": [],
2641
- "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",
2643
- "flags": {
2644
- "api-key": {
2645
- "description": "API key (env: RESPAN_API_KEY)",
2646
- "env": "RESPAN_API_KEY",
2647
- "name": "api-key",
2648
- "hasDynamicHelp": false,
2649
- "multiple": false,
2650
- "type": "option"
2651
- },
2652
- "base-url": {
2653
- "description": "Temporary API base URL override for this command",
2654
- "name": "base-url",
2655
- "hasDynamicHelp": false,
2656
- "multiple": false,
2657
- "type": "option"
2658
- },
2659
- "profile": {
2660
- "description": "Named profile to use",
2661
- "name": "profile",
2662
- "hasDynamicHelp": false,
2663
- "multiple": false,
2664
- "type": "option"
2665
- },
2666
- "json": {
2667
- "description": "Output as JSON",
2668
- "name": "json",
2669
- "allowNo": false,
2670
- "type": "boolean"
2671
- },
2672
- "csv": {
2673
- "description": "Output as CSV",
2674
- "name": "csv",
2675
- "allowNo": false,
2676
- "type": "boolean"
2677
- },
2678
- "verbose": {
2679
- "char": "v",
2680
- "description": "Show verbose output",
2681
- "name": "verbose",
2682
- "allowNo": false,
2683
- "type": "boolean"
2684
- },
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",
2704
- "hasDynamicHelp": false,
2705
- "multiple": false,
2706
- "type": "option"
2707
- },
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",
2746
- "hasDynamicHelp": false,
2747
- "multiple": false,
2748
- "type": "option"
2749
- }
2750
- },
2751
- "hasDynamicHelp": false,
2752
- "hiddenAliases": [],
2753
- "id": "logs:list",
2754
- "pluginAlias": "@respan/cli",
2755
- "pluginName": "@respan/cli",
2756
- "pluginType": "core",
2757
- "strict": true,
2758
- "enableJsonFlag": false,
2759
- "isESM": true,
2760
- "relativePath": [
2761
- "dist",
2762
- "commands",
2763
- "logs",
2764
- "list.js"
2765
- ]
2766
- },
2767
- "logs:summary": {
2768
- "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",
2607
+ "args": {},
2608
+ "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",
2771
2609
  "flags": {
2772
2610
  "api-key": {
2773
2611
  "description": "API key (env: RESPAN_API_KEY)",
@@ -4037,43 +3875,681 @@
4037
3875
  "multiple": false,
4038
3876
  "type": "option"
4039
3877
  },
4040
- "base-url": {
4041
- "description": "Temporary API base URL override for this command",
4042
- "name": "base-url",
3878
+ "base-url": {
3879
+ "description": "Temporary API base URL override for this command",
3880
+ "name": "base-url",
3881
+ "hasDynamicHelp": false,
3882
+ "multiple": false,
3883
+ "type": "option"
3884
+ },
3885
+ "profile": {
3886
+ "description": "Named profile to use",
3887
+ "name": "profile",
3888
+ "hasDynamicHelp": false,
3889
+ "multiple": false,
3890
+ "type": "option"
3891
+ },
3892
+ "json": {
3893
+ "description": "Output as JSON",
3894
+ "name": "json",
3895
+ "allowNo": false,
3896
+ "type": "boolean"
3897
+ },
3898
+ "csv": {
3899
+ "description": "Output as CSV",
3900
+ "name": "csv",
3901
+ "allowNo": false,
3902
+ "type": "boolean"
3903
+ },
3904
+ "verbose": {
3905
+ "char": "v",
3906
+ "description": "Show verbose output",
3907
+ "name": "verbose",
3908
+ "allowNo": false,
3909
+ "type": "boolean"
3910
+ }
3911
+ },
3912
+ "hasDynamicHelp": false,
3913
+ "hiddenAliases": [],
3914
+ "id": "users:get",
3915
+ "pluginAlias": "@respan/cli",
3916
+ "pluginName": "@respan/cli",
3917
+ "pluginType": "core",
3918
+ "strict": true,
3919
+ "enableJsonFlag": false,
3920
+ "isESM": true,
3921
+ "relativePath": [
3922
+ "dist",
3923
+ "commands",
3924
+ "users",
3925
+ "get.js"
3926
+ ]
3927
+ },
3928
+ "users:list": {
3929
+ "aliases": [],
3930
+ "args": {},
3931
+ "description": "List users (customers)",
3932
+ "flags": {
3933
+ "api-key": {
3934
+ "description": "API key (env: RESPAN_API_KEY)",
3935
+ "env": "RESPAN_API_KEY",
3936
+ "name": "api-key",
3937
+ "hasDynamicHelp": false,
3938
+ "multiple": false,
3939
+ "type": "option"
3940
+ },
3941
+ "base-url": {
3942
+ "description": "Temporary API base URL override for this command",
3943
+ "name": "base-url",
3944
+ "hasDynamicHelp": false,
3945
+ "multiple": false,
3946
+ "type": "option"
3947
+ },
3948
+ "profile": {
3949
+ "description": "Named profile to use",
3950
+ "name": "profile",
3951
+ "hasDynamicHelp": false,
3952
+ "multiple": false,
3953
+ "type": "option"
3954
+ },
3955
+ "json": {
3956
+ "description": "Output as JSON",
3957
+ "name": "json",
3958
+ "allowNo": false,
3959
+ "type": "boolean"
3960
+ },
3961
+ "csv": {
3962
+ "description": "Output as CSV",
3963
+ "name": "csv",
3964
+ "allowNo": false,
3965
+ "type": "boolean"
3966
+ },
3967
+ "verbose": {
3968
+ "char": "v",
3969
+ "description": "Show verbose output",
3970
+ "name": "verbose",
3971
+ "allowNo": false,
3972
+ "type": "boolean"
3973
+ },
3974
+ "limit": {
3975
+ "description": "Number of results per page",
3976
+ "name": "limit",
3977
+ "default": 20,
3978
+ "hasDynamicHelp": false,
3979
+ "multiple": false,
3980
+ "type": "option"
3981
+ },
3982
+ "page": {
3983
+ "description": "Page number",
3984
+ "name": "page",
3985
+ "default": 1,
3986
+ "hasDynamicHelp": false,
3987
+ "multiple": false,
3988
+ "type": "option"
3989
+ },
3990
+ "sort-by": {
3991
+ "description": "Sort field",
3992
+ "name": "sort-by",
3993
+ "hasDynamicHelp": false,
3994
+ "multiple": false,
3995
+ "type": "option"
3996
+ },
3997
+ "environment": {
3998
+ "description": "Environment filter",
3999
+ "name": "environment",
4000
+ "hasDynamicHelp": false,
4001
+ "multiple": false,
4002
+ "type": "option"
4003
+ }
4004
+ },
4005
+ "hasDynamicHelp": false,
4006
+ "hiddenAliases": [],
4007
+ "id": "users:list",
4008
+ "pluginAlias": "@respan/cli",
4009
+ "pluginName": "@respan/cli",
4010
+ "pluginType": "core",
4011
+ "strict": true,
4012
+ "enableJsonFlag": false,
4013
+ "isESM": true,
4014
+ "relativePath": [
4015
+ "dist",
4016
+ "commands",
4017
+ "users",
4018
+ "list.js"
4019
+ ]
4020
+ },
4021
+ "users:update": {
4022
+ "aliases": [],
4023
+ "args": {
4024
+ "id": {
4025
+ "description": "Customer identifier",
4026
+ "name": "id",
4027
+ "required": true
4028
+ }
4029
+ },
4030
+ "description": "Update a user (customer)",
4031
+ "flags": {
4032
+ "api-key": {
4033
+ "description": "API key (env: RESPAN_API_KEY)",
4034
+ "env": "RESPAN_API_KEY",
4035
+ "name": "api-key",
4036
+ "hasDynamicHelp": false,
4037
+ "multiple": false,
4038
+ "type": "option"
4039
+ },
4040
+ "base-url": {
4041
+ "description": "Temporary API base URL override for this command",
4042
+ "name": "base-url",
4043
+ "hasDynamicHelp": false,
4044
+ "multiple": false,
4045
+ "type": "option"
4046
+ },
4047
+ "profile": {
4048
+ "description": "Named profile to use",
4049
+ "name": "profile",
4050
+ "hasDynamicHelp": false,
4051
+ "multiple": false,
4052
+ "type": "option"
4053
+ },
4054
+ "json": {
4055
+ "description": "Output as JSON",
4056
+ "name": "json",
4057
+ "allowNo": false,
4058
+ "type": "boolean"
4059
+ },
4060
+ "csv": {
4061
+ "description": "Output as CSV",
4062
+ "name": "csv",
4063
+ "allowNo": false,
4064
+ "type": "boolean"
4065
+ },
4066
+ "verbose": {
4067
+ "char": "v",
4068
+ "description": "Show verbose output",
4069
+ "name": "verbose",
4070
+ "allowNo": false,
4071
+ "type": "boolean"
4072
+ },
4073
+ "name": {
4074
+ "description": "Customer name",
4075
+ "name": "name",
4076
+ "hasDynamicHelp": false,
4077
+ "multiple": false,
4078
+ "type": "option"
4079
+ },
4080
+ "email": {
4081
+ "description": "Customer email",
4082
+ "name": "email",
4083
+ "hasDynamicHelp": false,
4084
+ "multiple": false,
4085
+ "type": "option"
4086
+ },
4087
+ "metadata": {
4088
+ "description": "Metadata as JSON string",
4089
+ "name": "metadata",
4090
+ "hasDynamicHelp": false,
4091
+ "multiple": false,
4092
+ "type": "option"
4093
+ }
4094
+ },
4095
+ "hasDynamicHelp": false,
4096
+ "hiddenAliases": [],
4097
+ "id": "users:update",
4098
+ "pluginAlias": "@respan/cli",
4099
+ "pluginName": "@respan/cli",
4100
+ "pluginType": "core",
4101
+ "strict": true,
4102
+ "enableJsonFlag": false,
4103
+ "isESM": true,
4104
+ "relativePath": [
4105
+ "dist",
4106
+ "commands",
4107
+ "users",
4108
+ "update.js"
4109
+ ]
4110
+ },
4111
+ "integrate:claude-code": {
4112
+ "aliases": [],
4113
+ "args": {},
4114
+ "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.",
4115
+ "examples": [
4116
+ "respan integrate claude-code",
4117
+ "respan integrate claude-code --disable",
4118
+ "respan integrate claude-code --global",
4119
+ "respan integrate claude-code --local --project-id my-project",
4120
+ "respan integrate claude-code --attrs '{\"env\":\"prod\"}'",
4121
+ "respan integrate claude-code --dry-run"
4122
+ ],
4123
+ "flags": {
4124
+ "api-key": {
4125
+ "description": "API key (env: RESPAN_API_KEY)",
4126
+ "env": "RESPAN_API_KEY",
4127
+ "name": "api-key",
4128
+ "hasDynamicHelp": false,
4129
+ "multiple": false,
4130
+ "type": "option"
4131
+ },
4132
+ "base-url": {
4133
+ "description": "Respan API base URL (for enterprise deployments)",
4134
+ "name": "base-url",
4135
+ "default": "https://api.respan.ai/api",
4136
+ "hasDynamicHelp": false,
4137
+ "multiple": false,
4138
+ "type": "option"
4139
+ },
4140
+ "profile": {
4141
+ "description": "Named profile to use",
4142
+ "name": "profile",
4143
+ "hasDynamicHelp": false,
4144
+ "multiple": false,
4145
+ "type": "option"
4146
+ },
4147
+ "json": {
4148
+ "description": "Output as JSON",
4149
+ "name": "json",
4150
+ "allowNo": false,
4151
+ "type": "boolean"
4152
+ },
4153
+ "csv": {
4154
+ "description": "Output as CSV",
4155
+ "name": "csv",
4156
+ "allowNo": false,
4157
+ "type": "boolean"
4158
+ },
4159
+ "verbose": {
4160
+ "char": "v",
4161
+ "description": "Show verbose output",
4162
+ "name": "verbose",
4163
+ "allowNo": false,
4164
+ "type": "boolean"
4165
+ },
4166
+ "local": {
4167
+ "description": "Write per-project config (default)",
4168
+ "exclusive": [
4169
+ "global"
4170
+ ],
4171
+ "name": "local",
4172
+ "allowNo": false,
4173
+ "type": "boolean"
4174
+ },
4175
+ "global": {
4176
+ "description": "Write user-level global config",
4177
+ "exclusive": [
4178
+ "local"
4179
+ ],
4180
+ "name": "global",
4181
+ "allowNo": false,
4182
+ "type": "boolean"
4183
+ },
4184
+ "enable": {
4185
+ "description": "Enable tracing (default)",
4186
+ "exclusive": [
4187
+ "disable"
4188
+ ],
4189
+ "name": "enable",
4190
+ "allowNo": false,
4191
+ "type": "boolean"
4192
+ },
4193
+ "disable": {
4194
+ "description": "Disable tracing",
4195
+ "exclusive": [
4196
+ "enable"
4197
+ ],
4198
+ "name": "disable",
4199
+ "allowNo": false,
4200
+ "type": "boolean"
4201
+ },
4202
+ "project-id": {
4203
+ "description": "Respan project ID (added to metadata / resource attributes)",
4204
+ "env": "RESPAN_PROJECT_ID",
4205
+ "name": "project-id",
4206
+ "hasDynamicHelp": false,
4207
+ "multiple": false,
4208
+ "type": "option"
4209
+ },
4210
+ "attrs": {
4211
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
4212
+ "name": "attrs",
4213
+ "default": "{}",
4214
+ "hasDynamicHelp": false,
4215
+ "multiple": false,
4216
+ "type": "option"
4217
+ },
4218
+ "customer-id": {
4219
+ "description": "Customer/user identifier for traces (e.g. your name or email)",
4220
+ "env": "RESPAN_CUSTOMER_ID",
4221
+ "name": "customer-id",
4222
+ "hasDynamicHelp": false,
4223
+ "multiple": false,
4224
+ "type": "option"
4225
+ },
4226
+ "span-name": {
4227
+ "description": "Root span name for traces (default: claude-code)",
4228
+ "name": "span-name",
4229
+ "hasDynamicHelp": false,
4230
+ "multiple": false,
4231
+ "type": "option"
4232
+ },
4233
+ "workflow-name": {
4234
+ "description": "Workflow name for traces (default: claude-code)",
4235
+ "name": "workflow-name",
4236
+ "hasDynamicHelp": false,
4237
+ "multiple": false,
4238
+ "type": "option"
4239
+ },
4240
+ "dry-run": {
4241
+ "description": "Preview changes without writing files",
4242
+ "name": "dry-run",
4243
+ "allowNo": false,
4244
+ "type": "boolean"
4245
+ }
4246
+ },
4247
+ "hasDynamicHelp": false,
4248
+ "hiddenAliases": [],
4249
+ "id": "integrate:claude-code",
4250
+ "pluginAlias": "@respan/cli",
4251
+ "pluginName": "@respan/cli",
4252
+ "pluginType": "core",
4253
+ "strict": true,
4254
+ "enableJsonFlag": false,
4255
+ "isESM": true,
4256
+ "relativePath": [
4257
+ "dist",
4258
+ "commands",
4259
+ "integrate",
4260
+ "claude-code.js"
4261
+ ]
4262
+ },
4263
+ "integrate:codex-cli": {
4264
+ "aliases": [],
4265
+ "args": {},
4266
+ "description": "Integrate Respan with Codex CLI.\n\nInstalls a notify hook that reads session JSONL files and sends\nthem to Respan as structured spans (chat, tool, reasoning).\n\nScope:\n --global Install hook script + register notify in ~/.codex/config.toml\n --local Write .codex/respan.json with customer_id, span_name, etc.\n\nDefault behavior installs the global notify hook and writes local project config.",
4267
+ "examples": [
4268
+ "respan integrate codex-cli",
4269
+ "respan integrate codex-cli --disable",
4270
+ "respan integrate codex-cli --global",
4271
+ "respan integrate codex-cli --local --customer-id frank",
4272
+ "respan integrate codex-cli --attrs '{\"env\":\"prod\"}'",
4273
+ "respan integrate codex-cli --dry-run"
4274
+ ],
4275
+ "flags": {
4276
+ "api-key": {
4277
+ "description": "API key (env: RESPAN_API_KEY)",
4278
+ "env": "RESPAN_API_KEY",
4279
+ "name": "api-key",
4280
+ "hasDynamicHelp": false,
4281
+ "multiple": false,
4282
+ "type": "option"
4283
+ },
4284
+ "base-url": {
4285
+ "description": "Respan API base URL (for enterprise deployments)",
4286
+ "name": "base-url",
4287
+ "default": "https://api.respan.ai/api",
4288
+ "hasDynamicHelp": false,
4289
+ "multiple": false,
4290
+ "type": "option"
4291
+ },
4292
+ "profile": {
4293
+ "description": "Named profile to use",
4294
+ "name": "profile",
4295
+ "hasDynamicHelp": false,
4296
+ "multiple": false,
4297
+ "type": "option"
4298
+ },
4299
+ "json": {
4300
+ "description": "Output as JSON",
4301
+ "name": "json",
4302
+ "allowNo": false,
4303
+ "type": "boolean"
4304
+ },
4305
+ "csv": {
4306
+ "description": "Output as CSV",
4307
+ "name": "csv",
4308
+ "allowNo": false,
4309
+ "type": "boolean"
4310
+ },
4311
+ "verbose": {
4312
+ "char": "v",
4313
+ "description": "Show verbose output",
4314
+ "name": "verbose",
4315
+ "allowNo": false,
4316
+ "type": "boolean"
4317
+ },
4318
+ "local": {
4319
+ "description": "Write per-project config (default)",
4320
+ "exclusive": [
4321
+ "global"
4322
+ ],
4323
+ "name": "local",
4324
+ "allowNo": false,
4325
+ "type": "boolean"
4326
+ },
4327
+ "global": {
4328
+ "description": "Write user-level global config",
4329
+ "exclusive": [
4330
+ "local"
4331
+ ],
4332
+ "name": "global",
4333
+ "allowNo": false,
4334
+ "type": "boolean"
4335
+ },
4336
+ "enable": {
4337
+ "description": "Enable tracing (default)",
4338
+ "exclusive": [
4339
+ "disable"
4340
+ ],
4341
+ "name": "enable",
4342
+ "allowNo": false,
4343
+ "type": "boolean"
4344
+ },
4345
+ "disable": {
4346
+ "description": "Disable tracing",
4347
+ "exclusive": [
4348
+ "enable"
4349
+ ],
4350
+ "name": "disable",
4351
+ "allowNo": false,
4352
+ "type": "boolean"
4353
+ },
4354
+ "project-id": {
4355
+ "description": "Respan project ID (added to metadata / resource attributes)",
4356
+ "env": "RESPAN_PROJECT_ID",
4357
+ "name": "project-id",
4358
+ "hasDynamicHelp": false,
4359
+ "multiple": false,
4360
+ "type": "option"
4361
+ },
4362
+ "attrs": {
4363
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
4364
+ "name": "attrs",
4365
+ "default": "{}",
4366
+ "hasDynamicHelp": false,
4367
+ "multiple": false,
4368
+ "type": "option"
4369
+ },
4370
+ "customer-id": {
4371
+ "description": "Customer/user identifier for traces (e.g. your name or email)",
4372
+ "env": "RESPAN_CUSTOMER_ID",
4373
+ "name": "customer-id",
4374
+ "hasDynamicHelp": false,
4375
+ "multiple": false,
4376
+ "type": "option"
4377
+ },
4378
+ "span-name": {
4379
+ "description": "Root span name for traces (default: claude-code)",
4380
+ "name": "span-name",
4381
+ "hasDynamicHelp": false,
4382
+ "multiple": false,
4383
+ "type": "option"
4384
+ },
4385
+ "workflow-name": {
4386
+ "description": "Workflow name for traces (default: claude-code)",
4387
+ "name": "workflow-name",
4388
+ "hasDynamicHelp": false,
4389
+ "multiple": false,
4390
+ "type": "option"
4391
+ },
4392
+ "dry-run": {
4393
+ "description": "Preview changes without writing files",
4394
+ "name": "dry-run",
4395
+ "allowNo": false,
4396
+ "type": "boolean"
4397
+ }
4398
+ },
4399
+ "hasDynamicHelp": false,
4400
+ "hiddenAliases": [],
4401
+ "id": "integrate:codex-cli",
4402
+ "pluginAlias": "@respan/cli",
4403
+ "pluginName": "@respan/cli",
4404
+ "pluginType": "core",
4405
+ "strict": true,
4406
+ "enableJsonFlag": false,
4407
+ "isESM": true,
4408
+ "relativePath": [
4409
+ "dist",
4410
+ "commands",
4411
+ "integrate",
4412
+ "codex-cli.js"
4413
+ ]
4414
+ },
4415
+ "integrate:gemini-cli": {
4416
+ "aliases": [],
4417
+ "args": {},
4418
+ "description": "Integrate Respan with Gemini CLI.\n\nInstalls an AfterModel hook that captures LLM request/response data\nand sends it to Respan as structured spans with model, token counts,\nand input/output.\n\nScope:\n --global Write to ~/.gemini/settings.json (default)\n --local Write to .gemini/settings.json in project root\n\nGemini CLI ignores workspace-level telemetry settings, so --global is the default.",
4419
+ "examples": [
4420
+ "respan integrate gemini-cli",
4421
+ "respan integrate gemini-cli --disable",
4422
+ "respan integrate gemini-cli --local",
4423
+ "respan integrate gemini-cli --project-id my-project --attrs '{\"env\":\"prod\"}'",
4424
+ "respan integrate gemini-cli --dry-run"
4425
+ ],
4426
+ "flags": {
4427
+ "api-key": {
4428
+ "description": "API key (env: RESPAN_API_KEY)",
4429
+ "env": "RESPAN_API_KEY",
4430
+ "name": "api-key",
4431
+ "hasDynamicHelp": false,
4432
+ "multiple": false,
4433
+ "type": "option"
4434
+ },
4435
+ "base-url": {
4436
+ "description": "Respan API base URL (for enterprise deployments)",
4437
+ "name": "base-url",
4438
+ "default": "https://api.respan.ai/api",
4439
+ "hasDynamicHelp": false,
4440
+ "multiple": false,
4441
+ "type": "option"
4442
+ },
4443
+ "profile": {
4444
+ "description": "Named profile to use",
4445
+ "name": "profile",
4446
+ "hasDynamicHelp": false,
4447
+ "multiple": false,
4448
+ "type": "option"
4449
+ },
4450
+ "json": {
4451
+ "description": "Output as JSON",
4452
+ "name": "json",
4453
+ "allowNo": false,
4454
+ "type": "boolean"
4455
+ },
4456
+ "csv": {
4457
+ "description": "Output as CSV",
4458
+ "name": "csv",
4459
+ "allowNo": false,
4460
+ "type": "boolean"
4461
+ },
4462
+ "verbose": {
4463
+ "char": "v",
4464
+ "description": "Show verbose output",
4465
+ "name": "verbose",
4466
+ "allowNo": false,
4467
+ "type": "boolean"
4468
+ },
4469
+ "local": {
4470
+ "description": "Write per-project config (default)",
4471
+ "exclusive": [
4472
+ "global"
4473
+ ],
4474
+ "name": "local",
4475
+ "allowNo": false,
4476
+ "type": "boolean"
4477
+ },
4478
+ "global": {
4479
+ "description": "Write user-level global config",
4480
+ "exclusive": [
4481
+ "local"
4482
+ ],
4483
+ "name": "global",
4484
+ "allowNo": false,
4485
+ "type": "boolean"
4486
+ },
4487
+ "enable": {
4488
+ "description": "Enable tracing (default)",
4489
+ "exclusive": [
4490
+ "disable"
4491
+ ],
4492
+ "name": "enable",
4493
+ "allowNo": false,
4494
+ "type": "boolean"
4495
+ },
4496
+ "disable": {
4497
+ "description": "Disable tracing",
4498
+ "exclusive": [
4499
+ "enable"
4500
+ ],
4501
+ "name": "disable",
4502
+ "allowNo": false,
4503
+ "type": "boolean"
4504
+ },
4505
+ "project-id": {
4506
+ "description": "Respan project ID (added to metadata / resource attributes)",
4507
+ "env": "RESPAN_PROJECT_ID",
4508
+ "name": "project-id",
4509
+ "hasDynamicHelp": false,
4510
+ "multiple": false,
4511
+ "type": "option"
4512
+ },
4513
+ "attrs": {
4514
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
4515
+ "name": "attrs",
4516
+ "default": "{}",
4043
4517
  "hasDynamicHelp": false,
4044
4518
  "multiple": false,
4045
4519
  "type": "option"
4046
4520
  },
4047
- "profile": {
4048
- "description": "Named profile to use",
4049
- "name": "profile",
4521
+ "customer-id": {
4522
+ "description": "Customer/user identifier for traces (e.g. your name or email)",
4523
+ "env": "RESPAN_CUSTOMER_ID",
4524
+ "name": "customer-id",
4050
4525
  "hasDynamicHelp": false,
4051
4526
  "multiple": false,
4052
4527
  "type": "option"
4053
4528
  },
4054
- "json": {
4055
- "description": "Output as JSON",
4056
- "name": "json",
4057
- "allowNo": false,
4058
- "type": "boolean"
4529
+ "span-name": {
4530
+ "description": "Root span name for traces (default: claude-code)",
4531
+ "name": "span-name",
4532
+ "hasDynamicHelp": false,
4533
+ "multiple": false,
4534
+ "type": "option"
4059
4535
  },
4060
- "csv": {
4061
- "description": "Output as CSV",
4062
- "name": "csv",
4063
- "allowNo": false,
4064
- "type": "boolean"
4536
+ "workflow-name": {
4537
+ "description": "Workflow name for traces (default: claude-code)",
4538
+ "name": "workflow-name",
4539
+ "hasDynamicHelp": false,
4540
+ "multiple": false,
4541
+ "type": "option"
4065
4542
  },
4066
- "verbose": {
4067
- "char": "v",
4068
- "description": "Show verbose output",
4069
- "name": "verbose",
4543
+ "dry-run": {
4544
+ "description": "Preview changes without writing files",
4545
+ "name": "dry-run",
4070
4546
  "allowNo": false,
4071
4547
  "type": "boolean"
4072
4548
  }
4073
4549
  },
4074
4550
  "hasDynamicHelp": false,
4075
4551
  "hiddenAliases": [],
4076
- "id": "users:get",
4552
+ "id": "integrate:gemini-cli",
4077
4553
  "pluginAlias": "@respan/cli",
4078
4554
  "pluginName": "@respan/cli",
4079
4555
  "pluginType": "core",
@@ -4083,14 +4559,21 @@
4083
4559
  "relativePath": [
4084
4560
  "dist",
4085
4561
  "commands",
4086
- "users",
4087
- "get.js"
4562
+ "integrate",
4563
+ "gemini-cli.js"
4088
4564
  ]
4089
4565
  },
4090
- "users:list": {
4566
+ "integrate:opencode": {
4091
4567
  "aliases": [],
4092
4568
  "args": {},
4093
- "description": "List users (customers)",
4569
+ "description": "Integrate Respan with OpenCode.\n\nOpenCode's built-in OTel does not work reliably, so this uses the\ncommunity opencode-otel plugin instead.\n\nScope:\n --local Write plugin config to project root (default)\n --global Write to ~/.config/opencode/plugins/otel.json\n The opencode-otel package is always installed globally.",
4570
+ "examples": [
4571
+ "respan integrate opencode",
4572
+ "respan integrate opencode --disable",
4573
+ "respan integrate opencode --global",
4574
+ "respan integrate opencode --project-id my-project --attrs '{\"env\":\"prod\"}'",
4575
+ "respan integrate opencode --dry-run"
4576
+ ],
4094
4577
  "flags": {
4095
4578
  "api-key": {
4096
4579
  "description": "API key (env: RESPAN_API_KEY)",
@@ -4101,8 +4584,9 @@
4101
4584
  "type": "option"
4102
4585
  },
4103
4586
  "base-url": {
4104
- "description": "Temporary API base URL override for this command",
4587
+ "description": "Respan API base URL (for enterprise deployments)",
4105
4588
  "name": "base-url",
4589
+ "default": "https://api.respan.ai/api",
4106
4590
  "hasDynamicHelp": false,
4107
4591
  "multiple": false,
4108
4592
  "type": "option"
@@ -4133,40 +4617,90 @@
4133
4617
  "allowNo": false,
4134
4618
  "type": "boolean"
4135
4619
  },
4136
- "limit": {
4137
- "description": "Number of results per page",
4138
- "name": "limit",
4139
- "default": 20,
4620
+ "local": {
4621
+ "description": "Write per-project config (default)",
4622
+ "exclusive": [
4623
+ "global"
4624
+ ],
4625
+ "name": "local",
4626
+ "allowNo": false,
4627
+ "type": "boolean"
4628
+ },
4629
+ "global": {
4630
+ "description": "Write user-level global config",
4631
+ "exclusive": [
4632
+ "local"
4633
+ ],
4634
+ "name": "global",
4635
+ "allowNo": false,
4636
+ "type": "boolean"
4637
+ },
4638
+ "enable": {
4639
+ "description": "Enable tracing (default)",
4640
+ "exclusive": [
4641
+ "disable"
4642
+ ],
4643
+ "name": "enable",
4644
+ "allowNo": false,
4645
+ "type": "boolean"
4646
+ },
4647
+ "disable": {
4648
+ "description": "Disable tracing",
4649
+ "exclusive": [
4650
+ "enable"
4651
+ ],
4652
+ "name": "disable",
4653
+ "allowNo": false,
4654
+ "type": "boolean"
4655
+ },
4656
+ "project-id": {
4657
+ "description": "Respan project ID (added to metadata / resource attributes)",
4658
+ "env": "RESPAN_PROJECT_ID",
4659
+ "name": "project-id",
4140
4660
  "hasDynamicHelp": false,
4141
4661
  "multiple": false,
4142
4662
  "type": "option"
4143
4663
  },
4144
- "page": {
4145
- "description": "Page number",
4146
- "name": "page",
4147
- "default": 1,
4664
+ "attrs": {
4665
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
4666
+ "name": "attrs",
4667
+ "default": "{}",
4148
4668
  "hasDynamicHelp": false,
4149
4669
  "multiple": false,
4150
4670
  "type": "option"
4151
4671
  },
4152
- "sort-by": {
4153
- "description": "Sort field",
4154
- "name": "sort-by",
4672
+ "customer-id": {
4673
+ "description": "Customer/user identifier for traces (e.g. your name or email)",
4674
+ "env": "RESPAN_CUSTOMER_ID",
4675
+ "name": "customer-id",
4155
4676
  "hasDynamicHelp": false,
4156
4677
  "multiple": false,
4157
4678
  "type": "option"
4158
4679
  },
4159
- "environment": {
4160
- "description": "Environment filter",
4161
- "name": "environment",
4680
+ "span-name": {
4681
+ "description": "Root span name for traces (default: claude-code)",
4682
+ "name": "span-name",
4683
+ "hasDynamicHelp": false,
4684
+ "multiple": false,
4685
+ "type": "option"
4686
+ },
4687
+ "workflow-name": {
4688
+ "description": "Workflow name for traces (default: claude-code)",
4689
+ "name": "workflow-name",
4162
4690
  "hasDynamicHelp": false,
4163
4691
  "multiple": false,
4164
4692
  "type": "option"
4693
+ },
4694
+ "dry-run": {
4695
+ "description": "Preview changes without writing files",
4696
+ "name": "dry-run",
4697
+ "allowNo": false,
4698
+ "type": "boolean"
4165
4699
  }
4166
4700
  },
4167
4701
  "hasDynamicHelp": false,
4168
4702
  "hiddenAliases": [],
4169
- "id": "users:list",
4703
+ "id": "integrate:opencode",
4170
4704
  "pluginAlias": "@respan/cli",
4171
4705
  "pluginName": "@respan/cli",
4172
4706
  "pluginType": "core",
@@ -4176,20 +4710,24 @@
4176
4710
  "relativePath": [
4177
4711
  "dist",
4178
4712
  "commands",
4179
- "users",
4180
- "list.js"
4713
+ "integrate",
4714
+ "opencode.js"
4181
4715
  ]
4182
4716
  },
4183
- "users:update": {
4717
+ "integrate:pi": {
4184
4718
  "aliases": [],
4185
- "args": {
4186
- "id": {
4187
- "description": "Customer identifier",
4188
- "name": "id",
4189
- "required": true
4190
- }
4191
- },
4192
- "description": "Update a user (customer)",
4719
+ "args": {},
4720
+ "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 run one trace per agent run; runs of a session share a thread id (default)\n session one multi-root trace per pi session (long-lived, resumed sessions)\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\").",
4721
+ "examples": [
4722
+ "respan integrate pi",
4723
+ "respan integrate pi --disable",
4724
+ "respan integrate pi --local",
4725
+ "respan integrate pi --customer-id frank --workflow-name email-agent",
4726
+ "respan integrate pi --trace-scope session",
4727
+ "respan integrate pi --with-collector",
4728
+ "respan integrate pi --project-id my-project --attrs '{\"env\":\"prod\"}'",
4729
+ "respan integrate pi --dry-run"
4730
+ ],
4193
4731
  "flags": {
4194
4732
  "api-key": {
4195
4733
  "description": "API key (env: RESPAN_API_KEY)",
@@ -4200,8 +4738,9 @@
4200
4738
  "type": "option"
4201
4739
  },
4202
4740
  "base-url": {
4203
- "description": "Temporary API base URL override for this command",
4741
+ "description": "Respan API base URL (for enterprise deployments)",
4204
4742
  "name": "base-url",
4743
+ "default": "https://api.respan.ai/api",
4205
4744
  "hasDynamicHelp": false,
4206
4745
  "multiple": false,
4207
4746
  "type": "option"
@@ -4232,23 +4771,106 @@
4232
4771
  "allowNo": false,
4233
4772
  "type": "boolean"
4234
4773
  },
4235
- "name": {
4236
- "description": "Customer name",
4237
- "name": "name",
4774
+ "local": {
4775
+ "description": "Write per-project config (default)",
4776
+ "exclusive": [
4777
+ "global"
4778
+ ],
4779
+ "name": "local",
4780
+ "allowNo": false,
4781
+ "type": "boolean"
4782
+ },
4783
+ "global": {
4784
+ "description": "Write user-level global config",
4785
+ "exclusive": [
4786
+ "local"
4787
+ ],
4788
+ "name": "global",
4789
+ "allowNo": false,
4790
+ "type": "boolean"
4791
+ },
4792
+ "enable": {
4793
+ "description": "Enable tracing (default)",
4794
+ "exclusive": [
4795
+ "disable"
4796
+ ],
4797
+ "name": "enable",
4798
+ "allowNo": false,
4799
+ "type": "boolean"
4800
+ },
4801
+ "disable": {
4802
+ "description": "Disable tracing",
4803
+ "exclusive": [
4804
+ "enable"
4805
+ ],
4806
+ "name": "disable",
4807
+ "allowNo": false,
4808
+ "type": "boolean"
4809
+ },
4810
+ "project-id": {
4811
+ "description": "Respan project ID (added to metadata / resource attributes)",
4812
+ "env": "RESPAN_PROJECT_ID",
4813
+ "name": "project-id",
4238
4814
  "hasDynamicHelp": false,
4239
4815
  "multiple": false,
4240
4816
  "type": "option"
4241
4817
  },
4242
- "email": {
4243
- "description": "Customer email",
4244
- "name": "email",
4818
+ "attrs": {
4819
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
4820
+ "name": "attrs",
4821
+ "default": "{}",
4245
4822
  "hasDynamicHelp": false,
4246
4823
  "multiple": false,
4247
4824
  "type": "option"
4248
4825
  },
4249
- "metadata": {
4250
- "description": "Metadata as JSON string",
4251
- "name": "metadata",
4826
+ "customer-id": {
4827
+ "description": "Customer/user identifier for traces (e.g. your name or email)",
4828
+ "env": "RESPAN_CUSTOMER_ID",
4829
+ "name": "customer-id",
4830
+ "hasDynamicHelp": false,
4831
+ "multiple": false,
4832
+ "type": "option"
4833
+ },
4834
+ "span-name": {
4835
+ "description": "Alias of --workflow-name (default: pi)",
4836
+ "name": "span-name",
4837
+ "hasDynamicHelp": false,
4838
+ "multiple": false,
4839
+ "type": "option"
4840
+ },
4841
+ "workflow-name": {
4842
+ "description": "traceloop.workflow.name on pi turn spans (default: pi)",
4843
+ "name": "workflow-name",
4844
+ "hasDynamicHelp": false,
4845
+ "multiple": false,
4846
+ "type": "option"
4847
+ },
4848
+ "dry-run": {
4849
+ "description": "Preview changes without writing files",
4850
+ "name": "dry-run",
4851
+ "allowNo": false,
4852
+ "type": "boolean"
4853
+ },
4854
+ "trace-scope": {
4855
+ "description": "Trace scope: \"run\" = one trace per agent run (default), \"session\" = one multi-root trace per pi session",
4856
+ "name": "trace-scope",
4857
+ "hasDynamicHelp": false,
4858
+ "multiple": false,
4859
+ "options": [
4860
+ "run",
4861
+ "session"
4862
+ ],
4863
+ "type": "option"
4864
+ },
4865
+ "with-collector": {
4866
+ "description": "Send traces through a local Respan collector (respan collector start) for durable delivery",
4867
+ "name": "with-collector",
4868
+ "allowNo": false,
4869
+ "type": "boolean"
4870
+ },
4871
+ "collector-port": {
4872
+ "description": "Port of the local collector, with --with-collector (default: 4318)",
4873
+ "name": "collector-port",
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": "integrate:pi",
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
+ "integrate",
4892
+ "pi.js"
4271
4893
  ]
4272
4894
  }
4273
4895
  },
4274
- "version": "0.13.3"
4896
+ "version": "0.14.0"
4275
4897
  }