@quonfig/cli 0.0.27 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,7 +14,7 @@ $ npm install -g @quonfig/cli
14
14
  $ qfg COMMAND
15
15
  running command...
16
16
  $ qfg (--version)
17
- @quonfig/cli/0.0.27 linux-x64 node-v24.4.1
17
+ @quonfig/cli/0.0.29 linux-x64 node-v24.4.1
18
18
  $ qfg --help [COMMAND]
19
19
  USAGE
20
20
  $ qfg COMMAND
@@ -41,7 +41,6 @@ USAGE
41
41
  * [`qfg log-level NAME`](#qfg-log-level-name)
42
42
  * [`qfg login`](#qfg-login)
43
43
  * [`qfg logout`](#qfg-logout)
44
- * [`qfg mcp`](#qfg-mcp)
45
44
  * [`qfg migrate`](#qfg-migrate)
46
45
  * [`qfg migrate doctor`](#qfg-migrate-doctor)
47
46
  * [`qfg migrate my-code`](#qfg-migrate-my-code)
@@ -92,7 +91,7 @@ EXAMPLES
92
91
  $ qfg config-schema --json-schema # full JSON Schema document (copy into your editor)
93
92
  ```
94
93
 
95
- _See code: [src/commands/config-schema.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/config-schema.ts)_
94
+ _See code: [src/commands/config-schema.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/config-schema.ts)_
96
95
 
97
96
  ## `qfg create NAME`
98
97
 
@@ -177,7 +176,7 @@ EXAMPLES
177
176
  $ qfg set-rollout my.new.flag --environment production --true-percent 20
178
177
  ```
179
178
 
180
- _See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/create.ts)_
179
+ _See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/create.ts)_
181
180
 
182
181
  ## `qfg delete NAME`
183
182
 
@@ -223,7 +222,7 @@ EXAMPLES
223
222
  $ qfg delete my.config --yes
224
223
  ```
225
224
 
226
- _See code: [src/commands/delete.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/delete.ts)_
225
+ _See code: [src/commands/delete.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/delete.ts)_
227
226
 
228
227
  ## `qfg flag info [NAME]`
229
228
 
@@ -426,7 +425,7 @@ EXAMPLES
426
425
  $ qfg generate --targets node-ts -o ./dist # combine with targets
427
426
  ```
428
427
 
429
- _See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/generate.ts)_
428
+ _See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/generate.ts)_
430
429
 
431
430
  ## `qfg generate-new-hex-key`
432
431
 
@@ -449,7 +448,7 @@ EXAMPLES
449
448
  $ qfg generate-new-hex-key
450
449
  ```
451
450
 
452
- _See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/generate-new-hex-key.ts)_
451
+ _See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/generate-new-hex-key.ts)_
453
452
 
454
453
  ## `qfg get [NAME]`
455
454
 
@@ -481,7 +480,7 @@ EXAMPLES
481
480
  $ qfg get my.config.name --environment=production
482
481
  ```
483
482
 
484
- _See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/get.ts)_
483
+ _See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/get.ts)_
485
484
 
486
485
  ## `qfg info [NAME]`
487
486
 
@@ -529,7 +528,7 @@ EXAMPLES
529
528
  $ qfg info my.config.name --exclude-evaluations # skip 24h stats
530
529
  ```
531
530
 
532
- _See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/info.ts)_
531
+ _See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/info.ts)_
533
532
 
534
533
  ## `qfg init [DIRECTORY]`
535
534
 
@@ -569,7 +568,7 @@ EXAMPLES
569
568
  $ qfg init --dry-run
570
569
  ```
571
570
 
572
- _See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/init.ts)_
571
+ _See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/init.ts)_
573
572
 
574
573
  ## `qfg interactive`
575
574
 
@@ -599,7 +598,7 @@ EXAMPLES
599
598
  $ qfg
600
599
  ```
601
600
 
602
- _See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/interactive.ts)_
601
+ _See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/interactive.ts)_
603
602
 
604
603
  ## `qfg list`
605
604
 
@@ -639,7 +638,7 @@ EXAMPLES
639
638
  $ qfg list --feature-flags
640
639
  ```
641
640
 
642
- _See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/list.ts)_
641
+ _See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/list.ts)_
643
642
 
644
643
  ## `qfg log-level NAME`
645
644
 
