@quonfig/cli 0.4.0 → 0.5.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.
Files changed (47) hide show
  1. package/README.md +157 -75
  2. package/dist/agent/skill-bundle.generated.d.ts +1 -1
  3. package/dist/agent/skill-bundle.generated.js +4 -4
  4. package/dist/codegen/code-generators/base-typescript-generator.d.ts +1 -1
  5. package/dist/codegen/schema-extractor.d.ts +1 -1
  6. package/dist/commands/config-schema.js +9 -2
  7. package/dist/commands/create.d.ts +3 -1
  8. package/dist/commands/create.js +93 -20
  9. package/dist/commands/get.d.ts +1 -0
  10. package/dist/commands/get.js +40 -3
  11. package/dist/commands/info.js +10 -1
  12. package/dist/commands/set-default.d.ts +2 -0
  13. package/dist/commands/set-default.js +70 -18
  14. package/dist/index.d.ts +6 -0
  15. package/dist/index.js +35 -3
  16. package/dist/interactive-prompt.d.ts +18 -0
  17. package/dist/interactive-prompt.js +11 -2
  18. package/dist/migrate/quonfig-target/operators.js +4 -2
  19. package/dist/migrate/quonfig-target/ruleset.d.ts +48 -0
  20. package/dist/migrate/quonfig-target/ruleset.js +132 -8
  21. package/dist/migrate/sources/flagsmith/translate.js +11 -0
  22. package/dist/migrate/sources/launchdarkly/translate.js +19 -16
  23. package/dist/push/git-pack.d.ts +12 -0
  24. package/dist/push/git-pack.js +27 -3
  25. package/dist/push/run-push.d.ts +2 -1
  26. package/dist/push/run-push.js +1 -2
  27. package/dist/ui/get-string.d.ts +18 -1
  28. package/dist/ui/get-string.js +20 -5
  29. package/dist/ui/get-value.d.ts +3 -1
  30. package/dist/ui/get-value.js +7 -7
  31. package/dist/util/clone-and-stack-push.js +8 -3
  32. package/dist/util/encryption.js +11 -20
  33. package/dist/util/git-ops.d.ts +4 -2
  34. package/dist/util/git-ops.js +4 -2
  35. package/dist/util/redact.d.ts +56 -0
  36. package/dist/util/redact.js +98 -0
  37. package/dist/util/value-source.d.ts +30 -0
  38. package/dist/util/value-source.js +81 -0
  39. package/dist/verify/regex-dialect.d.ts +39 -0
  40. package/dist/verify/regex-dialect.js +278 -0
  41. package/dist/verify/standalone.d.ts +3 -1
  42. package/dist/verify/standalone.js +4 -19
  43. package/dist/verify/validate.js +20 -0
  44. package/dist/version.d.ts +1 -1
  45. package/dist/version.js +1 -1
  46. package/oclif.manifest.json +236 -192
  47. package/package.json +18 -16
package/README.md CHANGED
@@ -17,7 +17,7 @@ $ npm install -g @quonfig/cli
17
17
  $ qfg COMMAND
18
18
  running command...
19
19
  $ qfg (--version)
20
- @quonfig/cli/0.4.0 linux-x64 node-v24.4.1
20
+ @quonfig/cli/0.5.0 linux-x64 node-v24.4.1
21
21
  $ qfg --help [COMMAND]
22
22
  USAGE
23
23
  $ qfg COMMAND
@@ -204,7 +204,7 @@ EXAMPLES
204
204
  $ qfg activity restore my.flag --yes
205
205
  ```
206
206
 
207
- _See code: [src/commands/activity.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/activity.ts)_
207
+ _See code: [src/commands/activity.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/activity.ts)_
208
208
 
209
209
  ## `qfg activity deleted`
210
210
 
@@ -233,7 +233,7 @@ EXAMPLES
233
233
  $ qfg activity deleted --json
234
234
  ```
235
235
 
236
- _See code: [src/commands/activity/deleted.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/activity/deleted.ts)_
236
+ _See code: [src/commands/activity/deleted.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/activity/deleted.ts)_
237
237
 
238
238
  ## `qfg activity feed`
239
239
 
@@ -268,7 +268,7 @@ EXAMPLES
268
268
  $ qfg activity feed --json
269
269
  ```
270
270
 
271
- _See code: [src/commands/activity/feed.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/activity/feed.ts)_
271
+ _See code: [src/commands/activity/feed.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/activity/feed.ts)_
272
272
 
273
273
  ## `qfg activity history [NAME]`
274
274
 
@@ -302,7 +302,7 @@ EXAMPLES
302
302
  $ qfg activity history request.timeout --json
303
303
  ```
304
304
 
305
- _See code: [src/commands/activity/history.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/activity/history.ts)_
305
+ _See code: [src/commands/activity/history.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/activity/history.ts)_
306
306
 
