@respan/cli 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -428,6 +428,391 @@
428
428
  "set.js"
429
429
  ]
430
430
  },
431
+ "evaluators:create": {
432
+ "aliases": [],
433
+ "args": {},
434
+ "description": "Create a new evaluator",
435
+ "flags": {
436
+ "api-key": {
437
+ "description": "API key (env: RESPAN_API_KEY)",
438
+ "env": "RESPAN_API_KEY",
439
+ "name": "api-key",
440
+ "hasDynamicHelp": false,
441
+ "multiple": false,
442
+ "type": "option"
443
+ },
444
+ "profile": {
445
+ "description": "Named profile to use",
446
+ "name": "profile",
447
+ "hasDynamicHelp": false,
448
+ "multiple": false,
449
+ "type": "option"
450
+ },
451
+ "json": {
452
+ "description": "Output as JSON",
453
+ "name": "json",
454
+ "allowNo": false,
455
+ "type": "boolean"
456
+ },
457
+ "csv": {
458
+ "description": "Output as CSV",
459
+ "name": "csv",
460
+ "allowNo": false,
461
+ "type": "boolean"
462
+ },
463
+ "verbose": {
464
+ "char": "v",
465
+ "description": "Show verbose output",
466
+ "name": "verbose",
467
+ "allowNo": false,
468
+ "type": "boolean"
469
+ },
470
+ "name": {
471
+ "description": "Evaluator name",
472
+ "name": "name",
473
+ "required": true,
474
+ "hasDynamicHelp": false,
475
+ "multiple": false,
476
+ "type": "option"
477
+ },
478
+ "type": {
479
+ "description": "Evaluator type",
480
+ "name": "type",
481
+ "hasDynamicHelp": false,
482
+ "multiple": false,
483
+ "type": "option"
484
+ },
485
+ "description": {
486
+ "description": "Evaluator description",
487
+ "name": "description",
488
+ "hasDynamicHelp": false,
489
+ "multiple": false,
490
+ "type": "option"
491
+ },
492
+ "config": {
493
+ "description": "Evaluator config as JSON string",
494
+ "name": "config",
495
+ "hasDynamicHelp": false,
496
+ "multiple": false,
497
+ "type": "option"
498
+ }
499
+ },
500
+ "hasDynamicHelp": false,
501
+ "hiddenAliases": [],
502
+ "id": "evaluators:create",
503
+ "pluginAlias": "@respan/cli",
504
+ "pluginName": "@respan/cli",
505
+ "pluginType": "core",
506
+ "strict": true,
507
+ "enableJsonFlag": false,
508
+ "isESM": true,
509
+ "relativePath": [
510
+ "dist",
511
+ "commands",
512
+ "evaluators",
513
+ "create.js"
514
+ ]
515
+ },
516
+ "evaluators:get": {
517
+ "aliases": [],
518
+ "args": {
519
+ "id": {
520
+ "description": "Evaluator ID",
521
+ "name": "id",
522
+ "required": true
523
+ }
524
+ },
525
+ "description": "Get a specific evaluator",
526
+ "flags": {
527
+ "api-key": {
528
+ "description": "API key (env: RESPAN_API_KEY)",
529
+ "env": "RESPAN_API_KEY",
530
+ "name": "api-key",
531
+ "hasDynamicHelp": false,
532
+ "multiple": false,
533
+ "type": "option"
534
+ },
535
+ "profile": {
536
+ "description": "Named profile to use",
537
+ "name": "profile",
538
+ "hasDynamicHelp": false,
539
+ "multiple": false,
540
+ "type": "option"
541
+ },
542
+ "json": {
543
+ "description": "Output as JSON",
544
+ "name": "json",
545
+ "allowNo": false,
546
+ "type": "boolean"
547
+ },
548
+ "csv": {
549
+ "description": "Output as CSV",
550
+ "name": "csv",
551
+ "allowNo": false,
552
+ "type": "boolean"
553
+ },
554
+ "verbose": {
555
+ "char": "v",
556
+ "description": "Show verbose output",
557
+ "name": "verbose",
558
+ "allowNo": false,
559
+ "type": "boolean"
560
+ }
561
+ },
562
+ "hasDynamicHelp": false,
563
+ "hiddenAliases": [],
564
+ "id": "evaluators:get",
565
+ "pluginAlias": "@respan/cli",
566
+ "pluginName": "@respan/cli",
567
+ "pluginType": "core",
568
+ "strict": true,
569
+ "enableJsonFlag": false,
570
+ "isESM": true,
571
+ "relativePath": [
572
+ "dist",
573
+ "commands",
574
+ "evaluators",
575
+ "get.js"
576
+ ]
577
+ },
578
+ "evaluators:list": {
579
+ "aliases": [],
580
+ "args": {},
581
+ "description": "List evaluators",
582
+ "flags": {
583
+ "api-key": {
584
+ "description": "API key (env: RESPAN_API_KEY)",
585
+ "env": "RESPAN_API_KEY",
586
+ "name": "api-key",
587
+ "hasDynamicHelp": false,
588
+ "multiple": false,
589
+ "type": "option"
590
+ },
591
+ "profile": {
592
+ "description": "Named profile to use",
593
+ "name": "profile",
594
+ "hasDynamicHelp": false,
595
+ "multiple": false,
596
+ "type": "option"
597
+ },
598
+ "json": {
599
+ "description": "Output as JSON",
600
+ "name": "json",
601
+ "allowNo": false,
602
+ "type": "boolean"
603
+ },
604
+ "csv": {
605
+ "description": "Output as CSV",
606
+ "name": "csv",
607
+ "allowNo": false,
608
+ "type": "boolean"
609
+ },
610
+ "verbose": {
611
+ "char": "v",
612
+ "description": "Show verbose output",
613
+ "name": "verbose",
614
+ "allowNo": false,
615
+ "type": "boolean"
616
+ },
617
+ "limit": {
618
+ "description": "Number of results per page",
619
+ "name": "limit",
620
+ "default": 20,
621
+ "hasDynamicHelp": false,
622
+ "multiple": false,
623
+ "type": "option"
624
+ },
625
+ "page": {
626
+ "description": "Page number",
627
+ "name": "page",
628
+ "default": 1,
629
+ "hasDynamicHelp": false,
630
+ "multiple": false,
631
+ "type": "option"
632
+ }
633
+ },
634
+ "hasDynamicHelp": false,
635
+ "hiddenAliases": [],
636
+ "id": "evaluators:list",
637
+ "pluginAlias": "@respan/cli",
638
+ "pluginName": "@respan/cli",
639
+ "pluginType": "core",
640
+ "strict": true,
641
+ "enableJsonFlag": false,
642
+ "isESM": true,
643
+ "relativePath": [
644
+ "dist",
645
+ "commands",
646
+ "evaluators",
647
+ "list.js"
648
+ ]
649
+ },
650
+ "evaluators:run": {
651
+ "aliases": [],
652
+ "args": {
653
+ "id": {
654
+ "description": "Evaluator ID",
655
+ "name": "id",
656
+ "required": true
657
+ }
658
+ },
659
+ "description": "Run an evaluator",
660
+ "flags": {
661
+ "api-key": {
662
+ "description": "API key (env: RESPAN_API_KEY)",
663
+ "env": "RESPAN_API_KEY",
664
+ "name": "api-key",
665
+ "hasDynamicHelp": false,
666
+ "multiple": false,
667
+ "type": "option"
668
+ },
669
+ "profile": {
670
+ "description": "Named profile to use",
671
+ "name": "profile",
672
+ "hasDynamicHelp": false,
673
+ "multiple": false,
674
+ "type": "option"
675
+ },
676
+ "json": {
677
+ "description": "Output as JSON",
678
+ "name": "json",
679
+ "allowNo": false,
680
+ "type": "boolean"
681
+ },
682
+ "csv": {
683
+ "description": "Output as CSV",
684
+ "name": "csv",
685
+ "allowNo": false,
686
+ "type": "boolean"
687
+ },
688
+ "verbose": {
689
+ "char": "v",
690
+ "description": "Show verbose output",
691
+ "name": "verbose",
692
+ "allowNo": false,
693
+ "type": "boolean"
694
+ },
695
+ "dataset-id": {
696
+ "description": "Dataset ID to evaluate against",
697
+ "name": "dataset-id",
698
+ "hasDynamicHelp": false,
699
+ "multiple": false,
700
+ "type": "option"
701
+ },
702
+ "log-ids": {
703
+ "description": "Comma-separated log/span IDs to evaluate",
704
+ "name": "log-ids",
705
+ "hasDynamicHelp": false,
706
+ "multiple": false,
707
+ "type": "option"
708
+ },
709
+ "params": {
710
+ "description": "Additional parameters as JSON string",
711
+ "name": "params",
712
+ "hasDynamicHelp": false,
713
+ "multiple": false,
714
+ "type": "option"
715
+ }
716
+ },
717
+ "hasDynamicHelp": false,
718
+ "hiddenAliases": [],
719
+ "id": "evaluators:run",
720
+ "pluginAlias": "@respan/cli",
721
+ "pluginName": "@respan/cli",
722
+ "pluginType": "core",
723
+ "strict": true,
724
+ "enableJsonFlag": false,
725
+ "isESM": true,
726
+ "relativePath": [
727
+ "dist",
728
+ "commands",
729
+ "evaluators",
730
+ "run.js"
731
+ ]
732
+ },
733
+ "evaluators:update": {
734
+ "aliases": [],
735
+ "args": {
736
+ "id": {
737
+ "description": "Evaluator ID",
738
+ "name": "id",
739
+ "required": true
740
+ }
741
+ },
742
+ "description": "Update an evaluator",
743
+ "flags": {
744
+ "api-key": {
745
+ "description": "API key (env: RESPAN_API_KEY)",
746
+ "env": "RESPAN_API_KEY",
747
+ "name": "api-key",
748
+ "hasDynamicHelp": false,
749
+ "multiple": false,
750
+ "type": "option"
751
+ },
752
+ "profile": {
753
+ "description": "Named profile to use",
754
+ "name": "profile",
755
+ "hasDynamicHelp": false,
756
+ "multiple": false,
757
+ "type": "option"
758
+ },
759
+ "json": {
760
+ "description": "Output as JSON",
761
+ "name": "json",
762
+ "allowNo": false,
763
+ "type": "boolean"
764
+ },
765
+ "csv": {
766
+ "description": "Output as CSV",
767
+ "name": "csv",
768
+ "allowNo": false,
769
+ "type": "boolean"
770
+ },
771
+ "verbose": {
772
+ "char": "v",
773
+ "description": "Show verbose output",
774
+ "name": "verbose",
775
+ "allowNo": false,
776
+ "type": "boolean"
777
+ },
778
+ "name": {
779
+ "description": "Evaluator name",
780
+ "name": "name",
781
+ "hasDynamicHelp": false,
782
+ "multiple": false,
783
+ "type": "option"
784
+ },
785
+ "description": {
786
+ "description": "Evaluator description",
787
+ "name": "description",
788
+ "hasDynamicHelp": false,
789
+ "multiple": false,
790
+ "type": "option"
791
+ },
792
+ "config": {
793
+ "description": "Evaluator config as JSON string",
794
+ "name": "config",
795
+ "hasDynamicHelp": false,
796
+ "multiple": false,
797
+ "type": "option"
798
+ }
799
+ },
800
+ "hasDynamicHelp": false,
801
+ "hiddenAliases": [],
802
+ "id": "evaluators:update",
803
+ "pluginAlias": "@respan/cli",
804
+ "pluginName": "@respan/cli",
805
+ "pluginType": "core",
806
+ "strict": true,
807
+ "enableJsonFlag": false,
808
+ "isESM": true,
809
+ "relativePath": [
810
+ "dist",
811
+ "commands",
812
+ "evaluators",
813
+ "update.js"
814
+ ]
815
+ },
431
816
  "datasets:add-spans": {
432
817
  "aliases": [],
433
818
  "args": {
@@ -978,10 +1363,10 @@
978
1363
  "update.js"
979
1364
  ]
980
1365
  },