@@ -704,7 +703,7 @@ EXAMPLES
704
703
  $ qfg log-level log-level.my-app --target=Chatty --value=INFO --environment=production
705
704
  ```
706
705
 
707
- _See code: [src/commands/log-level.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/log-level.ts)_
706
+ _See code: [src/commands/log-level.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/log-level.ts)_
708
707
 
709
708
  ## `qfg login`
710
709
 
@@ -729,7 +728,7 @@ EXAMPLES
729
728
  $ qfg login --profile myprofile
730
729
  ```
731
730
 
732
- _See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/login.ts)_
731
+ _See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/login.ts)_
733
732
 
734
733
  ## `qfg logout`
735
734
 
@@ -752,40 +751,7 @@ EXAMPLES
752
751
  $ qfg logout
753
752
  ```
754
753
 
755
- _See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/logout.ts)_
756
-
757
- ## `qfg mcp`
758
-
759
- Configure Quonfig MCP server for your AI assistant
760
-
761
- ```
762
- USAGE
763
- $ qfg mcp [--json] [--interactive] [--no-color] [--verbose] [--editor claude-code|codeium] [--url
764
- <value>]
765
-
766
- FLAGS
767
- --editor=<option> Editor to configure (cursor, vscode, claude, windsurf)
768
- <options: claude-code|codeium>
769
- --url=<value> Internal URL for testing (defaults to https://app.quonfig.com/api/v1/mcp)
770
-
771
- GLOBAL FLAGS
772
- --[no-]interactive Force interactive mode
773
- --json Format output as json.
774
- --no-color Do not colorize output
775
- --verbose Verbose output
776
-
777
- DESCRIPTION
778
- Configure Quonfig MCP server for your AI assistant
779
-
780
- EXAMPLES
781
- $ qfg mcp
782
-
783
- $ qfg mcp --editor cursor
784
-
785
- $ qfg mcp --url http://local-app.quonfig-staging.com:3003/api/v1/mcp
786
- ```
787
-
788
- _See code: [src/commands/mcp.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/mcp.ts)_
754
+ _See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/logout.ts)_
789
755
 
790
756
  ## `qfg migrate`
791
757
 
@@ -839,7 +805,7 @@ EXAMPLES
839
805
  $ qfg migrate --from launch --api-key $LAUNCH_API_KEY --dir ./quonfig-config --staging
840
806
  ```
841
807
 
842
- _See code: [src/commands/migrate.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/migrate.ts)_
808
+ _See code: [src/commands/migrate.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/migrate.ts)_
843
809
 
844
810
  ## `qfg migrate doctor`
845
811
 
@@ -877,7 +843,7 @@ EXAMPLES
877
843
  $ qfg migrate doctor --json
878
844
  ```
879
845
 
880
- _See code: [src/commands/migrate/doctor.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/migrate/doctor.ts)_
846
+ _See code: [src/commands/migrate/doctor.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/migrate/doctor.ts)_
881
847
 
882
848
  ## `qfg migrate my-code`
883
849
 
@@ -909,7 +875,7 @@ EXAMPLES
909
875
  $ qfg migrate my-code --dry-run
910
876
  ```
911
877
 
912
- _See code: [src/commands/migrate/my-code.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/migrate/my-code.ts)_
878
+ _See code: [src/commands/migrate/my-code.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/migrate/my-code.ts)_
913
879
 
914
880
  ## `qfg migrate status`
915
881
 
@@ -940,7 +906,7 @@ EXAMPLES
940
906
  $ qfg migrate status --json
941
907
  ```
942
908
 
943
- _See code: [src/commands/migrate/status.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/migrate/status.ts)_
909
+ _See code: [src/commands/migrate/status.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/migrate/status.ts)_
944
910
 
945
911
  ## `qfg override [NAME] [VALUE]`
946
912
 
@@ -995,7 +961,7 @@ EXAMPLES
995
961
  $ qfg override my.flag true --env=staging
996
962
  ```
997
963
 
998
- _See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/override.ts)_
964
+ _See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/override.ts)_
999
965
 
1000
966
  ## `qfg pull`
1001
967
 
@@ -1039,7 +1005,7 @@ EXAMPLES
1039
1005
  $ qfg pull # uses QUONFIG_DIR env var