307
307
  ## `qfg activity restore [NAME]`
308
308
 
@@ -341,7 +341,7 @@ EXAMPLES
341
341
  $ qfg activity restore request.timeout --type config --yes
342
342
  ```
343
343
 
344
- _See code: [src/commands/activity/restore.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/activity/restore.ts)_
344
+ _See code: [src/commands/activity/restore.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/activity/restore.ts)_
345
345
 
346
346
  ## `qfg agent install-skill`
347
347
 
@@ -386,7 +386,7 @@ EXAMPLES
386
386
  $ qfg agent install-skill --force
387
387
  ```
388
388
 
389
- _See code: [src/commands/agent/install-skill.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/agent/install-skill.ts)_
389
+ _See code: [src/commands/agent/install-skill.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/agent/install-skill.ts)_
390
390
 
391
391
  ## `qfg audit-log [NAME]`
392
392
 
@@ -414,7 +414,7 @@ EXAMPLES
414
414
  $ qfg audit-log my.flag
415
415
  ```
416
416
 
417
- _See code: [src/commands/audit-log.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/audit-log.ts)_
417
+ _See code: [src/commands/audit-log.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/audit-log.ts)_
418
418
 
419
419
  ## `qfg cleanup`
420
420
 
@@ -456,7 +456,7 @@ EXAMPLES
456
456
  $ qfg cleanup status my.flag.key
457
457
  ```
458
458
 
459
- _See code: [src/commands/cleanup.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/cleanup.ts)_
459
+ _See code: [src/commands/cleanup.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/cleanup.ts)_
460
460
 
461
461
  ## `qfg cleanup list`
462
462
 
@@ -503,7 +503,7 @@ EXAMPLES
503
503
  $ qfg cleanup list --json
504
504
  ```
505
505
 
506
- _See code: [src/commands/cleanup/list.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/cleanup/list.ts)_
506
+ _See code: [src/commands/cleanup/list.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/cleanup/list.ts)_
507
507
 
508
508
  ## `qfg cleanup remove [NAME]`
509
509
 
@@ -550,7 +550,7 @@ EXAMPLES
550
550
  $ qfg cleanup remove my.flag.key --json
551
551
  ```
552
552
 
553
- _See code: [src/commands/cleanup/remove.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/cleanup/remove.ts)_
553
+ _See code: [src/commands/cleanup/remove.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/cleanup/remove.ts)_
554
554
 
555
555
  ## `qfg cleanup status [NAME]`
556
556
 
@@ -590,7 +590,7 @@ EXAMPLES
590
590
  $ qfg cleanup status my.flag.key --json
591
591
  ```
592
592
 
593
- _See code: [src/commands/cleanup/status.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/cleanup/status.ts)_
593
+ _See code: [src/commands/cleanup/status.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/cleanup/status.ts)_
594
594
 
595
595
  ## `qfg cleanup verify [NAME]`
596
596
 
@@ -636,7 +636,7 @@ EXAMPLES
636
636
  $ qfg cleanup verify my.flag.key && qfg delete my.flag.key
637
637
  ```
638
638
 
639
- _See code: [src/commands/cleanup/verify.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/cleanup/verify.ts)_
639
+ _See code: [src/commands/cleanup/verify.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/cleanup/verify.ts)_
640
640
 
641
641
  ## `qfg config-schema`
642
642
 
@@ -665,7 +665,7 @@ EXAMPLES
665
665
  $ qfg config-schema --json-schema # full JSON Schema document (copy into your editor)
666
666
  ```
667
667
 
668
- _See code: [src/commands/config-schema.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/config-schema.ts)_
668
+ _See code: [src/commands/config-schema.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/config-schema.ts)_
669
669
 
670
670
  ## `qfg contexts`
671
671
 
@@ -688,7 +688,7 @@ EXAMPLES
688
688
  $ qfg contexts search organization formhealth
689
689
  ```
690
690
 
691
- _See code: [src/commands/contexts.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/contexts.ts)_
691
+ _See code: [src/commands/contexts.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/contexts.ts)_
692
692
 
693
693
  ## `qfg contexts search CONTEXTTYPE QUERY`
694
694
 
@@ -740,7 +740,7 @@ EXAMPLES
740
740
  $ qfg contexts search organization formhealth --json
741
741
  ```
742
742
 
743
- _See code: [src/commands/contexts/search.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/contexts/search.ts)_
743
+ _See code: [src/commands/contexts/search.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/contexts/search.ts)_
744
744
 
745
745
  ## `qfg create NAME`
746
746
 
@@ -748,22 +748,26 @@ Create a new feature flag, config value, or other item.
748
748
 
749
749
  ```
750
750
  USAGE
