@@ -124,20 +124,36 @@ Export `Configs` as configuration data in various modes
124
124
125
125
` ` ` bash
126
126
USAGE
127
- $ configu export [--empty] [-- explain | --format
127
+ $ configu export [--explain | --format
128
128
JSON| CompactJSON| YAML| Dotenv| KubernetesConfigMap| HelmValues| TerraformTfvars| TOML | --template < value> | --source |
129
- --run < value> ] [--label < value> ] [--eol ] [--template-input object| array ]
129
+ --run < value> ] [--label < value> ] [--eol ] [--template-input object| array ] [--prefix < value> ] [--suffix < value> ]
130
+ [--casing CamelCase| CapitalCase| ConstantCase| DotCase| KebabCase| NoCase| PascalCase| PascalSnakeCase| PathCase| SentenceCa
131
+ se| SnakeCase| TrainCase] [--pick-label < value> ] [--omit-label < value> ] [--pick-key < value> ] [--omit-key < value> ]
132
+ [--pick-hidden | --omit-hidden] [--pick-empty | --omit-empty]
130
133
131
134
FLAGS
132
- --[no-]empty Omits all empty (non-value) from the exported ` Configs`
135
+ --casing=< option> Transforms the casing of Config Keys in the export result to camelCase, PascalCase, Capital
136
+ Case, snake_case, param-case, CONSTANT_CASE and others
137
+ < options: CamelCase| CapitalCase| ConstantCase| DotCase| KebabCase| NoCase| PascalCase| PascalSnak
138
+ eCase| PathCase| SentenceCase| SnakeCase| TrainCase>
133
139
--eol Adds EOL (\n on POSIX \r\n on Windows) to the end of the stdout
134
140
--explain Outputs metadata on the exported ` Configs`
135
141
--format=< option> Format exported ` Configs` to common configuration formats. Redirect the output to file, if
136
142
needed
137
143
< options: JSON| CompactJSON| YAML| Dotenv| KubernetesConfigMap| HelmValues| TerraformTfvars| TOML>
138
144
--label=< value> Metadata required in some formats like Kubernetes ConfigMap
145
+ --omit-empty Exclude config keys with empty values. By default, empty values are included
146
+ --omit-hidden Explicitly exclude config keys marked as hidden. By default, hidden keys are omitted
147
+ --omit-key=< value> ... Omit a specific key from the previous eval command return to export
148
+ --omit-label=< value> ... Omit a specific label from the previous eval command return to export
149
+ --pick-empty Include config keys with empty values. By default, empty values are included
150
+ --pick-hidden Explicitly include config keys marked as hidden. By default, hidden keys are omitted
151
+ --pick-key=< value> ... Pick a specific key from the previous eval command return to export
152
+ --pick-label=< value> ... Pick a specific label from the previous eval command return to export
153
+ --prefix=< value> Append a fixed string to the beginning of each Config Key in the export result
139
154
--run=< value> Spawns executable as child-process and pass exported ` Configs` as environment variables
140
155
--source Source exported ` Configs` as environment variables to the current shell
156
+ --suffix=< value> Append a fixed string to the end of each Config Key in the export result
141
157
--template=< value> Path to a file containing {{mustache}} templates to render (inject/substitute) the exported
142
158
` Configs` into
143
159
--template-input=< option> Inject ` Configs` to template as object or array of ` {key: string, value: string}[]`
@@ -170,6 +186,30 @@ EXAMPLES
170
186
Pipe eval commands result to export command to pass ` Configs` as environment variables to a child-process
171
187
172
188
$ configu eval ... | configu export --run ' node index.js'
189
+
190
+ Pipe eval commands result to export command and apply a prefix / suffix to each Config Key in the export result
191
+
192
+ $ configu eval ... | configu export --prefix " MYAPP_" --suffix " _PROD"
193
+
194
+ Pipe eval commands result to export command and apply casing to each Config Key in the export result
195
+
196
+ $ configu eval ... | configu export --casing " SnakeCase"
197
+
198
+ Pipe eval commands result to export command and exclude specific labels
199
+
200
+ $ configu eval ... | configu export --omit-label ' deprecated' --omit-label ' temporary'
201
+
202
+ Pipe eval commands result to export command and include only configs under specific labels
203
+
204
+ $ configu eval ... | configu export --pick-label ' production' --pick-label ' secure'
205
+
206
+ Pipe eval commands result to export command and exclude specific keys
207
+
208
+ $ configu eval ... | configu export --omit-key ' DEBUG_MODE' --omit-key ' TEST_ACCOUNT'
209
+
210
+ Pipe eval commands result to export command. Include hidden configs and exclude configs with empty values
211
+
212
+ $ configu eval ... | configu export --pick-hidden --omit-empty
173
213
` ` `
174
214
175
215
# # configu find
0 commit comments