1040
1006
  ```
1041
1007
 
1042
- _See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/pull.ts)_
1008
+ _See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/pull.ts)_
1043
1009
 
1044
1010
  ## `qfg push`
1045
1011
 
@@ -1087,7 +1053,7 @@ EXAMPLES
1087
1053
  $ qfg push --dir ./our-config --yes
1088
1054
  ```
1089
1055
 
1090
- _See code: [src/commands/push.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/push.ts)_
1056
+ _See code: [src/commands/push.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/push.ts)_
1091
1057
 
1092
1058
  ## `qfg schema NAME`
1093
1059
 
@@ -1125,7 +1091,7 @@ EXAMPLES
1125
1091
  $ qfg schema my-schema --set-json-schema=@schemas/my-schema.json --protected
1126
1092
  ```
1127
1093
 
1128
- _See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/schema.ts)_
1094
+ _See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/schema.ts)_
1129
1095
 
1130
1096
  ## `qfg sdk-key`
1131
1097
 
@@ -1152,7 +1118,7 @@ EXAMPLES
1152
1118
  $ qfg sdk-key revoke <key-id>
1153
1119
  ```
1154
1120
 
1155
- _See code: [src/commands/sdk-key.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/sdk-key.ts)_
1121
+ _See code: [src/commands/sdk-key.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/sdk-key.ts)_
1156
1122
 
1157
1123
  ## `qfg sdk-key create`
1158
1124
 
@@ -1184,7 +1150,7 @@ EXAMPLES
1184
1150
  $ qfg sdk-key create --environment staging --type browser
1185
1151
  ```
1186
1152
 
1187
- _See code: [src/commands/sdk-key/create.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/sdk-key/create.ts)_
1153
+ _See code: [src/commands/sdk-key/create.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/sdk-key/create.ts)_
1188
1154
 
1189
1155
  ## `qfg sdk-key list`
1190
1156
 
@@ -1213,7 +1179,7 @@ EXAMPLES
1213
1179
  $ qfg sdk-key list --environment production
1214
1180
  ```
1215
1181
 
1216
- _See code: [src/commands/sdk-key/list.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/sdk-key/list.ts)_
1182
+ _See code: [src/commands/sdk-key/list.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/sdk-key/list.ts)_
1217
1183
 
1218
1184
  ## `qfg sdk-key revoke KEYID`
1219
1185
 
@@ -1240,7 +1206,7 @@ EXAMPLES
1240
1206
  $ qfg sdk-key revoke a1b2c3d4-e5f6-7890-abcd-ef1234567890
1241
1207
  ```
1242
1208
 
1243
- _See code: [src/commands/sdk-key/revoke.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/sdk-key/revoke.ts)_
1209
+ _See code: [src/commands/sdk-key/revoke.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/sdk-key/revoke.ts)_
1244
1210
 
1245
1211
  ## `qfg set-default [NAME]`
1246
1212
 
@@ -1311,7 +1277,7 @@ EXAMPLES
1311
1277
  $ qfg pull && qfg config-schema
1312
1278
  ```
1313
1279
 
1314
- _See code: [src/commands/set-default.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/set-default.ts)_
1280
+ _See code: [src/commands/set-default.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/set-default.ts)_
1315
1281
 
1316
1282
  ## `qfg set-rollout [NAME]`
1317
1283
 
@@ -1388,7 +1354,7 @@ EXAMPLES
1388
1354
  $ qfg set-rollout my.variant.flag --environment production --weights "a:33,b:33,c:34" --hash-by user.id
1389
1355
  ```
1390
1356
 
1391
- _See code: [src/commands/set-rollout.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/set-rollout.ts)_
1357
+ _See code: [src/commands/set-rollout.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/set-rollout.ts)_
1392
1358
 
1393
1359
  ## `qfg sync`
1394
1360
 
@@ -1420,7 +1386,7 @@ EXAMPLES
1420
1386
  $ qfg sync --watch --dir ./our-config --interval 30
1421
1387
  ```
1422
1388
 
1423
- _See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/sync.ts)_
1389
+ _See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/sync.ts)_
1424
1390
 
1425
1391
  ## `qfg toggle [NAME]`
1426
1392
 
@@ -1522,7 +1488,7 @@ EXAMPLES
1522
1488
  $ qfg verify --json
1523
1489
  ```
1524
1490
 
1525
- _See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/verify.ts)_
1491
+ _See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/verify.ts)_
1526
1492
 
1527
1493
  ## `qfg whoami`
1528
1494
 
@@ -1545,7 +1511,7 @@ EXAMPLES
1545
1511
  $ qfg whoami
1546
1512
  ```