751
- $ qfg create NAME --type boolean-flag|boolean|string|double|int|string-list|json|duration|log_level
752
- [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--confidential] [--env-var <value>] [--value
753
- <value>] [--secret] [--secret-key-name <value>]
751
+ $ qfg create NAME [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--confidential]
752
+ [--env-var <value>] [--type boolean-flag|boolean|string|double|int|string-list|json|duration|log_level] [--value
753
+ <value>] [--value-from-env VAR] [--value-stdin] [--secret] [--secret-key-name <value>]
754
754
 
755
755
  ARGUMENTS
756
756
  NAME name for your new item (e.g. my.new.flag)
757
757
 
758
758
  FLAGS
759
759
  --confidential mark the value as confidential
760
- --env-var=<value> environment variable to get value from
761
- --secret encrypt the value of this item
760
+ --env-var=<value> store no value: the SDK reads it from this env var at RUNTIME. To read a value from a local
761
+ env var NOW, use --value-from-env
762
+ --secret encrypt the value of this item (string-only; the CLI never prints the plaintext)
762
763
  --secret-key-name=<value> [default: quonfig.secrets.encryption.key] name of the secret key to use for
763
764
  encryption/decryption
764
- --type=<option> (required)
765
+ --type=<option> kind of item to create (required, except with --secret, which implies string)
765
766
  <options: boolean-flag|boolean|string|double|int|string-list|json|duration|log_level>
766
- --value=<value> default value for your new item
767
+ --value=<value> default value for your new item (for secrets prefer --value-stdin / --value-from-env)
768
+ --value-from-env=VAR read the value to store from this LOCAL env var now (keeps it out of argv/shell history).
769
+ Not the same as --env-var
770
+ --value-stdin read the value to store from stdin (one trailing newline is stripped). Keeps it out of argv
767
771
 
768
772
  GLOBAL FLAGS
769
773
  -w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
@@ -786,6 +790,17 @@ DESCRIPTION
786
790
  duration An ISO 8601 duration string, e.g. PT30S, PT5M, PT1H30M (SDK returns milliseconds)
787
791
  log_level A dynamic log level (value must be one of TRACE/DEBUG/INFO/WARN/ERROR/FATAL)
788
792
 
793
+ Secrets (--secret) are encrypted client-side and are STRING-ONLY: --secret
794
+ implies --type string, so you can leave --type off. To store a JSON secret, store the JSON as a string secret and
795
+ JSON.parse it in your app. The CLI never prints a secret's plaintext: it shows
796
+ a redacted fingerprint like [encrypted *****3fa9c, 51 chars, ends …a1b2].
797
+
798
+ Keep the value out of argv / shell history / agent transcripts with:
799
+ --value-stdin read the value from stdin
800
+ --value-from-env=VAR read the value from a local env var, now
801
+ These are different from --env-var, which stores NO value: it tells the SDK to
802
+ read the value from that env var at runtime.
803
+
789
804
  This sets the global default value. Override per-environment with:
790
805
  qfg set-default my.flag --environment production --value true
791
806
 
@@ -812,7 +827,15 @@ EXAMPLES
812
827
 
813
828
  $ qfg create my.new.string --type string --value="hello world"
814
829
 
815
- $ qfg create my.new.string --type string --value="hello world" --secret
830
+ # Create a secret without the value ever appearing in argv (--secret implies --type string):
831
+
832
+ pbpaste | qfg create stripe.api-key --secret --value-stdin
833
+
834
+ $ qfg create stripe.api-key --secret --value-from-env STRIPE_API_KEY
835
+
836
+ # A JSON secret is a string secret holding JSON (JSON.parse it in your app):
837
+
838
+ $ qfg create gcp.service-account --secret --value-stdin < sa.json
816
839
 
817
840
  $ qfg create my.new.string --type string --env-var=MY_ENV_VAR_NAME
818
841
 
@@ -827,7 +850,7 @@ EXAMPLES
827
850
  $ qfg set-rollout my.new.flag --environment production --true-percent 20
828
851
  ```
829
852
 
830
- _See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/create.ts)_
853
+ _See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/create.ts)_
831
854
 
832
855
  ## `qfg delete NAME`
833
856
 
@@ -873,7 +896,7 @@ EXAMPLES
873
896
  $ qfg delete my.config --yes
874
897
  ```
875
898
 
876
- _See code: [src/commands/delete.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/delete.ts)_
899
+ _See code: [src/commands/delete.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/delete.ts)_
877
900
 
878
901
  ## `qfg flag info [NAME]`
879
902
 
@@ -1077,7 +1100,7 @@ EXAMPLES
1077
1100
  $ qfg generate --targets node-ts -o ./dist # combine with targets
1078
1101
  ```
1079
1102
 
1080
- _See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/generate.ts)_
1103
+ _See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/generate.ts)_
1081
1104
 
1082
1105
  ## `qfg generate-new-hex-key`
1083
1106
 
@@ -1100,7 +1123,7 @@ EXAMPLES
1100
1123
  $ qfg generate-new-hex-key
1101
1124
  ```
