@quonfig/cli 0.0.4 → 0.0.6
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 +300 -120
- package/dist/commands/config-schema.d.ts +10 -0
- package/dist/commands/config-schema.js +165 -0
- package/dist/commands/create.js +22 -1
- package/dist/commands/info.js +17 -2
- package/dist/commands/login.js +19 -15
- package/dist/commands/profile.d.ts +1 -0
- package/dist/commands/profile.js +6 -42
- package/dist/commands/pull.js +16 -1
- package/dist/commands/set-default.js +78 -15
- package/dist/commands/set-rollout.d.ts +19 -0
- package/dist/commands/set-rollout.js +260 -0
- package/dist/commands/whoami.js +8 -8
- package/dist/commands/workspace/switch.d.ts +7 -0
- package/dist/commands/workspace/switch.js +90 -0
- package/dist/commands/workspace.js +14 -23
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -2
- package/dist/util/get-client.js +34 -11
- package/dist/util/token-storage.d.ts +6 -0
- package/dist/util/token-storage.js +17 -0
- package/oclif.manifest.json +362 -22
- package/package.json +1 -1
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.
|
|
17
|
+
@quonfig/cli/0.0.6 linux-x64 node-v24.4.1
|
|
18
18
|
$ qfg --help [COMMAND]
|
|
19
19
|
USAGE
|
|
20
20
|
$ qfg COMMAND
|
|
@@ -25,6 +25,7 @@ USAGE
|
|
|
25
25
|
# Commands
|
|
26
26
|
|
|
27
27
|
<!-- commands -->
|
|
28
|
+
* [`qfg config-schema`](#qfg-config-schema)
|
|
28
29
|
* [`qfg create NAME`](#qfg-create-name)
|
|
29
30
|
* [`qfg download`](#qfg-download)
|
|
30
31
|
* [`qfg generate`](#qfg-generate)
|
|
@@ -38,25 +39,55 @@ USAGE
|
|
|
38
39
|
* [`qfg logout`](#qfg-logout)
|
|
39
40
|
* [`qfg mcp`](#qfg-mcp)
|
|
40
41
|
* [`qfg override [NAME]`](#qfg-override-name)
|
|
41
|
-
* [`qfg profile`](#qfg-profile)
|
|
42
42
|
* [`qfg pull`](#qfg-pull)
|
|
43
43
|
* [`qfg schema NAME`](#qfg-schema-name)
|
|
44
44
|
* [`qfg serve DATA-FILE`](#qfg-serve-data-file)
|
|
45
45
|
* [`qfg set-default [NAME]`](#qfg-set-default-name)
|
|
46
|
+
* [`qfg set-rollout [NAME]`](#qfg-set-rollout-name)
|
|
46
47
|
* [`qfg sync`](#qfg-sync)
|
|
47
48
|
* [`qfg verify [PATH]`](#qfg-verify-path)
|
|
48
49
|
* [`qfg whoami`](#qfg-whoami)
|
|
49
50
|
* [`qfg workspace`](#qfg-workspace)
|
|
50
51
|
* [`qfg workspace bootstrap`](#qfg-workspace-bootstrap)
|
|
52
|
+
* [`qfg workspace switch`](#qfg-workspace-switch)
|
|
53
|
+
|
|
54
|
+
## `qfg config-schema`
|
|
55
|
+
|
|
56
|
+
Print the config file format reference: rules engine, operators, targeting criteria, segments, and weighted rollouts. Use --json-schema for the machine-readable JSON Schema document.
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
USAGE
|
|
60
|
+
$ qfg config-schema [--json] [--interactive] [--no-color] [--verbose] [--json-schema]
|
|
61
|
+
|
|
62
|
+
FLAGS
|
|
63
|
+
--json-schema Output the full JSON Schema document for config files instead of the human-readable reference
|
|
64
|
+
|
|
65
|
+
GLOBAL FLAGS
|
|
66
|
+
--[no-]interactive Force interactive mode
|
|
67
|
+
--json Format output as json.
|
|
68
|
+
--no-color Do not colorize output
|
|
69
|
+
--verbose Verbose output
|
|
70
|
+
|
|
71
|
+
DESCRIPTION
|
|
72
|
+
Print the config file format reference: rules engine, operators, targeting criteria, segments, and weighted rollouts.
|
|
73
|
+
Use --json-schema for the machine-readable JSON Schema document.
|
|
74
|
+
|
|
75
|
+
EXAMPLES
|
|
76
|
+
$ qfg config-schema # human-readable operator reference + examples
|
|
77
|
+
|
|
78
|
+
$ qfg config-schema --json-schema # full JSON Schema document (copy into your editor)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
_See code: [src/commands/config-schema.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/config-schema.ts)_
|
|
51
82
|
|
|
52
83
|
## `qfg create NAME`
|
|
53
84
|
|
|
54
|
-
Create a new
|
|
85
|
+
Create a new feature flag, config value, or other item.
|
|
55
86
|
|
|
56
87
|
```
|
|
57
88
|
USAGE
|
|
58
89
|
$ qfg create NAME --type boolean-flag|boolean|string|double|int|string-list|json [--json] [--interactive]
|
|
59
|
-
[--no-color] [--verbose] [-
|
|
90
|
+
[--no-color] [--verbose] [-w <value>] [--confidential] [--env-var <value>] [--value <value>] [--secret]
|
|
60
91
|
[--secret-key-name <value>]
|
|
61
92
|
|
|
62
93
|
ARGUMENTS
|
|
@@ -73,14 +104,33 @@ FLAGS
|
|
|
73
104
|
--value=<value> default value for your new item
|
|
74
105
|
|
|
75
106
|
GLOBAL FLAGS
|
|
76
|
-
-
|
|
77
|
-
--[no-]interactive
|
|
78
|
-
--json
|
|
79
|
-
--no-color
|
|
80
|
-
--verbose
|
|
107
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
108
|
+
--[no-]interactive Force interactive mode
|
|
109
|
+
--json Format output as json.
|
|
110
|
+
--no-color Do not colorize output
|
|
111
|
+
--verbose Verbose output
|
|
81
112
|
|
|
82
113
|
DESCRIPTION
|
|
83
|
-
Create a new
|
|
114
|
+
Create a new feature flag, config value, or other item.
|
|
115
|
+
|
|
116
|
+
Use --type to specify the kind of item:
|
|
117
|
+
boolean-flag On/off feature flag (sendToClientSdk defaults to true; best for gradual rollouts)
|
|
118
|
+
string A string configuration value
|
|
119
|
+
int An integer configuration value
|
|
120
|
+
double A floating-point configuration value
|
|
121
|
+
string-list A comma-separated list of strings
|
|
122
|
+
json An arbitrary JSON blob
|
|
123
|
+
boolean A plain boolean (not a feature flag)
|
|
124
|
+
|
|
125
|
+
This sets the global default value. Override per-environment with:
|
|
126
|
+
qfg set-default my.flag --environment production --value true
|
|
127
|
+
|
|
128
|
+
For a percentage rollout (gradual rollout / A/B test / canary deploy), use:
|
|
129
|
+
qfg set-rollout my.flag --environment production --true-percent 20
|
|
130
|
+
|
|
131
|
+
Or edit the JSON config file directly for complex targeting rules:
|
|
132
|
+
qfg config-schema # full operator reference + examples
|
|
133
|
+
qfg pull --dir ./config # clone workspace, then edit JSON and git push
|
|
84
134
|
|
|
85
135
|
EXAMPLES
|
|
86
136
|
$ qfg create my.new.flag --type boolean-flag
|
|
@@ -94,9 +144,13 @@ EXAMPLES
|
|
|
94
144
|
$ qfg create my.new.string --type string --env-var=MY_ENV_VAR_NAME
|
|
95
145
|
|
|
96
146
|
$ qfg create my.new.string --type json --value="{\"key\": \"value\"}"
|
|
147
|
+
|
|
148
|
+
# After creating a flag, set a 20% rollout in production:
|
|
149
|
+
|
|
150
|
+
$ qfg set-rollout my.new.flag --environment production --true-percent 20
|
|
97
151
|
```
|
|
98
152
|
|
|
99
|
-
_See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
153
|
+
_See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/create.ts)_
|
|
100
154
|
|
|
101
155
|
## `qfg download`
|
|
102
156
|
|
|
@@ -104,7 +158,7 @@ Download a Datafile for a given environment
|
|
|
104
158
|
|
|
105
159
|
```
|
|
106
160
|
USAGE
|
|
107
|
-
$ qfg download [--json] [--interactive] [--no-color] [--verbose] [-
|
|
161
|
+
$ qfg download [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--environment <value>]
|
|
108
162
|
[--sdk-key <value>]
|
|
109
163
|
|
|
110
164
|
FLAGS
|
|
@@ -112,11 +166,11 @@ FLAGS
|
|
|
112
166
|
--sdk-key=<value> SDK key for authentication (uses legacy download endpoint)
|
|
113
167
|
|
|
114
168
|
GLOBAL FLAGS
|
|
115
|
-
-
|
|
116
|
-
--[no-]interactive
|
|
117
|
-
--json
|
|
118
|
-
--no-color
|
|
119
|
-
--verbose
|
|
169
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
170
|
+
--[no-]interactive Force interactive mode
|
|
171
|
+
--json Format output as json.
|
|
172
|
+
--no-color Do not colorize output
|
|
173
|
+
--verbose Verbose output
|
|
120
174
|
|
|
121
175
|
DESCRIPTION
|
|
122
176
|
Download a Datafile for a given environment
|
|
@@ -129,7 +183,7 @@ EXAMPLES
|
|
|
129
183
|
$ qfg download --environment=test --sdk-key=YOUR_SDK_KEY
|
|
130
184
|
```
|
|
131
185
|
|
|
132
|
-
_See code: [src/commands/download.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
186
|
+
_See code: [src/commands/download.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/download.ts)_
|
|
133
187
|
|
|
134
188
|
## `qfg generate`
|
|
135
189
|
|
|
@@ -137,7 +191,7 @@ Generate type definitions for your Quonfig configuration
|
|
|
137
191
|
|
|
138
192
|
```
|
|
139
193
|
USAGE
|
|
140
|
-
$ qfg generate [--json] [--interactive] [--no-color] [--verbose] [-
|
|
194
|
+
$ qfg generate [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [-o <value>] [--targets
|
|
141
195
|
<value>]
|
|
142
196
|
|
|
143
197
|
FLAGS
|
|
@@ -146,11 +200,11 @@ FLAGS
|
|
|
146
200
|
react-ts)
|
|
147
201
|
|
|
148
202
|
GLOBAL FLAGS
|
|
149
|
-
-
|
|
150
|
-
--[no-]interactive
|
|
151
|
-
--json
|
|
152
|
-
--no-color
|
|
153
|
-
--verbose
|
|
203
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
204
|
+
--[no-]interactive Force interactive mode
|
|
205
|
+
--json Format output as json.
|
|
206
|
+
--no-color Do not colorize output
|
|
207
|
+
--verbose Verbose output
|
|
154
208
|
|
|
155
209
|
DESCRIPTION
|
|
156
210
|
Generate type definitions for your Quonfig configuration
|
|
@@ -199,7 +253,7 @@ EXAMPLES
|
|
|
199
253
|
$ qfg generate --targets node-ts -o ./dist # combine with targets
|
|
200
254
|
```
|
|
201
255
|
|
|
202
|
-
_See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
256
|
+
_See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/generate.ts)_
|
|
203
257
|
|
|
204
258
|
## `qfg generate-new-hex-key`
|
|
205
259
|
|
|
@@ -222,7 +276,7 @@ EXAMPLES
|
|
|
222
276
|
$ qfg generate-new-hex-key
|
|
223
277
|
```
|
|
224
278
|
|
|
225
|
-
_See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
279
|
+
_See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/generate-new-hex-key.ts)_
|
|
226
280
|
|
|
227
281
|
## `qfg get [NAME]`
|
|
228
282
|
|
|
@@ -230,7 +284,7 @@ Get the value of a config/feature-flag/etc.
|
|
|
230
284
|
|
|
231
285
|
```
|
|
232
286
|
USAGE
|
|
233
|
-
$ qfg get [NAME] [--json] [--interactive] [--no-color] [--verbose] [-
|
|
287
|
+
$ qfg get [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--environment <value>]
|
|
234
288
|
|
|
235
289
|
ARGUMENTS
|
|
236
290
|
NAME config/feature-flag/etc. name
|
|
@@ -239,11 +293,11 @@ FLAGS
|
|
|
239
293
|
--environment=<value> environment to evaluate in
|
|
240
294
|
|
|
241
295
|
GLOBAL FLAGS
|
|
242
|
-
-
|
|
243
|
-
--[no-]interactive
|
|
244
|
-
--json
|
|
245
|
-
--no-color
|
|
246
|
-
--verbose
|
|
296
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
297
|
+
--[no-]interactive Force interactive mode
|
|
298
|
+
--json Format output as json.
|
|
299
|
+
--no-color Do not colorize output
|
|
300
|
+
--verbose Verbose output
|
|
247
301
|
|
|
248
302
|
DESCRIPTION
|
|
249
303
|
Get the value of a config/feature-flag/etc.
|
|
@@ -254,15 +308,15 @@ EXAMPLES
|
|
|
254
308
|
$ qfg get my.config.name --environment=production
|
|
255
309
|
```
|
|
256
310
|
|
|
257
|
-
_See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
311
|
+
_See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/get.ts)_
|
|
258
312
|
|
|
259
313
|
## `qfg info [NAME]`
|
|
260
314
|
|
|
261
|
-
Show
|
|
315
|
+
Show current values, rules, and evaluation stats for a flag or config.
|
|
262
316
|
|
|
263
317
|
```
|
|
264
318
|
USAGE
|
|
265
|
-
$ qfg info [NAME] [--json] [--interactive] [--no-color] [--verbose] [-
|
|
319
|
+
$ qfg info [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--exclude-evaluations]
|
|
266
320
|
|
|
267
321
|
ARGUMENTS
|
|
268
322
|
NAME config/feature-flag/etc. name
|
|
@@ -271,20 +325,34 @@ FLAGS
|
|
|
271
325
|
--exclude-evaluations Exclude evaluation data
|
|
272
326
|
|
|
273
327
|
GLOBAL FLAGS
|
|
274
|
-
-
|
|
275
|
-
--[no-]interactive
|
|
276
|
-
--json
|
|
277
|
-
--no-color
|
|
278
|
-
--verbose
|
|
328
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
329
|
+
--[no-]interactive Force interactive mode
|
|
330
|
+
--json Format output as json.
|
|
331
|
+
--no-color Do not colorize output
|
|
332
|
+
--verbose Verbose output
|
|
279
333
|
|
|
280
334
|
DESCRIPTION
|
|
281
|
-
Show
|
|
335
|
+
Show current values, rules, and evaluation stats for a flag or config.
|
|
336
|
+
|
|
337
|
+
Output shows the value for each environment:
|
|
338
|
+
- A simple value (true / false / "hello") means a single unconditional rule.
|
|
339
|
+
- "[see rules]" means the environment has targeting rules or a percentage rollout.
|
|
340
|
+
- "[inherit]" means the environment falls back to the Default value.
|
|
341
|
+
|
|
342
|
+
Percentage rollouts are displayed as "20.0% true, 80.0% false".
|
|
343
|
+
Evaluation counts for the past 24 hours are included by default.
|
|
344
|
+
|
|
345
|
+
Related commands:
|
|
346
|
+
qfg set-default my.flag --environment production --value true # set a scalar fallback
|
|
347
|
+
qfg set-rollout my.flag --environment production --true-percent 20 # set a % rollout
|
|
282
348
|
|
|
283
349
|
EXAMPLES
|
|
284
350
|
$ qfg info my.config.name
|
|
351
|
+
|
|
352
|
+
$ qfg info my.config.name --exclude-evaluations # skip 24h stats
|
|
285
353
|
```
|
|
286
354
|
|
|
287
|
-
_See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
355
|
+
_See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/info.ts)_
|
|
288
356
|
|
|
289
357
|
## `qfg init [DIRECTORY]`
|
|
290
358
|
|
|
@@ -322,7 +390,7 @@ EXAMPLES
|
|
|
322
390
|
$ qfg init --dry-run
|
|
323
391
|
```
|
|
324
392
|
|
|
325
|
-
_See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
393
|
+
_See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/init.ts)_
|
|
326
394
|
|
|
327
395
|
## `qfg interactive`
|
|
328
396
|
|
|
@@ -340,7 +408,7 @@ EXAMPLES
|
|
|
340
408
|
$ qfg
|
|
341
409
|
```
|
|
342
410
|
|
|
343
|
-
_See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
411
|
+
_See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/interactive.ts)_
|
|
344
412
|
|
|
345
413
|
## `qfg list`
|
|
346
414
|
|
|
@@ -348,7 +416,7 @@ Show keys for your config/feature flags/etc.
|
|
|
348
416
|
|
|
349
417
|
```
|
|
350
418
|
USAGE
|
|
351
|
-
$ qfg list [--json] [--interactive] [--no-color] [--verbose] [-
|
|
419
|
+
$ qfg list [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--configs] [--feature-flags]
|
|
352
420
|
[--log-levels] [--schemas] [--segments]
|
|
353
421
|
|
|
354
422
|
FLAGS
|
|
@@ -359,11 +427,11 @@ FLAGS
|
|
|
359
427
|
--segments include segments
|
|
360
428
|
|
|
361
429
|
GLOBAL FLAGS
|
|
362
|
-
-
|
|
363
|
-
--[no-]interactive
|
|
364
|
-
--json
|
|
365
|
-
--no-color
|
|
366
|
-
--verbose
|
|
430
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
431
|
+
--[no-]interactive Force interactive mode
|
|
432
|
+
--json Format output as json.
|
|
433
|
+
--no-color Do not colorize output
|
|
434
|
+
--verbose Verbose output
|
|
367
435
|
|
|
368
436
|
DESCRIPTION
|
|
369
437
|
Show keys for your config/feature flags/etc.
|
|
@@ -377,7 +445,7 @@ EXAMPLES
|
|
|
377
445
|
$ qfg list --feature-flags
|
|
378
446
|
```
|
|
379
447
|
|
|
380
|
-
_See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
448
|
+
_See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/list.ts)_
|
|
381
449
|
|
|
382
450
|
## `qfg login`
|
|
383
451
|
|
|
@@ -385,10 +453,7 @@ Log in to Quonfig via WorkOS device authorization
|
|
|
385
453
|
|
|
386
454
|
```
|
|
387
455
|
USAGE
|
|
388
|
-
$ qfg login [--json] [--interactive] [--no-color] [--verbose]
|
|
389
|
-
|
|
390
|
-
FLAGS
|
|
391
|
-
-p, --profile=<value> Profile name to create or update (defaults to "default")
|
|
456
|
+
$ qfg login [--json] [--interactive] [--no-color] [--verbose]
|
|
392
457
|
|
|
393
458
|
GLOBAL FLAGS
|
|
394
459
|
--[no-]interactive Force interactive mode
|
|
@@ -405,7 +470,7 @@ EXAMPLES
|
|
|
405
470
|
$ qfg login --profile myprofile
|
|
406
471
|
```
|
|
407
472
|
|
|
408
|
-
_See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
473
|
+
_See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/login.ts)_
|
|
409
474
|
|
|
410
475
|
## `qfg logout`
|
|
411
476
|
|
|
@@ -428,7 +493,7 @@ EXAMPLES
|
|
|
428
493
|
$ qfg logout
|
|
429
494
|
```
|
|
430
495
|
|
|
431
|
-
_See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
496
|
+
_See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/logout.ts)_
|
|
432
497
|
|
|
433
498
|
## `qfg mcp`
|
|
434
499
|
|
|
@@ -461,7 +526,7 @@ EXAMPLES
|
|
|
461
526
|
$ qfg mcp --url http://local-app.quonfig-staging.com:3003/api/v1/mcp
|
|
462
527
|
```
|
|
463
528
|
|
|
464
|
-
_See code: [src/commands/mcp.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
529
|
+
_See code: [src/commands/mcp.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/mcp.ts)_
|
|
465
530
|
|
|
466
531
|
## `qfg override [NAME]`
|
|
467
532
|
|
|
@@ -469,7 +534,7 @@ Override the value of an item for your user/SDK key combo
|
|
|
469
534
|
|
|
470
535
|
```
|
|
471
536
|
USAGE
|
|
472
|
-
$ qfg override [NAME] [--json] [--interactive] [--no-color] [--verbose] [-
|
|
537
|
+
$ qfg override [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--environment <value>]
|
|
473
538
|
[--remove] [--value <value>]
|
|
474
539
|
|
|
475
540
|
ARGUMENTS
|
|
@@ -481,11 +546,11 @@ FLAGS
|
|
|
481
546
|
--value=<value> value to use for your override
|
|
482
547
|
|
|
483
548
|
GLOBAL FLAGS
|
|
484
|
-
-
|
|
485
|
-
--[no-]interactive
|
|
486
|
-
--json
|
|
487
|
-
--no-color
|
|
488
|
-
--verbose
|
|
549
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
550
|
+
--[no-]interactive Force interactive mode
|
|
551
|
+
--json Format output as json.
|
|
552
|
+
--no-color Do not colorize output
|
|
553
|
+
--verbose Verbose output
|
|
489
554
|
|
|
490
555
|
DESCRIPTION
|
|
491
556
|
Override the value of an item for your user/SDK key combo
|
|
@@ -500,34 +565,11 @@ EXAMPLES
|
|
|
500
565
|
$ qfg override my.double.config --value=3.14159
|
|
501
566
|
```
|
|
502
567
|
|
|
503
|
-
_See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
504
|
-
|
|
505
|
-
## `qfg profile`
|
|
506
|
-
|
|
507
|
-
Manage profiles and set default profile
|
|
508
|
-
|
|
509
|
-
```
|
|
510
|
-
USAGE
|
|
511
|
-
$ qfg profile [--json] [--interactive] [--no-color] [--verbose]
|
|
512
|
-
|
|
513
|
-
GLOBAL FLAGS
|
|
514
|
-
--[no-]interactive Force interactive mode
|
|
515
|
-
--json Format output as json.
|
|
516
|
-
--no-color Do not colorize output
|
|
517
|
-
--verbose Verbose output
|
|
518
|
-
|
|
519
|
-
DESCRIPTION
|
|
520
|
-
Manage profiles and set default profile
|
|
521
|
-
|
|
522
|
-
EXAMPLES
|
|
523
|
-
$ qfg profile
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
_See code: [src/commands/profile.ts](https://github.com/quonfig/cli/blob/v0.0.4/src/commands/profile.ts)_
|
|
568
|
+
_See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/override.ts)_
|
|
527
569
|
|
|
528
570
|
## `qfg pull`
|
|
529
571
|
|
|
530
|
-
Clone or update a local
|
|
572
|
+
Clone or update a local copy of your workspace config files.
|
|
531
573
|
|
|
532
574
|
```
|
|
533
575
|
USAGE
|
|
@@ -544,7 +586,22 @@ GLOBAL FLAGS
|
|
|
544
586
|
--verbose Verbose output
|
|
545
587
|
|
|
546
588
|
DESCRIPTION
|
|
547
|
-
Clone or update a local
|
|
589
|
+
Clone or update a local copy of your workspace config files.
|
|
590
|
+
|
|
591
|
+
Use this when you need to edit flag JSON directly — for complex targeting rules,
|
|
592
|
+
multi-rule configs, or anything beyond a single scalar value.
|
|
593
|
+
|
|
594
|
+
For the config file format, operator reference, and examples:
|
|
595
|
+
qfg config-schema # human-readable reference
|
|
596
|
+
qfg config-schema --json-schema # machine-readable JSON Schema
|
|
597
|
+
|
|
598
|
+
After editing files:
|
|
599
|
+
qfg verify <dir> # validate JSON before pushing
|
|
600
|
+
git -C <dir> add -A && git -C <dir> commit -m "feat: ..." && git -C <dir> push
|
|
601
|
+
|
|
602
|
+
CLI shortcuts (no JSON editing needed for simple cases):
|
|
603
|
+
qfg set-rollout my.flag --environment production --true-percent 20
|
|
604
|
+
qfg set-default my.flag --environment production --value true
|
|
548
605
|
|
|
549
606
|
EXAMPLES
|
|
550
607
|
$ qfg pull --dir ./our-config
|
|
@@ -552,7 +609,7 @@ EXAMPLES
|
|
|
552
609
|
$ qfg pull # uses QUONFIG_DIR env var
|
|
553
610
|
```
|
|
554
611
|
|
|
555
|
-
_See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
612
|
+
_See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/pull.ts)_
|
|
556
613
|
|
|
557
614
|
## `qfg schema NAME`
|
|
558
615
|
|
|
@@ -560,7 +617,7 @@ Get or update first-class schema documents
|
|
|
560
617
|
|
|
561
618
|
```
|
|
562
619
|
USAGE
|
|
563
|
-
$ qfg schema NAME [--json] [--interactive] [--no-color] [--verbose] [-
|
|
620
|
+
$ qfg schema NAME [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--get] [--protected]
|
|
564
621
|
[--set-json-schema <value>] [--set-zod <value>]
|
|
565
622
|
|
|
566
623
|
ARGUMENTS
|
|
@@ -573,11 +630,11 @@ FLAGS
|
|
|
573
630
|
--set-zod=<value> compatibility alias for --set-json-schema; now expects plain JSON Schema
|
|
574
631
|
|
|
575
632
|
GLOBAL FLAGS
|
|
576
|
-
-
|
|
577
|
-
--[no-]interactive
|
|
578
|
-
--json
|
|
579
|
-
--no-color
|
|
580
|
-
--verbose
|
|
633
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
634
|
+
--[no-]interactive Force interactive mode
|
|
635
|
+
--json Format output as json.
|
|
636
|
+
--no-color Do not colorize output
|
|
637
|
+
--verbose Verbose output
|
|
581
638
|
|
|
582
639
|
DESCRIPTION
|
|
583
640
|
Get or update first-class schema documents
|
|
@@ -590,7 +647,7 @@ EXAMPLES
|
|
|
590
647
|
$ qfg schema my-schema --set-json-schema=@schemas/my-schema.json --protected
|
|
591
648
|
```
|
|
592
649
|
|
|
593
|
-
_See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
650
|
+
_See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/schema.ts)_
|
|
594
651
|
|
|
595
652
|
## `qfg serve DATA-FILE`
|
|
596
653
|
|
|
@@ -626,15 +683,15 @@ EXAMPLES
|
|
|
626
683
|
$ qfg serve ./quonfig.test.588.config.json --port=3099
|
|
627
684
|
```
|
|
628
685
|
|
|
629
|
-
_See code: [src/commands/serve.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
686
|
+
_See code: [src/commands/serve.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/serve.ts)_
|
|
630
687
|
|
|
631
688
|
## `qfg set-default [NAME]`
|
|
632
689
|
|
|
633
|
-
Set
|
|
690
|
+
Set the unconditional fallback value for a flag or config in a specific environment.
|
|
634
691
|
|
|
635
692
|
```
|
|
636
693
|
USAGE
|
|
637
|
-
$ qfg set-default [NAME] [--json] [--interactive] [--no-color] [--verbose] [-
|
|
694
|
+
$ qfg set-default [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--confidential]
|
|
638
695
|
[--env-var <value>] [--environment <value>] [--value <value>] [--confirm] [--secret] [--secret-key-name <value>]
|
|
639
696
|
|
|
640
697
|
ARGUMENTS
|
|
@@ -651,26 +708,123 @@ FLAGS
|
|
|
651
708
|
--value=<value> new default value
|
|
652
709
|
|
|
653
710
|
GLOBAL FLAGS
|
|
654
|
-
-
|
|
655
|
-
--[no-]interactive
|
|
656
|
-
--json
|
|
657
|
-
--no-color
|
|
658
|
-
--verbose
|
|
711
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
712
|
+
--[no-]interactive Force interactive mode
|
|
713
|
+
--json Format output as json.
|
|
714
|
+
--no-color Do not colorize output
|
|
715
|
+
--verbose Verbose output
|
|
659
716
|
|
|
660
717
|
DESCRIPTION
|
|
661
|
-
Set
|
|
718
|
+
Set the unconditional fallback value for a flag or config in a specific environment.
|
|
719
|
+
|
|
720
|
+
This updates the catch-all rule — the value users receive when NO targeting rule matches.
|
|
721
|
+
Any targeting rules or percentage rollouts you have configured are NOT affected; they
|
|
722
|
+
continue to fire before this fallback is evaluated.
|
|
723
|
+
|
|
724
|
+
"Other rules still apply" means: if you have rules targeting specific users, segments,
|
|
725
|
+
or properties, those rules still take priority. This command only changes what everyone
|
|
726
|
+
else sees.
|
|
727
|
+
|
|
728
|
+
To set a percentage rollout (gradual rollout / A/B test / canary deploy) instead:
|
|
729
|
+
qfg set-rollout my.flag --environment production --true-percent 20
|
|
730
|
+
|
|
731
|
+
To see all current values and rules for a flag:
|
|
732
|
+
qfg info my.flag
|
|
662
733
|
|
|
663
734
|
EXAMPLES
|
|
664
|
-
$ qfg set-default my.flag.name
|
|
735
|
+
$ qfg set-default my.flag.name # prompts for value and env
|
|
665
736
|
|
|
666
737
|
$ qfg set-default my.flag.name --value=true --environment=staging
|
|
667
738
|
|
|
739
|
+
$ qfg set-default my.flag.name --value=false --environment=production # kill-switch: turn off for everyone
|
|
740
|
+
|
|
668
741
|
$ qfg set-default my.flag.name --value=true --secret
|
|
669
742
|
|
|
670
743
|
$ qfg set-default my.config.name --env-var=MY_ENV_VAR_NAME --environment=production
|
|
744
|
+
|
|
745
|
+
# For a percentage rollout, use set-rollout instead:
|
|
746
|
+
|
|
747
|
+
$ qfg set-rollout my.flag.name --environment production --true-percent 20
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
_See code: [src/commands/set-default.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/set-default.ts)_
|
|
751
|
+
|
|
752
|
+
## `qfg set-rollout [NAME]`
|
|
753
|
+
|
|
754
|
+
Configure a percentage rollout (gradual rollout / A/B test / canary deploy) for a flag.
|
|
755
|
+
|
|
756
|
+
```
|
|
757
|
+
USAGE
|
|
758
|
+
$ qfg set-rollout [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--environment <value>]
|
|
759
|
+
[--hash-by <value>] [--true-percent <value>] [--weights <value>] [--confirm]
|
|
760
|
+
|
|
761
|
+
ARGUMENTS
|
|
762
|
+
NAME config/feature-flag/etc. name
|
|
763
|
+
|
|
764
|
+
FLAGS
|
|
765
|
+
--confirm skip the interactive confirmation prompt (useful for scripts and agents)
|
|
766
|
+
--environment=<value> environment to update (e.g. production, staging)
|
|
767
|
+
--hash-by=<value> [default: user.key] user property used to assign buckets (default: user.key)
|
|
768
|
+
--true-percent=<value> percentage of users that receive true (0–100). Remaining users receive false. Boolean flags
|
|
769
|
+
only.
|
|
770
|
+
--weights=<value> comma-separated "value:percent" pairs that must sum to 100 (e.g. "true:20,false:80" or
|
|
771
|
+
"red:33,green:33,blue:34")
|
|
772
|
+
|
|
773
|
+
GLOBAL FLAGS
|
|
774
|
+
-w, --workspace=<value> Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)
|
|
775
|
+
--[no-]interactive Force interactive mode
|
|
776
|
+
--json Format output as json.
|
|
777
|
+
--no-color Do not colorize output
|
|
778
|
+
--verbose Verbose output
|
|
779
|
+
|
|
780
|
+
DESCRIPTION
|
|
781
|
+
Configure a percentage rollout (gradual rollout / A/B test / canary deploy) for a flag.
|
|
782
|
+
|
|
783
|
+
The flag must already exist. Create it first if needed:
|
|
784
|
+
qfg create my.flag --type boolean-flag
|
|
785
|
+
|
|
786
|
+
Weights are specified as whole-number percentages (0–100). They must sum to 100.
|
|
787
|
+
|
|
788
|
+
For a boolean flag, use --true-percent to set the percentage of users that receive
|
|
789
|
+
true (the remainder automatically receive false):
|
|
790
|
+
qfg set-rollout my.flag --environment production --true-percent 20
|
|
791
|
+
→ 20% of users get true, 80% get false
|
|
792
|
+
|
|
793
|
+
For multi-value flags or custom splits, use --weights with a comma-separated list:
|
|
794
|
+
qfg set-rollout my.flag --environment production --weights "red:33,green:33,blue:34"
|
|
795
|
+
|
|
796
|
+
Hashing: users are bucketed by the value of hashByPropertyName (default: "user.key").
|
|
797
|
+
Use --hash-by to change which property drives the bucket assignment:
|
|
798
|
+
qfg set-rollout my.flag --environment production --true-percent 10 --hash-by user.id
|
|
799
|
+
|
|
800
|
+
For scripted / agent use, add --confirm to skip the interactive confirmation prompt.
|
|
801
|
+
|
|
802
|
+
To combine a rollout with segment targeting (e.g. beta ON, holdout OFF, everyone else 50/50),
|
|
803
|
+
you need to edit the JSON config file directly:
|
|
804
|
+
qfg config-schema # operator reference + worked multi-rule example
|
|
805
|
+
qfg pull --dir ./config # clone workspace to edit
|
|
806
|
+
|
|
807
|
+
To revert to a single value for everyone, use:
|
|
808
|
+
qfg set-default my.flag --environment production --value false
|
|
809
|
+
|
|
810
|
+
To inspect the current rollout:
|
|
811
|
+
qfg info my.flag
|
|
812
|
+
|
|
813
|
+
EXAMPLES
|
|
814
|
+
$ qfg set-rollout my.feature.flag --environment production --true-percent 20
|
|
815
|
+
|
|
816
|
+
$ qfg set-rollout my.feature.flag --environment staging --true-percent 50
|
|
817
|
+
|
|
818
|
+
$ qfg set-rollout my.feature.flag --environment production --true-percent 100 # full rollout
|
|
819
|
+
|
|
820
|
+
$ qfg set-rollout my.feature.flag --environment production --true-percent 0 # kill switch (all false)
|
|
821
|
+
|
|
822
|
+
$ qfg set-rollout my.variant.flag --environment production --weights "control:50,treatment:50"
|
|
823
|
+
|
|
824
|
+
$ qfg set-rollout my.variant.flag --environment production --weights "a:33,b:33,c:34" --hash-by user.id
|
|
671
825
|
```
|
|
672
826
|
|
|
673
|
-
_See code: [src/commands/set-
|
|
827
|
+
_See code: [src/commands/set-rollout.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/set-rollout.ts)_
|
|
674
828
|
|
|
675
829
|
## `qfg sync`
|
|
676
830
|
|
|
@@ -702,7 +856,7 @@ EXAMPLES
|
|
|
702
856
|
$ qfg sync --watch --dir ./our-config --interval 30
|
|
703
857
|
```
|
|
704
858
|
|
|
705
|
-
_See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
859
|
+
_See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/sync.ts)_
|
|
706
860
|
|
|
707
861
|
## `qfg verify [PATH]`
|
|
708
862
|
|
|
@@ -735,7 +889,7 @@ EXAMPLES
|
|
|
735
889
|
$ qfg verify --json
|
|
736
890
|
```
|
|
737
891
|
|
|
738
|
-
_See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
892
|
+
_See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/verify.ts)_
|
|
739
893
|
|
|
740
894
|
## `qfg whoami`
|
|
741
895
|
|
|
@@ -758,11 +912,11 @@ EXAMPLES
|
|
|
758
912
|
$ qfg whoami
|
|
759
913
|
```
|
|
760
914
|
|
|
761
|
-
_See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
915
|
+
_See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/whoami.ts)_
|
|
762
916
|
|
|
763
917
|
## `qfg workspace`
|
|
764
918
|
|
|
765
|
-
|
|
919
|
+
Show the current workspace
|
|
766
920
|
|
|
767
921
|
```
|
|
768
922
|
USAGE
|
|
@@ -775,13 +929,13 @@ GLOBAL FLAGS
|
|
|
775
929
|
--verbose Verbose output
|
|
776
930
|
|
|
777
931
|
DESCRIPTION
|
|
778
|
-
|
|
932
|
+
Show the current workspace
|
|
779
933
|
|
|
780
934
|
EXAMPLES
|
|
781
935
|
$ qfg workspace
|
|
782
936
|
```
|
|
783
937
|
|
|
784
|
-
_See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
938
|
+
_See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/workspace.ts)_
|
|
785
939
|
|
|
786
940
|
## `qfg workspace bootstrap`
|
|
787
941
|
|
|
@@ -814,7 +968,30 @@ EXAMPLES
|
|
|
814
968
|
$ qfg workspace bootstrap --dir ./our-config --skip-validate
|
|
815
969
|
```
|
|
816
970
|
|
|
817
|
-
_See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
971
|
+
_See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/workspace/bootstrap.ts)_
|
|
972
|
+
|
|
973
|
+
## `qfg workspace switch`
|
|
974
|
+
|
|
975
|
+
Switch to a different workspace
|
|
976
|
+
|
|
977
|
+
```
|
|
978
|
+
USAGE
|
|
979
|
+
$ qfg workspace switch [--json] [--interactive] [--no-color] [--verbose]
|
|
980
|
+
|
|
981
|
+
GLOBAL FLAGS
|
|
982
|
+
--[no-]interactive Force interactive mode
|
|
983
|
+
--json Format output as json.
|
|
984
|
+
--no-color Do not colorize output
|
|
985
|
+
--verbose Verbose output
|
|
986
|
+
|
|
987
|
+
DESCRIPTION
|
|
988
|
+
Switch to a different workspace
|
|
989
|
+
|
|
990
|
+
EXAMPLES
|
|
991
|
+
$ qfg workspace switch
|
|
992
|
+
```
|
|
993
|
+
|
|
994
|
+
_See code: [src/commands/workspace/switch.ts](https://github.com/quonfig/cli/blob/v0.0.6/src/commands/workspace/switch.ts)_
|
|
818
995
|
<!-- commandsstop -->
|
|
819
996
|
|
|
820
997
|
## Local Development
|
|
@@ -831,10 +1008,13 @@ fish -c "cd ../../quonfig/cli;bin/dev.js"
|
|
|
831
1008
|
|
|
832
1009
|
## Releasing
|
|
833
1010
|
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
1011
|
+
Publishing is fully automated via CI. To ship a new version:
|
|
1012
|
+
|
|
1013
|
+
1. Bump the version in `package.json`
|
|
1014
|
+
2. Add an entry to `CHANGELOG.md`
|
|
1015
|
+
3. Commit and push to `main`
|
|
1016
|
+
|
|
1017
|
+
The [release workflow](.github/workflows/release.yaml) detects that the version in `package.json` is not yet on npm and publishes automatically using GitHub OIDC (no npm token or OTP needed locally).
|
|
838
1018
|
|
|
839
1019
|
## Contributing
|
|
840
1020
|
|