1547
1513
 
1548
- _See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/whoami.ts)_
1514
+ _See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/whoami.ts)_
1549
1515
 
1550
1516
  ## `qfg workspace`
1551
1517
 
@@ -1568,7 +1534,7 @@ EXAMPLES
1568
1534
  $ qfg workspace
1569
1535
  ```
1570
1536
 
1571
- _See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/workspace.ts)_
1537
+ _See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/workspace.ts)_
1572
1538
 
1573
1539
  ## `qfg workspace bootstrap`
1574
1540
 
@@ -1601,7 +1567,7 @@ EXAMPLES
1601
1567
  $ qfg workspace bootstrap --dir ./our-config --skip-validate
1602
1568
  ```
1603
1569
 
1604
- _See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/workspace/bootstrap.ts)_
1570
+ _See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/workspace/bootstrap.ts)_
1605
1571
 
1606
1572
  ## `qfg workspace create SLUG`
1607
1573
 
@@ -1635,7 +1601,7 @@ EXAMPLES
1635
1601
  $ qfg workspace create my-team --org 11111111-1111-1111-1111-111111111111
1636
1602
  ```
1637
1603
 
1638
- _See code: [src/commands/workspace/create.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/workspace/create.ts)_
1604
+ _See code: [src/commands/workspace/create.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/workspace/create.ts)_
1639
1605
 
1640
1606
  ## `qfg workspace switch [SLUG]`
1641
1607
 
@@ -1663,7 +1629,7 @@ EXAMPLES
1663
1629
  $ qfg workspace switch acme/production
1664
1630
  ```
1665
1631
 