1102
1125
 
1103
- _See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/generate-new-hex-key.ts)_
1126
+ _See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/generate-new-hex-key.ts)_
1104
1127
 
1105
1128
  ## `qfg get [NAME]`
1106
1129
 
@@ -1109,12 +1132,14 @@ Get the value of a config/feature-flag/etc.
1109
1132
  ```
1110
1133
  USAGE
1111
1134
  $ qfg get [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--environment <value>]
1135
+ [--reveal]
1112
1136
 
1113
1137
  ARGUMENTS
1114
1138
  NAME config/feature-flag/etc. name
1115
1139
 
1116
1140
  FLAGS
1117
1141
  --environment=<value> environment to evaluate in
1142
+ --reveal print the plaintext of a secret/confidential value (it is redacted by default)
1118
1143
 
1119
1144
  GLOBAL FLAGS
1120
1145
  -w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
@@ -1126,13 +1151,24 @@ GLOBAL FLAGS
1126
1151
  DESCRIPTION
1127
1152
  Get the value of a config/feature-flag/etc.
1128
1153
 
1154
+ Secrets (encrypted) and confidential values print REDACTED by default, as a
1155
+ fingerprint plus length (and the last 4 characters for values of 12+ chars):
1156
+ [encrypted *****3fa9c, 51 chars, ends …a1b2]
1157
+ The fingerprint is the same one SDK telemetry and the Quonfig UI show, so you
1158
+ can confirm a rotation landed without printing the secret. Pass --reveal to
1159
+ print the plaintext. To inject secrets into a process, prefer `qfg run`.
1160
+
1129
1161
  EXAMPLES
1130
1162
  $ qfg get my.config.name
1131
1163
 
1132
1164
  $ qfg get my.config.name --environment=production
1165
+
1166
+ $ qfg get stripe.api-key --environment=production # redacted fingerprint
1167
+
1168
+ $ qfg get stripe.api-key --environment=production --reveal # plaintext
1133
1169
  ```
1134
1170
 
1135
- _See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/get.ts)_
1171
+ _See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/get.ts)_
1136
1172
 
1137
1173
  ## `qfg history NAME`
1138
1174
 
@@ -1158,7 +1194,7 @@ EXAMPLES
1158
1194
  $ qfg history my.flag
1159
1195
  ```
1160
1196
 
1161
- _See code: [src/commands/history.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/history.ts)_
1197
+ _See code: [src/commands/history.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/history.ts)_
1162
1198
 
1163
1199
  ## `qfg info [NAME]`
1164
1200
 
@@ -1206,7 +1242,7 @@ EXAMPLES
1206
1242
  $ qfg info my.config.name --exclude-evaluations # skip 24h stats
1207
1243
  ```
1208
1244
 
1209
- _See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/info.ts)_
1245
+ _See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/info.ts)_
1210
1246
 
1211
1247
  ## `qfg init [DIRECTORY]`
1212
1248
 
@@ -1246,7 +1282,7 @@ EXAMPLES
1246
1282
  $ qfg init --dry-run
1247
1283
  ```
1248
1284
 
1249
- _See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/init.ts)_
1285
+ _See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/init.ts)_
1250
1286
 
1251
1287
  ## `qfg interactive`
1252
1288
 
@@ -1276,7 +1312,7 @@ EXAMPLES
1276
1312
  $ qfg
1277
1313
  ```
1278
1314
 
1279
- _See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/interactive.ts)_
1315
+ _See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/interactive.ts)_
1280
1316
 
1281
1317
  ## `qfg list`
1282
1318
 
@@ -1316,7 +1352,7 @@ EXAMPLES
1316
1352
  $ qfg list --feature-flags
1317
1353
  ```
1318
1354
 
1319
- _See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/list.ts)_
1355
+ _See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/list.ts)_
1320
1356
 
1321
1357
  ## `qfg log`
1322
1358
 
@@ -1341,7 +1377,7 @@ EXAMPLES
1341
1377
  $ qfg log --limit 5
1342
1378
  ```
1343
1379
 
1344
- _See code: [src/commands/log.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/log.ts)_
1380
+ _See code: [src/commands/log.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/log.ts)_
1345
1381
 
1346
1382
  ## `qfg log-level NAME`
1347
1383
 
@@ -1406,7 +1442,7 @@ EXAMPLES
1406
1442
  $ qfg log-level log-level.my-app --target=Chatty --value=INFO --environment=production