981
- "evaluators:create": {
1366
+ "experiments:create": {
982
1367
  "aliases": [],
983
1368
  "args": {},
984
- "description": "Create a new evaluator",
1369
+ "description": "Create a new experiment",
985
1370
  "flags": {
986
1371
  "api-key": {
987
1372
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1018,30 +1403,31 @@
1018
1403
  "type": "boolean"
1019
1404
  },
1020
1405
  "name": {
1021
- "description": "Evaluator name",
1406
+ "description": "Experiment name",
1022
1407
  "name": "name",
1023
1408
  "required": true,
1024
1409
  "hasDynamicHelp": false,
1025
1410
  "multiple": false,
1026
1411
  "type": "option"
1027
1412
  },
1028
- "type": {
1029
- "description": "Evaluator type",
1030
- "name": "type",
1413
+ "dataset-id": {
1414
+ "description": "Dataset ID",
1415
+ "name": "dataset-id",
1416
+ "required": true,
1031
1417
  "hasDynamicHelp": false,
1032
1418
  "multiple": false,
1033
1419
  "type": "option"
1034
1420
  },
1035
1421
  "description": {
1036
- "description": "Evaluator description",
1422
+ "description": "Experiment description",
1037
1423
  "name": "description",
1038
1424
  "hasDynamicHelp": false,
1039
1425
  "multiple": false,
1040
1426
  "type": "option"
1041
1427
  },
1042
- "config": {
1043
- "description": "Evaluator config as JSON string",
1044
- "name": "config",
1428
+ "workflows": {
1429
+ "description": "Workflows configuration as JSON string",
1430
+ "name": "workflows",
1045
1431
  "hasDynamicHelp": false,
1046
1432
  "multiple": false,
1047
1433
  "type": "option"
@@ -1049,7 +1435,7 @@
1049
1435
  },
1050
1436
  "hasDynamicHelp": false,
1051
1437
  "hiddenAliases": [],
1052
- "id": "evaluators:create",
1438
+ "id": "experiments:create",
1053
1439
  "pluginAlias": "@respan/cli",
1054
1440
  "pluginName": "@respan/cli",
1055
1441
  "pluginType": "core",
@@ -1059,20 +1445,20 @@
1059
1445
  "relativePath": [
1060
1446
  "dist",
1061
1447
  "commands",
1062
- "evaluators",
1448
+ "experiments",
1063
1449
  "create.js"
1064
1450
  ]
1065
1451
  },
1066
- "evaluators:get": {
1452
+ "experiments:get": {
1067
1453
  "aliases": [],
1068
1454
  "args": {
1069
1455
  "id": {
1070
- "description": "Evaluator ID",
1456
+ "description": "Experiment ID",
1071
1457
  "name": "id",
1072
1458
  "required": true
1073
1459
  }
1074
1460
  },
1075
- "description": "Get a specific evaluator",
1461
+ "description": "Get a specific experiment",
1076
1462
  "flags": {
1077
1463
  "api-key": {
1078
1464
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1111,7 +1497,7 @@
1111
1497
  },
1112
1498
  "hasDynamicHelp": false,
1113
1499
  "hiddenAliases": [],
1114
- "id": "evaluators:get",
1500
+ "id": "experiments:get",
1115
1501
  "pluginAlias": "@respan/cli",
1116
1502
  "pluginName": "@respan/cli",
1117
1503
  "pluginType": "core",
@@ -1121,14 +1507,14 @@
1121
1507
  "relativePath": [
1122
1508
  "dist",
1123
1509
  "commands",
1124
- "evaluators",
1510
+ "experiments",
1125
1511
  "get.js"
1126
1512
  ]
1127
1513
  },
1128
- "evaluators:list": {
1514
+ "experiments:list": {
1129
1515
  "aliases": [],
1130
1516
  "args": {},
1131
- "description": "List evaluators",
1517
+ "description": "List experiments",
1132
1518
  "flags": {
1133
1519
  "api-key": {
1134
1520
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1183,7 +1569,7 @@
1183
1569
  },
1184
1570
  "hasDynamicHelp": false,
1185
1571
  "hiddenAliases": [],
1186
- "id": "evaluators:list",
1572
+ "id": "experiments:list",
1187
1573
  "pluginAlias": "@respan/cli",
1188
1574
  "pluginName": "@respan/cli",
1189
1575
  "pluginType": "core",
@@ -1193,20 +1579,21 @@
1193
1579
  "relativePath": [
1194
1580
  "dist",
1195
1581
  "commands",
1196
- "evaluators",
1582
+ "experiments",
1197
1583
  "list.js"
1198
1584
  ]
1199
1585
  },
1200
- "evaluators:run": {
1586
+ "integrate:claude-code": {
1201
1587
  "aliases": [],
1202
- "args": {
1203
- "id": {
1204
- "description": "Evaluator ID",
1205
- "name": "id",
1206
- "required": true
1207
- }
1208
- },
1209
- "description": "Run an evaluator",
1588
+ "args": {},
1589
+ "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 (default) Both: install hook globally + enable for current project",
1590
+ "examples": [
1591
+ "respan integrate claude-code",
1592
+ "respan integrate claude-code --global",
1593
+ "respan integrate claude-code --local --project-id my-project",
1594
+ "respan integrate claude-code --attrs '{\"env\":\"prod\"}'",
1595
+ "respan integrate claude-code --dry-run"
1596
+ ],
1210
1597
  "flags": {
1211
1598
  "api-key": {
1212
1599
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1242,31 +1629,58 @@
1242
1629
  "allowNo": false,
1243
1630
  "type": "boolean"
1244
1631
  },
1245
- "dataset-id": {
1246
- "description": "Dataset ID to evaluate against",
1247
- "name": "dataset-id",
1632
+ "local": {
1633
+ "description": "Write per-project config (default)",
1634
+ "exclusive": [
1635
+ "global"
1636
+ ],
1637
+ "name": "local",
1638
+ "allowNo": false,
1639
+ "type": "boolean"
1640
+ },
1641
+ "global": {
1642
+ "description": "Write user-level global config",
1643
+ "exclusive": [
1644
+ "local"
1645
+ ],
1646
+ "name": "global",
1647
+ "allowNo": false,
1648
+ "type": "boolean"
1649
+ },
1650
+ "project-id": {
1651
+ "description": "Respan project ID (added to metadata / resource attributes)",
1652
+ "env": "RESPAN_PROJECT_ID",
1653
+ "name": "project-id",
1248
1654
  "hasDynamicHelp": false,
1249
1655
  "multiple": false,
1250
1656
  "type": "option"
1251
1657
  },
1252
- "log-ids": {
1253
- "description": "Comma-separated log/span IDs to evaluate",
1254
- "name": "log-ids",
1658
+ "base-url": {
1659
+ "description": "Respan API base URL (for enterprise deployments)",
1660
+ "name": "base-url",
1661
+ "default": "https://api.respan.ai/api",
1255
1662
  "hasDynamicHelp": false,
1256
1663
  "multiple": false,
1257
1664
  "type": "option"
1258
1665
  },
1259
- "params": {
1260
- "description": "Additional parameters as JSON string",
1261
- "name": "params",
1666
+ "attrs": {
1667
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1668
+ "name": "attrs",
1669
+ "default": "{}",
1262
1670
  "hasDynamicHelp": false,
1263
1671
  "multiple": false,
1264
1672
  "type": "option"
1673
+ },
1674
+ "dry-run": {
1675
+ "description": "Preview changes without writing files",
1676
+ "name": "dry-run",
1677
+ "allowNo": false,
1678
+ "type": "boolean"
1265
1679
  }
1266
1680
  },
1267
1681
  "hasDynamicHelp": false,
1268
1682
  "hiddenAliases": [],
1269
- "id": "evaluators:run",
1683
+ "id": "integrate:claude-code",
1270
1684
  "pluginAlias": "@respan/cli",
1271
1685
  "pluginName": "@respan/cli",
1272
1686
  "pluginType": "core",
@@ -1276,20 +1690,20 @@
1276
1690
  "relativePath": [
1277
1691
  "dist",
1278
1692
  "commands",
1279
- "evaluators",
1280
- "run.js"
1693
+ "integrate",
1694
+ "claude-code.js"
1281
1695
  ]
1282
1696
  },
1283
- "evaluators:update": {
1697
+ "integrate:codex-cli": {
1284
1698
  "aliases": [],
1285
- "args": {
1286
- "id": {
1287
- "description": "Evaluator ID",
1288
- "name": "id",
1289
- "required": true
1290
- }
1291
- },
1292
- "description": "Update an evaluator",
1699
+ "args": {},
1700
+ "description": "Integrate Respan with Codex CLI.\n\nCodex CLI has native OTel traces (prompts, tool approvals, results)\nso we append an [otel] block to its TOML config.\n\nScope:\n --local Write to .codex/config.toml in project root (default)\n --global Write to ~/.codex/config.toml\n If [otel] already exists in the target file, warns and does not overwrite.",
1701
+ "examples": [
1702
+ "respan integrate codex-cli",
1703
+ "respan integrate codex-cli --global",
1704
+ "respan integrate codex-cli --project-id my-project --attrs '{\"env\":\"prod\"}'",
1705
+ "respan integrate codex-cli --dry-run"
1706
+ ],
1293
1707
  "flags": {
1294
1708
  "api-key": {
1295
1709
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1325,31 +1739,58 @@
1325
1739
  "allowNo": false,
1326
1740
  "type": "boolean"
1327
1741
  },
1328
- "name": {
1329
- "description": "Evaluator name",
1330
- "name": "name",
1742
+ "local": {
1743
+ "description": "Write per-project config (default)",
1744
+ "exclusive": [
1745
+ "global"
1746
+ ],
1747
+ "name": "local",
1748
+ "allowNo": false,
1749
+ "type": "boolean"
1750
+ },
1751
+ "global": {
1752
+ "description": "Write user-level global config",
1753
+ "exclusive": [
1754
+ "local"
1755
+ ],
1756
+ "name": "global",
1757
+ "allowNo": false,
1758
+ "type": "boolean"
1759
+ },
1760
+ "project-id": {
1761
+ "description": "Respan project ID (added to metadata / resource attributes)",
1762
+ "env": "RESPAN_PROJECT_ID",
1763
+ "name": "project-id",
1331
1764
  "hasDynamicHelp": false,
1332
1765
  "multiple": false,
1333
1766
  "type": "option"
1334
1767
  },
1335
- "description": {
1336
- "description": "Evaluator description",
1337
- "name": "description",
1768
+ "base-url": {
1769
+ "description": "Respan API base URL (for enterprise deployments)",
1770
+ "name": "base-url",
1771
+ "default": "https://api.respan.ai/api",
1338
1772
  "hasDynamicHelp": false,
1339
1773
  "multiple": false,
1340
1774
  "type": "option"
1341
1775
  },
1342
- "config": {
1343
- "description": "Evaluator config as JSON string",
1344
- "name": "config",
1776
+ "attrs": {
1777
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1778
+ "name": "attrs",
1779
+ "default": "{}",
1345
1780
  "hasDynamicHelp": false,
1346
1781
  "multiple": false,
1347
1782
  "type": "option"
1783
+ },
1784
+ "dry-run": {
1785
+ "description": "Preview changes without writing files",
1786
+ "name": "dry-run",
1787
+ "allowNo": false,
1788
+ "type": "boolean"
1348
1789
  }
1349
1790
  },
1350
1791
  "hasDynamicHelp": false,
1351
1792
  "hiddenAliases": [],
1352
- "id": "evaluators:update",
1793
+ "id": "integrate:codex-cli",
1353
1794
  "pluginAlias": "@respan/cli",
1354
1795
  "pluginName": "@respan/cli",
1355
1796
  "pluginType": "core",
@@ -1359,14 +1800,20 @@
1359
1800
  "relativePath": [
1360
1801
  "dist",
1361
1802
  "commands",
1362
- "evaluators",
1363
- "update.js"
1803
+ "integrate",
1804
+ "codex-cli.js"
1364
1805
  ]
1365
1806
  },
1366
- "experiments:create": {
1807
+ "integrate:gemini-cli": {
1367
1808
  "aliases": [],
1368
1809
  "args": {},
1369
- "description": "Create a new experiment",
1810
+ "description": "Integrate Respan with Gemini CLI.\n\nGemini CLI has native OTel traces (tool_call, llm_call, agent_call)\nso we configure it to send telemetry directly to the Respan OTLP\nendpoint.\n\nScope:\n --local Write to .gemini/settings.json in project root (default)\n --global Write to ~/.gemini/settings.json",
1811
+ "examples": [
1812
+ "respan integrate gemini-cli",
1813
+ "respan integrate gemini-cli --global",
1814
+ "respan integrate gemini-cli --project-id my-project --attrs '{\"env\":\"prod\"}'",
1815
+ "respan integrate gemini-cli --dry-run"
1816
+ ],
1370
1817
  "flags": {
1371
1818
  "api-key": {
1372
1819
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1402,40 +1849,58 @@
1402
1849
  "allowNo": false,
1403
1850
  "type": "boolean"
1404
1851
  },
1405
- "name": {
1406
- "description": "Experiment name",
1407
- "name": "name",
1408
- "required": true,
1409
- "hasDynamicHelp": false,
1410
- "multiple": false,
1411
- "type": "option"
1852
+ "local": {
1853
+ "description": "Write per-project config (default)",
1854
+ "exclusive": [
1855
+ "global"
1856
+ ],
1857
+ "name": "local",
1858
+ "allowNo": false,
1859
+ "type": "boolean"
1412
1860
  },
1413
- "dataset-id": {
1414
- "description": "Dataset ID",
1415
- "name": "dataset-id",
1416
- "required": true,
1861
+ "global": {
1862
+ "description": "Write user-level global config",
1863
+ "exclusive": [
1864
+ "local"
1865
+ ],
1866
+ "name": "global",
1867
+ "allowNo": false,
1868
+ "type": "boolean"
1869
+ },
1870
+ "project-id": {
1871
+ "description": "Respan project ID (added to metadata / resource attributes)",
1872
+ "env": "RESPAN_PROJECT_ID",
1873
+ "name": "project-id",
1417
1874
  "hasDynamicHelp": false,
1418
1875
  "multiple": false,
1419
1876
  "type": "option"
1420
1877
  },
1421
- "description": {
1422
- "description": "Experiment description",
1423
- "name": "description",
1878
+ "base-url": {
1879
+ "description": "Respan API base URL (for enterprise deployments)",
1880
+ "name": "base-url",
1881
+ "default": "https://api.respan.ai/api",
1424
1882
  "hasDynamicHelp": false,
1425
1883
  "multiple": false,
1426
1884
  "type": "option"
1427
1885
  },
1428
- "workflows": {
1429
- "description": "Workflows configuration as JSON string",
1430
- "name": "workflows",
1886
+ "attrs": {
1887
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1888
+ "name": "attrs",
1889
+ "default": "{}",
1431
1890
  "hasDynamicHelp": false,
1432
1891
  "multiple": false,
1433
1892
  "type": "option"
1893
+ },
1894
+ "dry-run": {
1895
+ "description": "Preview changes without writing files",
1896
+ "name": "dry-run",
1897
+ "allowNo": false,
1898
+ "type": "boolean"
1434
1899
  }
1435
1900
  },
1436
1901
  "hasDynamicHelp": false,
1437
1902
  "hiddenAliases": [],
1438
- "id": "experiments:create",
1903
+ "id": "integrate:gemini-cli",
1439
1904
  "pluginAlias": "@respan/cli",
1440
1905
  "pluginName": "@respan/cli",
1441
1906
  "pluginType": "core",
@@ -1445,20 +1910,20 @@
1445
1910
  "relativePath": [
1446
1911
  "dist",
1447
1912
  "commands",
1448
- "experiments",
1449
- "create.js"
1913
+ "integrate",
1914
+ "gemini-cli.js"
1450
1915
  ]
1451
1916
  },
1452
- "experiments:get": {
1917
+ "integrate:opencode": {
1453
1918
  "aliases": [],
1454
- "args": {
1455
- "id": {
1456
- "description": "Experiment ID",
1457
- "name": "id",
1458
- "required": true
1459
- }
1460
- },
1461
- "description": "Get a specific experiment",
1919
+ "args": {},
1920
+ "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.",
1921
+ "examples": [
1922
+ "respan integrate opencode",
1923
+ "respan integrate opencode --global",
1924
+ "respan integrate opencode --project-id my-project --attrs '{\"env\":\"prod\"}'",
1925
+ "respan integrate opencode --dry-run"
1926
+ ],
1462
1927
  "flags": {
1463
1928
  "api-key": {
1464
1929
  "description": "API key (env: RESPAN_API_KEY)",
@@ -1493,83 +1958,59 @@
1493
1958
  "name": "verbose",
1494
1959
  "allowNo": false,
1495
1960
  "type": "boolean"
1496
- }
1497
- },
1498
- "hasDynamicHelp": false,
1499
- "hiddenAliases": [],
1500
- "id": "experiments:get",
1501
- "pluginAlias": "@respan/cli",
1502
- "pluginName": "@respan/cli",
1503
- "pluginType": "core",
1504
- "strict": true,
1505
- "enableJsonFlag": false,
1506
- "isESM": true,
1507
- "relativePath": [
1508
- "dist",
1509
- "commands",
1510
- "experiments",
1511
- "get.js"
1512
- ]
1513
- },
1514
- "experiments:list": {
1515
- "aliases": [],
1516
- "args": {},
1517
- "description": "List experiments",
1518
- "flags": {
1519
- "api-key": {
1520
- "description": "API key (env: RESPAN_API_KEY)",
1521
- "env": "RESPAN_API_KEY",
1522
- "name": "api-key",
1523
- "hasDynamicHelp": false,
1524
- "multiple": false,
1525
- "type": "option"
1526
- },
1527
- "profile": {
1528
- "description": "Named profile to use",
1529
- "name": "profile",
1530
- "hasDynamicHelp": false,
1531
- "multiple": false,
1532
- "type": "option"
1533
1961
  },
1534
- "json": {
1535
- "description": "Output as JSON",
1536
- "name": "json",
1962
+ "local": {
1963
+ "description": "Write per-project config (default)",
1964
+ "exclusive": [
1965
+ "global"
1966
+ ],
1967
+ "name": "local",
1537
1968
  "allowNo": false,
1538
1969
  "type": "boolean"
1539
1970
  },
1540
- "csv": {
1541
- "description": "Output as CSV",
1542
- "name": "csv",
1971
+ "global": {
1972
+ "description": "Write user-level global config",
1973
+ "exclusive": [
1974
+ "local"
1975
+ ],
1976
+ "name": "global",
1543
1977
  "allowNo": false,
1544
1978
  "type": "boolean"
1545
1979
  },
1546
- "verbose": {
1547
- "char": "v",
1548
- "description": "Show verbose output",
1549
- "name": "verbose",
1550
- "allowNo": false,
1551
- "type": "boolean"
1980
+ "project-id": {
1981
+ "description": "Respan project ID (added to metadata / resource attributes)",
1982
+ "env": "RESPAN_PROJECT_ID",
1983
+ "name": "project-id",
1984
+ "hasDynamicHelp": false,
1985
+ "multiple": false,
1986
+ "type": "option"
1552
1987
  },
1553
- "limit": {
1554
- "description": "Number of results per page",
1555
- "name": "limit",
1556
- "default": 20,
1988
+ "base-url": {
1989
+ "description": "Respan API base URL (for enterprise deployments)",
1990
+ "name": "base-url",
1991
+ "default": "https://api.respan.ai/api",
1557
1992
  "hasDynamicHelp": false,
1558
1993
  "multiple": false,
1559
1994
  "type": "option"
1560
1995
  },
1561
- "page": {
1562
- "description": "Page number",
1563
- "name": "page",
1564
- "default": 1,
1996
+ "attrs": {
1997
+ "description": "Custom attributes JSON (e.g. '{\"env\":\"prod\"}')",
1998
+ "name": "attrs",
1999
+ "default": "{}",
1565
2000
  "hasDynamicHelp": false,
1566
2001
  "multiple": false,
1567
2002
  "type": "option"
2003
+ },
2004
+ "dry-run": {
2005
+ "description": "Preview changes without writing files",
2006
+ "name": "dry-run",
2007
+ "allowNo": false,
2008
+ "type": "boolean"
1568
2009
  }
1569
2010
  },
1570
2011
  "hasDynamicHelp": false,
1571
2012
  "hiddenAliases": [],
1572
- "id": "experiments:list",
2013
+ "id": "integrate:opencode",
1573
2014
  "pluginAlias": "@respan/cli",
1574
2015
  "pluginName": "@respan/cli",
1575
2016
  "pluginType": "core",
@@ -1579,8 +2020,8 @@
1579
2020
  "relativePath": [
1580
2021
  "dist",
1581
2022
  "commands",
1582
- "experiments",
1583
- "list.js"
2023
+ "integrate",
2024
+ "opencode.js"
1584
2025
  ]
1585
2026
  },
1586
2027
  "logs:create": {
@@ -2929,5 +3370,5 @@
2929
3370
  ]
2930
3371
  }
2931
3372
  },
2932
- "version": "0.3.2"
3373
+ "version": "0.4.0"
2933
3374
  }