1666
- _See code: [src/commands/workspace/switch.ts](https://github.com/quonfig/cli/blob/v0.0.27/src/commands/workspace/switch.ts)_
1632
+ _See code: [src/commands/workspace/switch.ts](https://github.com/quonfig/cli/blob/v0.0.29/src/commands/workspace/switch.ts)_
1667
1633
  <!-- commandsstop -->
1668
1634
 
1669
1635
  ## Local Development
@@ -3,7 +3,6 @@ import GenerateNewHexKey from './commands/generate-new-hex-key.js';
3
3
  import Get from './commands/get.js';
4
4
  import Info from './commands/info.js';
5
5
  import List from './commands/list.js';
6
- import Mcp from './commands/mcp.js';
7
6
  import Override from './commands/override.js';
8
7
  import SetDefault from './commands/set-default.js';
9
8
  import { APICommand } from './index.js';
@@ -15,7 +14,7 @@ const convertToKebabCase = (text) => text
15
14
  .trim()
16
15
  .replaceAll(' ', '-')
17
16
  .toLowerCase();
18
- const commands = [SetDefault, GenerateNewHexKey, Create, Get, Info, Mcp, Override, List].map((command) => {
17
+ const commands = [SetDefault, GenerateNewHexKey, Create, Get, Info, Override, List].map((command) => {
19
18
  const id = convertToKebabCase(command.name);
20
19
  return {
21
20
  command,
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.5.2";
1
+ declare const _default: "0.0.29";
2
2
  export default _default;
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- // NOTE: This file is generated
2
- export default '0.5.2';
1
+ // AUTO-GENERATED from package.json by scripts/generate-version.mjs — do not edit.
2
+ export default '0.0.29';
@@ -1080,79 +1080,6 @@
1080
1080
  "logout.js"
1081
1081
  ]
1082
1082
  },
1083
- "mcp": {
1084
- "aliases": [],
1085
- "args": {},
1086
- "description": "Configure Quonfig MCP server for your AI assistant",
1087
- "examples": [
1088
- "<%= config.bin %> <%= command.id %>",
1089
- "<%= config.bin %> <%= command.id %> --editor cursor",
1090
- "<%= config.bin %> <%= command.id %> --url http://local-app.quonfig-staging.com:3003/api/v1/mcp"
1091
- ],
1092
- "flags": {
1093
- "json": {
1094
- "description": "Format output as json.",
1095
- "helpGroup": "GLOBAL",
1096
- "name": "json",
1097
- "allowNo": false,
1098
- "type": "boolean"
1099
- },
1100
- "interactive": {
1101
- "description": "Force interactive mode",
1102
- "helpGroup": "GLOBAL",
1103
- "name": "interactive",
1104
- "allowNo": true,
1105
- "type": "boolean"
1106
- },
1107
- "no-color": {
1108
- "description": "Do not colorize output",
1109
- "env": "NO_COLOR",
1110
- "helpGroup": "GLOBAL",
1111
- "name": "no-color",
1112
- "allowNo": false,
1113
- "type": "boolean"
1114
- },
1115
- "verbose": {
1116
- "description": "Verbose output",
1117
- "helpGroup": "GLOBAL",
1118
- "name": "verbose",
1119
- "allowNo": false,
1120
- "type": "boolean"
1121
- },
1122
- "editor": {
1123
- "description": "Editor to configure (cursor, vscode, claude, windsurf)",
1124
- "name": "editor",
1125
- "hasDynamicHelp": false,
1126
- "multiple": false,
1127
- "options": [
1128
- "claude-code",
1129
- "codeium"
1130
- ],
1131
- "type": "option"
1132
- },
1133
- "url": {
1134
- "description": "Internal URL for testing (defaults to https://app.quonfig.com/api/v1/mcp)",
1135
- "name": "url",
1136
- "hasDynamicHelp": false,
1137
- "multiple": false,
1138
- "type": "option"
1139
- }
1140
- },
1141
- "hasDynamicHelp": false,
1142
- "hiddenAliases": [],
1143
- "id": "mcp",
1144
- "pluginAlias": "@quonfig/cli",
1145
- "pluginName": "@quonfig/cli",
1146
- "pluginType": "core",
1147
- "strict": true,
1148
- "enableJsonFlag": true,
1149
- "isESM": true,
1150
- "relativePath": [
1151
- "dist",
1152
- "commands",
1153
- "mcp.js"
1154
- ]
1155
- },
1156
1083
  "migrate": {
1157
1084
  "aliases": [],
1158
1085
  "args": {},
@@ -2983,5 +2910,5 @@
2983
2910
  ]
2984
2911
  }
2985
2912
  },
2986
- "version": "0.0.27"
2913
+ "version": "0.0.29"
2987
2914
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "packageManager": "yarn@4.11.0+sha512.4e54aeace9141df2f0177c266b05ec50dc044638157dae128c471ba65994ac802122d7ab35bcd9e81641228b7dcf24867d28e750e0bcae8a05277d600008ad54",
3
3
  "name": "@quonfig/cli",
4
- "version": "0.0.27",
4
+ "version": "0.0.29",
5
5
  "bugs": {
6
6
  "url": "https://github.com/quonfig/cli/issues"
7
7
  },
@@ -25,7 +25,6 @@
25
25
  "acorn": "^8.10.0",
26
26
  "acorn-walk": "^8.2.0",
27
27
  "chalk": "^5.4.1",
28
- "comment-json": "^4.6.2",
29
28
  "common-tags": "^1.8.2",
30
29
  "fuzzy": "^0.1.3",
31
30
  "inquirer-autocomplete-standalone": "^0.8.1",
@@ -87,6 +86,7 @@
87
86
  }
88
87
  },
89
88
  "scripts": {
89
+ "prebuild": "node scripts/generate-version.mjs",
90
90
  "build": "shx rm -rf dist && tsc -b",
91
91
  "lint": "eslint --cache=true \"**/*.{ts,md,json}\"",
92
92
  "lint:fix": "eslint --cache=true --fix \"**/*.{ts,md,json}\"",
@@ -1,13 +0,0 @@
1
- import { BaseCommand } from '../index.js';
2
- export default class Mcp extends BaseCommand {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {
6
- editor: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
7
- url: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
8
- interactive: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
9
- 'no-color': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
10
- verbose: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
11
- };
12
- run(): Promise<void>;
13
- }
@@ -1,145 +0,0 @@
1
- import { Flags } from '@oclif/core';
2
- import { parse as parseJSON, stringify as stringifyJSON } from 'comment-json';
3
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
4
- import { dirname, join, relative } from 'node:path';
5
- import { BaseCommand } from '../index.js';
6
- import { ConfigPaths, SupportedEditors, getServersConfig, resolveConfigPath } from '../services/mcp.js';
7
- import autocomplete from '../util/autocomplete.js';
8
- import { green } from '../util/color.js';
9
- import isInteractive from '../util/is-interactive.js';
10
- export default class Mcp extends BaseCommand {
11
- static description = 'Configure Quonfig MCP server for your AI assistant';
12
- static examples = [
13
- '<%= config.bin %> <%= command.id %>',
14
- '<%= config.bin %> <%= command.id %> --editor cursor',
15
- '<%= config.bin %> <%= command.id %> --url http://local-app.quonfig-staging.com:3003/api/v1/mcp',
16
- ];
17
- static flags = {
18
- ...BaseCommand.baseFlags,
19
- editor: Flags.string({
20
- description: 'Editor to configure (cursor, vscode, claude, windsurf)',
21
- options: [...SupportedEditors],
22
- }),
23
- url: Flags.string({
24
- description: 'Internal URL for testing (defaults to https://app.quonfig.com/api/v1/mcp)',
25
- }),
26
- };
27
- async run() {
28
- const { flags } = await this.parse(Mcp);
29
- // Select Editor
30
- let selectedEditor;
31
- if (flags.editor) {
32
- selectedEditor = flags.editor;
33
- }
34
- else if (isInteractive(flags)) {
35
- const editorChoice = await autocomplete({
36
- message: green('Which editor do you want to configure?'),
37
- source: SupportedEditors.map((editor) => ConfigPaths[editor].name),
38
- });
39
- if (!editorChoice) {
40
- return this.error('Editor selection is required');
41
- }
42
- // Find the editor key by name
43
- selectedEditor = Object.keys(ConfigPaths).find((key) => ConfigPaths[key].name === editorChoice);
44
- }
45
- else {
46
- return this.error('--editor flag is required when interactive mode is not available');
47
- }
48
- // Determine config paths
49
- const cwd = process.cwd();
50
- const globalPath = resolveConfigPath(selectedEditor, false);
51
- const localPath = resolveConfigPath(selectedEditor, true);
52
- const fullLocalPath = localPath ? join(cwd, localPath) : undefined;
53
- if (!globalPath) {
54
- return this.error(`Unsupported platform for editor: ${selectedEditor}`);
55
- }
56
- // Determine scope (global vs local)
57
- let configPathType = 'global';
58
- if (fullLocalPath && isInteractive(flags)) {
59
- const scopeChoice = await autocomplete({
60
- message: green('Configure global or project-local settings?'),
61
- source: [`Local (${relative(cwd, fullLocalPath)})`, `Global (${globalPath})`],
62
- });
63
- if (!scopeChoice) {
64
- return this.error('Scope selection is required');
65
- }
66
- configPathType = scopeChoice.startsWith('Local') ? 'local' : 'global';
67
- }
68
- const configPath = configPathType === 'local' ? fullLocalPath : globalPath;
69
- const displayConfigPath = configPathType === 'local' ? relative(cwd, configPath) : configPath;
70
- this.log(`Configuring ${ConfigPaths[selectedEditor].name} at ${displayConfigPath}`);
71
- // Read/Parse existing config
72
- let editorConfig = {};
73
- if (existsSync(configPath)) {
74
- try {
75
- const content = readFileSync(configPath, 'utf8');
76
- const parsed = parseJSON(content);
77
- editorConfig = (parsed && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : {});
78
- this.log(`✓ Read existing configuration`);
79
- }
80
- catch (error) {
81
- return this.error(`Failed to parse configuration file: ${error}`);
82
- }
83
- }
84
- else {
85
- this.log(`Configuration file not found, creating new one`);
86
- }
87
- // Get servers config section
88
- const serversConfig = getServersConfig(editorConfig);
89
- // Check for existing Quonfig entries
90
- const existingQuonfigEntries = Object.keys(serversConfig).filter((key) => /quonfig/i.test(key));
91
- // Determine entry key
92
- let targetEntryKey = 'quonfig';
93
- if (existingQuonfigEntries.length > 0 && isInteractive(flags)) {
94
- const choices = [`Add: ${targetEntryKey}`, ...existingQuonfigEntries.map((key) => `Update: ${key}`)];
95
- const choice = await autocomplete({
96
- message: green('Add a new MCP server or update an existing one?'),
97
- source: choices,
98
- });
99
- if (!choice) {
100
- return this.error('MCP server selection is required');
101
- }
102
- if (choice.startsWith('Update:')) {
103
- targetEntryKey = choice.replace('Update: ', '');
104
- this.log(`Updating existing MCP server entry: ${targetEntryKey}`);
105
- }
106
- else {
107
- this.log(`Adding new MCP server entry: ${targetEntryKey}`);
108
- }
109
- }
110
- else if (existingQuonfigEntries.length > 0) {
111
- // Non-interactive mode with existing entries - update the first one
112
- targetEntryKey = existingQuonfigEntries[0];
113
- this.log(`Updating existing MCP server entry: ${targetEntryKey}`);
114
- }
115
- else {
116
- this.log(`Adding new MCP server entry: ${targetEntryKey}`);
117
- }
118
- // Construct MCP endpoint URL and config
119
- const mcpUrl = flags.url || 'https://app.quonfig.com/api/v1/mcp';
120
- if (selectedEditor === 'claude-code') {
121
- serversConfig[targetEntryKey] = {
122
- type: 'http',
123
- url: mcpUrl,
124
- };
125
- }
126
- else {
127
- serversConfig[targetEntryKey] = {
128
- url: mcpUrl,
129
- };
130
- }
131
- // Write config file
132
- try {
133
- // Ensure directory exists
134
- mkdirSync(dirname(configPath), { recursive: true });
135
- const configString = stringifyJSON(editorConfig, null, 2);
136
- writeFileSync(configPath, configString);
137
- this.log(`✓ Configuration updated successfully`);
138
- this.log('');
139
- this.log('You may need to restart your editor for changes to take effect.');
140
- }
141
- catch (error) {
142
- return this.error(`Failed to write configuration file: ${error}`);
143
- }
144
- }
145
- }
@@ -1,15 +0,0 @@
1
- export declare const SupportedEditors: readonly ["claude-code", "codeium"];
2
- export type SupportedEditor = (typeof SupportedEditors)[number];
3
- type ConfigPaths = {
4
- name: string;
5
- global: {
6
- mac: string;
7
- windows: string;
8
- linux?: string;
9
- } | string;
10
- local?: string;
11
- };
12
- export declare const ConfigPaths: Record<SupportedEditor, ConfigPaths>;
13
- export declare function resolveConfigPath(editor: SupportedEditor, local?: boolean): string | undefined;
14
- export declare function getServersConfig(editorConfig: Record<string, unknown>): Record<string, unknown>;
15
- export {};
@@ -1,59 +0,0 @@
1
- import { homedir } from 'node:os';
2
- import { join } from 'node:path';
3
- export const SupportedEditors = ['claude-code', 'codeium'];
4
- export const ConfigPaths = {
5
- // cursor: {
6
- // name: 'Cursor',
7
- // global: '~/.cursor/mcp.json',
8
- // local: '.cursor/mcp.json',
9
- // },
10
- 'claude-code': {
11
- name: 'Claude Code',
12
- global: '~/.claude.json',
13
- },
14
- codeium: {
15
- name: 'Codeium (Codex)',
16
- global: {
17
- mac: '~/Library/Application Support/Codeium/mcp_config.json',
18
- windows: '@/Codeium/mcp_config.json',
19
- linux: '~/.config/codeium/mcp_config.json',
20
- },
21
- },
22
- };
23
- function resolvePath(path) {
24
- if (path.startsWith('~/')) {
25
- return join(homedir(), path.slice(2));
26
- }
27
- if (path.startsWith('@/')) {
28
- // Windows AppData
29
- const appData = process.env.APPDATA || join(homedir(), 'AppData', 'Roaming');
30
- return join(appData, path.slice(2));
31
- }
32
- return path;
33
- }
34
- export function resolveConfigPath(editor, local = false) {
35
- const editorConfig = ConfigPaths[editor];
36
- const paths = local ? editorConfig.local : editorConfig.global;
37
- if (!paths)
38
- return undefined;
39
- if (typeof paths === 'string') {
40
- return resolvePath(paths);
41
- }
42
- // Platform-specific paths
43
- switch (process.platform) {
44
- case 'darwin':
45
- return resolvePath(paths.mac);
46
- case 'win32':
47
- return resolvePath(paths.windows);
48
- case 'linux':
49
- return paths.linux ? resolvePath(paths.linux) : undefined;
50
- default:
51
- return undefined;
52
- }
53
- }
54
- export function getServersConfig(editorConfig) {
55
- if (!editorConfig.mcpServers) {
56
- editorConfig.mcpServers = {};
57
- }
58
- return editorConfig.mcpServers;
59
- }