1407
1443
  ```
1408
1444
 
1409
- _See code: [src/commands/log-level.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/log-level.ts)_
1445
+ _See code: [src/commands/log-level.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/log-level.ts)_
1410
1446
 
1411
1447
  ## `qfg login`
1412
1448
 
@@ -1431,7 +1467,7 @@ EXAMPLES
1431
1467
  $ qfg login --profile myprofile
1432
1468
  ```
1433
1469
 
1434
- _See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/login.ts)_
1470
+ _See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/login.ts)_
1435
1471
 
1436
1472
  ## `qfg logout`
1437
1473
 
@@ -1454,7 +1490,7 @@ EXAMPLES
1454
1490
  $ qfg logout
1455
1491
  ```
1456
1492
 
1457
- _See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/logout.ts)_
1493
+ _See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/logout.ts)_
1458
1494
 
1459
1495
  ## `qfg migrate`
1460
1496
 
@@ -1519,7 +1555,7 @@ EXAMPLES
1519
1555
  $ qfg migrate --from launch --source-api-key $LAUNCH_API_KEY --dir ./quonfig-repo --staging
1520
1556
  ```
1521
1557
 
1522
- _See code: [src/commands/migrate.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/migrate.ts)_
1558
+ _See code: [src/commands/migrate.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/migrate.ts)_
1523
1559
 
1524
1560
  ## `qfg migrate doctor`
1525
1561
 
@@ -1557,7 +1593,7 @@ EXAMPLES
1557
1593
  $ qfg migrate doctor --json
1558
1594
  ```
1559
1595
 
1560
- _See code: [src/commands/migrate/doctor.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/migrate/doctor.ts)_
1596
+ _See code: [src/commands/migrate/doctor.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/migrate/doctor.ts)_
1561
1597
 
1562
1598
  ## `qfg migrate my-code`
1563
1599
 
@@ -1589,7 +1625,7 @@ EXAMPLES
1589
1625
  $ qfg migrate my-code --dry-run
1590
1626
  ```
1591
1627
 
1592
- _See code: [src/commands/migrate/my-code.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/migrate/my-code.ts)_
1628
+ _See code: [src/commands/migrate/my-code.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/migrate/my-code.ts)_
1593
1629
 
1594
1630
  ## `qfg migrate status`
1595
1631
 
@@ -1620,7 +1656,7 @@ EXAMPLES
1620
1656
  $ qfg migrate status --json
1621
1657
  ```
1622
1658
 
1623
- _See code: [src/commands/migrate/status.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/migrate/status.ts)_
1659
+ _See code: [src/commands/migrate/status.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/migrate/status.ts)_
1624
1660
 
1625
1661
  ## `qfg override [NAME] [VALUE]`
1626
1662
 
@@ -1675,7 +1711,7 @@ EXAMPLES
1675
1711
  $ qfg override my.flag true --env=staging
1676
1712
  ```
1677
1713
 
1678
- _See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/override.ts)_
1714
+ _See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/override.ts)_
1679
1715
 
1680
1716
  ## `qfg pull`
1681
1717
 
@@ -1722,7 +1758,7 @@ EXAMPLES
1722
1758
  $ qfg pull # uses QUONFIG_DIR env var
1723
1759
  ```
1724
1760
 
1725
- _See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/pull.ts)_
1761
+ _See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/pull.ts)_
1726
1762
 
1727
1763
  ## `qfg push`
1728
1764
 
@@ -1771,7 +1807,7 @@ EXAMPLES
1771
1807
  $ qfg push --dir ./our-config --yes
1772
1808
  ```
1773
1809
 
1774
- _See code: [src/commands/push.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/push.ts)_
1810
+ _See code: [src/commands/push.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/push.ts)_
1775
1811
 
1776
1812
  ## `qfg run [COMMAND]`
1777
1813
 
@@ -1822,7 +1858,7 @@ EXAMPLES
1822
1858
  $ qfg run --env DATABASE_URL=db.url --preserve-env --environment=staging -- npm test
1823
1859
  ```
1824
1860
 
1825
- _See code: [src/commands/run.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/run.ts)_
1861
+ _See code: [src/commands/run.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/run.ts)_
1826
1862
 
1827
1863
  ## `qfg schema NAME`
1828
1864
 
@@ -1860,7 +1896,7 @@ EXAMPLES
1860
1896
  $ qfg schema my-schema --set-json-schema=@schemas/my-schema.json --protected
1861
1897
  ```
1862
1898
 
1863
- _See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/schema.ts)_
1899
+ _See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/schema.ts)_
1864
1900
 
1865
1901
  ## `qfg sdk-key`
1866
1902
 
@@ -1887,7 +1923,7 @@ EXAMPLES
1887
1923
  $ qfg sdk-key revoke <key-id>
1888
1924
  ```
1889
1925
 
1890
- _See code: [src/commands/sdk-key.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/sdk-key.ts)_
1926
+ _See code: [src/commands/sdk-key.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/sdk-key.ts)_
1891
1927
 
1892
1928
  ## `qfg sdk-key create`
1893
1929
 
@@ -1919,7 +1955,7 @@ EXAMPLES
1919
1955
  $ qfg sdk-key create --environment staging --type browser
1920
1956
  ```
