@@ -21,9 +21,9 @@ type SecretOptions = {
21
21
file : string
22
22
}
23
23
24
- export function secret ( buddy : CLI ) : void {
24
+ export function env ( buddy : CLI ) : void {
25
25
const descriptions = {
26
- secret : 'Interact with your environment variables' ,
26
+ env : 'Interact with your environment variables' ,
27
27
get : 'Get an environment variable' ,
28
28
set : 'Set an environment variable' ,
29
29
encrypt : 'Encrypt a value' ,
@@ -42,21 +42,21 @@ export function secret(buddy: CLI): void {
42
42
}
43
43
44
44
buddy
45
- . command ( 'secret :get [key]' , descriptions . get )
45
+ . command ( 'env :get [key]' , descriptions . get )
46
46
. option ( '-f, --file [file]' , descriptions . file , { default : '' } )
47
47
. option ( '--format [format]' , descriptions . format , { default : 'json' } )
48
48
. option ( '-a, --all' , descriptions . all , { default : false } )
49
49
. option ( '-p, --pretty' , descriptions . pretty , { default : false } )
50
50
. option ( '-p, --project [project]' , descriptions . project , { default : false } )
51
51
. option ( '--verbose' , descriptions . verbose , { default : false } )
52
- . example ( 'buddy secret :get SECRET' )
53
- . example ( 'buddy secret :get SECRET --file .env.production' )
54
- . example ( 'buddy secret :get --all --pretty' )
55
- . example ( 'buddy secret :get --format shell' )
56
- . example ( 'buddy secret :get --format eval' )
57
- . example ( 'buddy secret :get --format json' )
52
+ . example ( 'buddy env :get SECRET' )
53
+ . example ( 'buddy env :get SECRET --file .env.production' )
54
+ . example ( 'buddy env :get --all --pretty' )
55
+ . example ( 'buddy env :get --format shell' )
56
+ . example ( 'buddy env :get --format eval' )
57
+ . example ( 'buddy env :get --format json' )
58
58
. action ( async ( key : string , options : SecretOptions ) => {
59
- log . debug ( 'Running `buddy secret :get` ...' , options )
59
+ log . debug ( 'Running `buddy env :get` ...' , options )
60
60
61
61
const args = [ 'get' ]
62
62
@@ -83,19 +83,19 @@ export function secret(buddy: CLI): void {
83
83
} )
84
84
85
85
buddy
86
- . command ( 'secret :set [key] [value]' , descriptions . set )
86
+ . command ( 'env :set [key] [value]' , descriptions . set )
87
87
. option ( '-f, --file [file]' , descriptions . file , { default : '' } )
88
88
. option ( '--format [format]' , descriptions . format , { default : 'json' } )
89
89
. option ( '-a, --all' , descriptions . all , { default : false } )
90
90
. option ( '-p, --pretty' , descriptions . pretty , { default : false } )
91
91
. option ( '-p, --project [project]' , descriptions . project , { default : false } )
92
92
. option ( '--verbose' , descriptions . verbose , { default : false } )
93
- . example ( 'buddy secret :set SECRET=value' )
94
- . example ( 'buddy secret :set SECRET value' )
95
- . example ( 'buddy secret :set SECRET value --file .env.production' )
96
- . example ( 'buddy secret :set --format shell' )
93
+ . example ( 'buddy env :set SECRET=value' )
94
+ . example ( 'buddy env :set SECRET value' )
95
+ . example ( 'buddy env :set SECRET value --file .env.production' )
96
+ . example ( 'buddy env :set --format shell' )
97
97
. action ( async ( key : string , value : string , options : SecretOptions ) => {
98
- log . debug ( 'Running `buddy secret :set` ...' , options )
98
+ log . debug ( 'Running `buddy env :set` ...' , options )
99
99
100
100
const args = [ 'set' ]
101
101
@@ -124,14 +124,14 @@ export function secret(buddy: CLI): void {
124
124
} )
125
125
126
126
buddy
127
- . command ( 'secret :encrypt [key]' , descriptions . encrypt )
127
+ . command ( 'env :encrypt [key]' , descriptions . encrypt )
128
128
. option ( '-f, --file [file]' , descriptions . file , { default : '' } )
129
129
. option ( '-fk, --file-keys [fileKeys]' , descriptions . fileKeys , { default : '' } )
130
130
. option ( '-k, --keypair [keypair]' , descriptions . keypair , { default : '' } )
131
131
. option ( '-o, --stdout' , descriptions . stdout , { default : false } )
132
132
. option ( '-ek, --exclude-key [excludeKey]' , descriptions . excludeKey , { default : '' } )
133
133
. action ( async ( key : string , options : SecretOptions ) => {
134
- log . debug ( 'Running `buddy secret :encrypt` ...' , options )
134
+ log . debug ( 'Running `buddy env :encrypt` ...' , options )
135
135
136
136
const args = [ 'encrypt' ]
137
137
@@ -159,13 +159,13 @@ export function secret(buddy: CLI): void {
159
159
} )
160
160
161
161
buddy
162
- . command ( 'secret :decrypt [key]' , descriptions . decrypt )
162
+ . command ( 'env :decrypt [key]' , descriptions . decrypt )
163
163
. option ( '-f, --file [file]' , descriptions . file , { default : '' } )
164
164
. option ( '-fk, --file-keys [fileKeys]' , descriptions . fileKeys , { default : '' } )
165
165
. option ( '-k, --keypair [keypair]' , descriptions . keypair , { default : '' } )
166
166
. option ( '-o, --stdout' , descriptions . stdout , { default : false } )
167
167
. action ( async ( key : string , options : SecretOptions ) => {
168
- log . debug ( 'Running `buddy secret :decrypt` ...' , options )
168
+ log . debug ( 'Running `buddy env :decrypt` ...' , options )
169
169
170
170
const args = [ 'decrypt' ]
171
171
@@ -192,12 +192,12 @@ export function secret(buddy: CLI): void {
192
192
} )
193
193
194
194
buddy
195
- . command ( 'secret :keypair [key]' , descriptions . keypair )
195
+ . command ( 'env :keypair [key]' , descriptions . keypair )
196
196
. option ( '-f, --file [file]' , descriptions . file , { default : '' } )
197
197
. option ( '-fk, --file-keys [fileKeys]' , descriptions . fileKeys , { default : '' } )
198
198
. option ( '-o, --stdout' , descriptions . stdout , { default : false } )
199
199
. action ( async ( key : string , options : SecretOptions ) => {
200
- log . debug ( 'Running `buddy secret :keypair` ...' , options )
200
+ log . debug ( 'Running `buddy env :keypair` ...' , options )
201
201
202
202
const args = [ 'keypair' ]
203
203
@@ -223,13 +223,13 @@ export function secret(buddy: CLI): void {
223
223
} )
224
224
225
225
buddy
226
- . command ( 'secret :rotate [key]' , descriptions . rotate )
226
+ . command ( 'env :rotate [key]' , descriptions . rotate )
227
227
. option ( '-f, --file [file]' , descriptions . file , { default : '' } )
228
228
. option ( '-fk, --file-keys [fileKeys]' , descriptions . fileKeys , { default : '' } )
229
229
. option ( '-k, --keypair [keypair]' , descriptions . keypair , { default : '' } )
230
230
. option ( '-o, --stdout' , descriptions . stdout , { default : false } )
231
231
. action ( async ( key : string , options : SecretOptions ) => {
232
- log . debug ( 'Running `buddy secret :rotate` ...' , options )
232
+ log . debug ( 'Running `buddy env :rotate` ...' , options )
233
233
234
234
const args = [ 'rotate' ]
235
235
@@ -255,7 +255,7 @@ export function secret(buddy: CLI): void {
255
255
}
256
256
} )
257
257
258
- buddy . on ( 'secret :*' , ( ) => {
258
+ buddy . on ( 'env :*' , ( ) => {
259
259
console . error ( 'Invalid command: %s\nSee --help for a list of available commands.' , buddy . args . join ( ' ' ) )
260
260
process . exit ( 1 )
261
261
} )
0 commit comments