1921
1957
 
1922
- _See code: [src/commands/sdk-key/create.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/sdk-key/create.ts)_
1958
+ _See code: [src/commands/sdk-key/create.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/sdk-key/create.ts)_
1923
1959
 
1924
1960
  ## `qfg sdk-key list`
1925
1961
 
@@ -1948,7 +1984,7 @@ EXAMPLES
1948
1984
  $ qfg sdk-key list --environment production
1949
1985
  ```
1950
1986
 
1951
- _See code: [src/commands/sdk-key/list.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/sdk-key/list.ts)_
1987
+ _See code: [src/commands/sdk-key/list.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/sdk-key/list.ts)_
1952
1988
 
1953
1989
  ## `qfg sdk-key revoke KEYID`
1954
1990
 
@@ -1975,7 +2011,7 @@ EXAMPLES
1975
2011
  $ qfg sdk-key revoke a1b2c3d4-e5f6-7890-abcd-ef1234567890
1976
2012
  ```
1977
2013
 
1978
- _See code: [src/commands/sdk-key/revoke.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/sdk-key/revoke.ts)_
2014
+ _See code: [src/commands/sdk-key/revoke.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/sdk-key/revoke.ts)_
1979
2015
 
1980
2016
  ## `qfg serve`
1981
2017
 
@@ -2033,7 +2069,7 @@ EXAMPLES
2033
2069
  $ qfg serve --port 6581 --frontend-sdk-key PUBLIC_KEY
2034
2070
  ```
2035
2071
 
2036
- _See code: [src/commands/serve.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/serve.ts)_
2072
+ _See code: [src/commands/serve.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/serve.ts)_
2037
2073
 
2038
2074
  ## `qfg set-default [NAME]`
2039
2075
 
@@ -2042,8 +2078,8 @@ Set the fallback value for a flag or config in one environment.
2042
2078
  ```
2043
2079
  USAGE
2044
2080
  $ qfg set-default [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--confidential]
2045
- [--env-var <value>] [--environment <value>] [--replace-targeting] [--value <value>] [--confirm] [--secret]
2046
- [--secret-key-name <value>]
2081
+ [--env-var <value>] [--environment <value>] [--replace-targeting] [--value <value>] [--value-from-env VAR]
2082
+ [--value-stdin] [--confirm] [--secret] [--secret-key-name <value>]
2047
2083
 
2048
2084
  ARGUMENTS
2049
2085
  NAME config/feature-flag/etc. name
@@ -2051,14 +2087,19 @@ ARGUMENTS
2051
2087
  FLAGS
2052
2088
  --confidential mark the value as confidential
2053
2089
  --confirm confirm without prompt
2054
- --env-var=<value> environment variable to use as default value
2055
- --environment=<value> environment to change
2090
+ --env-var=<value> store no value: the SDK reads it from this env var at RUNTIME. To read a value from a local
2091
+ env var NOW, use --value-from-env
2092
+ --environment=<value> environment to change, e.g. production. Use "[Default]" for the default rules that every
2093
+ environment without its own rules inherits
2056
2094
  --replace-targeting set the value for EVERYONE: delete this environment's targeting rules instead of keeping
2057
2095
  them (they stay in git history)
2058
- --secret encrypt the value of this item
2096
+ --secret encrypt the value of this item (string-only; the CLI never prints the plaintext)
2059
2097
  --secret-key-name=<value> [default: quonfig.secrets.encryption.key] name of the secret key to use for
2060
2098
  encryption/decryption
2061
- --value=<value> new default value
2099
+ --value=<value> new default value (for secrets prefer --value-stdin / --value-from-env)
2100
+ --value-from-env=VAR read the value to store from this LOCAL env var now (keeps it out of argv/shell history).
2101
+ Not the same as --env-var
2102
+ --value-stdin read the value to store from stdin (one trailing newline is stripped). Keeps it out of argv
2062
2103
 
2063
2104
  GLOBAL FLAGS
2064
2105
  -w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
@@ -2083,6 +2124,16 @@ DESCRIPTION
2083
2124
  To set a percentage rollout (gradual rollout / A/B test / canary deploy) instead:
2084
2125
  qfg set-rollout my.flag --environment production --true-percent 20
2085
2126
 
2127
+ Secrets (--secret, or any config whose value is already encrypted) are
2128
+ STRING-ONLY. To store a JSON secret, make it a string secret holding the JSON
2129
+ and JSON.parse it in your app. The CLI never prints a secret's plaintext; it
2130
+ shows a redacted fingerprint like [encrypted *****3fa9c, 51 chars, ends …a1b2].
2131
+ Rotate a secret without the value entering argv / shell history:
2132
+ pbpaste | qfg set-default stripe.api-key --environment production --secret --value-stdin --confirm
2133
+ qfg set-default stripe.api-key --environment production --secret --value-from-env STRIPE_API_KEY --confirm
2134
+ (--env-var is different: it stores NO value and tells the SDK to read one from
2135
+ that env var at runtime.)
2136
+
2086
2137
  To see all current values and rules for a flag:
2087
2138
  qfg info my.flag
2088
2139
 
@@ -2100,7 +2151,15 @@ EXAMPLES
2100
2151
 
2101
2152
  $ qfg set-default my.flag.name --value=false --environment=production --replace-targeting # kill-switch: off for everyone
2102
2153
 
2103
- $ qfg set-default my.flag.name --value=true --secret
2154
+ # Rotate a secret without the value entering argv:
2155
+
2156
+ pbpaste | qfg set-default my.secret --environment=production --secret --value-stdin --confirm
2157
+
2158
+ $ qfg set-default my.secret --environment=production --secret --value-from-env=MY_SECRET --confirm
2159
+
2160
+ # Write the [Default] rules (inherited by every environment without its own):
2161
+
2162
+ $ qfg set-default my.secret --environment="[Default]" --secret --value-from-env=MY_SECRET --confirm
2104
2163
 
2105
2164
  $ qfg set-default my.config.name --env-var=MY_ENV_VAR_NAME --environment=production
2106
2165
 
@@ -2113,7 +2172,7 @@ EXAMPLES
2113
2172
  $ qfg pull && qfg config-schema
2114
2173
  ```
2115
2174
 
2116
- _See code: [src/commands/set-default.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/set-default.ts)_
2175
+ _See code: [src/commands/set-default.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/set-default.ts)_
2117
2176
 
2118
2177
  ## `qfg set-rollout [NAME]`
2119
2178
 
@@ -2204,7 +2263,7 @@ EXAMPLES
2204
2263
  $ qfg set-rollout my.variant.flag --environment production --weights "a:33,b:33,c:34" --hash-by user.id
2205
2264
  ```
2206
2265
 
2207
- _See code: [src/commands/set-rollout.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/set-rollout.ts)_
2266
+ _See code: [src/commands/set-rollout.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/set-rollout.ts)_
2208
2267
 
2209
2268
  ## `qfg sync`
2210
2269
 
@@ -2236,7 +2295,7 @@ EXAMPLES
2236
2295
  $ qfg sync --watch --dir ./our-config --interval 30
2237
2296
  ```
2238
2297
 
2239
- _See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/sync.ts)_
2298
+ _See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/sync.ts)_
2240
2299
 
2241
2300
  ## `qfg toggle [NAME]`
2242
2301
 
@@ -2245,8 +2304,8 @@ Set the fallback value for a flag or config in one environment.
2245
2304
  ```
2246
2305
  USAGE
2247
2306
  $ qfg toggle [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--confidential]
2248
- [--env-var <value>] [--environment <value>] [--replace-targeting] [--value <value>] [--confirm] [--secret]
2249
- [--secret-key-name <value>]
2307
+ [--env-var <value>] [--environment <value>] [--replace-targeting] [--value <value>] [--value-from-env VAR]
2308
+ [--value-stdin] [--confirm] [--secret] [--secret-key-name <value>]
2250
2309
 
2251
2310
  ARGUMENTS
2252
2311
  NAME config/feature-flag/etc. name
@@ -2254,14 +2313,19 @@ ARGUMENTS
2254
2313
  FLAGS
2255
2314
  --confidential mark the value as confidential
2256
2315
  --confirm confirm without prompt
2257
- --env-var=<value> environment variable to use as default value
2258
- --environment=<value> environment to change
2316
+ --env-var=<value> store no value: the SDK reads it from this env var at RUNTIME. To read a value from a local
2317
+ env var NOW, use --value-from-env
2318
+ --environment=<value> environment to change, e.g. production. Use "[Default]" for the default rules that every
2319
+ environment without its own rules inherits
2259
2320
  --replace-targeting set the value for EVERYONE: delete this environment's targeting rules instead of keeping
2260
2321
  them (they stay in git history)
2261
- --secret encrypt the value of this item
2322
+ --secret encrypt the value of this item (string-only; the CLI never prints the plaintext)
2262
2323
  --secret-key-name=<value> [default: quonfig.secrets.encryption.key] name of the secret key to use for
2263
2324
  encryption/decryption
2264
- --value=<value> new default value
2325
+ --value=<value> new default value (for secrets prefer --value-stdin / --value-from-env)
2326
+ --value-from-env=VAR read the value to store from this LOCAL env var now (keeps it out of argv/shell history).
2327
+ Not the same as --env-var
2328
+ --value-stdin read the value to store from stdin (one trailing newline is stripped). Keeps it out of argv
2265
2329
 
2266
2330
  GLOBAL FLAGS
2267
2331
  -w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
@@ -2286,6 +2350,16 @@ DESCRIPTION
2286
2350
  To set a percentage rollout (gradual rollout / A/B test / canary deploy) instead:
2287
2351
  qfg set-rollout my.flag --environment production --true-percent 20
2288
2352
 
2353
+ Secrets (--secret, or any config whose value is already encrypted) are
2354
+ STRING-ONLY. To store a JSON secret, make it a string secret holding the JSON
2355
+ and JSON.parse it in your app. The CLI never prints a secret's plaintext; it
2356
+ shows a redacted fingerprint like [encrypted *****3fa9c, 51 chars, ends …a1b2].
2357
+ Rotate a secret without the value entering argv / shell history:
2358
+ pbpaste | qfg set-default stripe.api-key --environment production --secret --value-stdin --confirm
2359
+ qfg set-default stripe.api-key --environment production --secret --value-from-env STRIPE_API_KEY --confirm
2360
+ (--env-var is different: it stores NO value and tells the SDK to read one from
2361
+ that env var at runtime.)
2362
+
2289
2363
  To see all current values and rules for a flag:
2290
2364
  qfg info my.flag
2291
2365
 
@@ -2303,7 +2377,15 @@ EXAMPLES
2303
2377
 
2304
2378
  $ qfg toggle my.flag.name --value=false --environment=production --replace-targeting # kill-switch: off for everyone
2305
2379
 
2306
- $ qfg toggle my.flag.name --value=true --secret
2380
+ # Rotate a secret without the value entering argv:
2381
+
2382
+ pbpaste | qfg toggle my.secret --environment=production --secret --value-stdin --confirm
2383
+
2384
+ $ qfg toggle my.secret --environment=production --secret --value-from-env=MY_SECRET --confirm
2385
+
2386
+ # Write the [Default] rules (inherited by every environment without its own):
2387
+
2388
+ $ qfg toggle my.secret --environment="[Default]" --secret --value-from-env=MY_SECRET --confirm
2307
2389
 
2308
2390
  $ qfg toggle my.config.name --env-var=MY_ENV_VAR_NAME --environment=production
2309
2391
 
@@ -2347,7 +2429,7 @@ EXAMPLES
2347
2429
  $ qfg verify --json
2348
2430
  ```
2349
2431
 
2350
- _See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/verify.ts)_
2432
+ _See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/verify.ts)_
2351
2433
 
2352
2434
  ## `qfg whoami`
2353
2435
 
@@ -2370,7 +2452,7 @@ EXAMPLES
2370
2452
  $ qfg whoami
2371
2453
  ```
2372
2454
 
2373
- _See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/whoami.ts)_
2455
+ _See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/whoami.ts)_
2374
2456
 
2375
2457
  ## `qfg workspace`
2376
2458
 
@@ -2393,7 +2475,7 @@ EXAMPLES
2393
2475
  $ qfg workspace
2394
2476
  ```
2395
2477
 
2396
- _See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/workspace.ts)_
2478
+ _See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/workspace.ts)_
2397
2479
 
2398
2480
  ## `qfg workspace bootstrap`
2399
2481
 
@@ -2426,7 +2508,7 @@ EXAMPLES
2426
2508
  $ qfg workspace bootstrap --dir ./our-config --skip-validate
2427
2509
  ```
2428
2510
 
2429
- _See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/workspace/bootstrap.ts)_
2511
+ _See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/workspace/bootstrap.ts)_
2430
2512
 
2431
2513
  ## `qfg workspace create SLUG`
2432
2514
 
@@ -2460,7 +2542,7 @@ EXAMPLES
2460
2542
  $ qfg workspace create my-team --org 11111111-1111-1111-1111-111111111111
2461
2543
  ```
2462
2544
 
2463
- _See code: [src/commands/workspace/create.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/workspace/create.ts)_
2545
+ _See code: [src/commands/workspace/create.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/workspace/create.ts)_
2464
2546
 
2465
2547
  ## `qfg workspace switch [SLUG]`
2466
2548
 
@@ -2488,7 +2570,7 @@ EXAMPLES
2488
2570
  $ qfg workspace switch acme/production
2489
2571
  ```
2490
2572
 
2491
- _See code: [src/commands/workspace/switch.ts](https://github.com/quonfig/cli/blob/v0.4.0/src/commands/workspace/switch.ts)_
2573
+ _See code: [src/commands/workspace/switch.ts](https://github.com/quonfig/cli/blob/v0.5.0/src/commands/workspace/switch.ts)_
2492
2574
  <!-- commandsstop -->
2493
2575
 
2494
2576
  ## Local Development