Skip to content

Commit 8b8296b

Browse files
committed
chore: wip
chore: wip chore: wip
1 parent e313413 commit 8b8296b

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,12 @@ buddy generate:all # runs all generators
219219
buddy key:generate # generates your application key
220220

221221
# manage your environment variables
222-
buddy secret:get # get a secret
223-
buddy secret:set # set a secret
224-
buddy secret:encrypt # encrypt a secret
225-
buddy secret:decrypt # decrypt a secret
226-
buddy secret:keypair # generate a keypair
227-
buddy secret:rotate # rotate a keypair
222+
buddy env:get # get an environment variable
223+
buddy env:set # set an environment variable
224+
buddy env:encrypt # encrypt an environment variable
225+
buddy env:decrypt # decrypt an environment variable
226+
buddy env:keypair # generate a keypair
227+
buddy env:rotate # rotate a keypair
228228

229229
# generate your TypeScript declarations
230230
buddy types:generate # generates types for your components, functions, & views

storage/framework/core/buddy/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async function main() {
7070
cmd.route(buddy)
7171
cmd.saas(buddy)
7272
cmd.search(buddy)
73-
cmd.secret(buddy)
73+
cmd.env(buddy)
7474
cmd.seed(buddy)
7575
cmd.setup(buddy)
7676
cmd.schedule(buddy)

storage/framework/core/buddy/src/commands/secret.ts renamed to storage/framework/core/buddy/src/commands/env.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ type SecretOptions = {
2121
file: string
2222
}
2323

24-
export function secret(buddy: CLI): void {
24+
export function env(buddy: CLI): void {
2525
const descriptions = {
26-
secret: 'Interact with your environment variables',
26+
env: 'Interact with your environment variables',
2727
get: 'Get an environment variable',
2828
set: 'Set an environment variable',
2929
encrypt: 'Encrypt a value',
@@ -42,21 +42,21 @@ export function secret(buddy: CLI): void {
4242
}
4343

4444
buddy
45-
.command('secret:get [key]', descriptions.get)
45+
.command('env:get [key]', descriptions.get)
4646
.option('-f, --file [file]', descriptions.file, { default: '' })
4747
.option('--format [format]', descriptions.format, { default: 'json' })
4848
.option('-a, --all', descriptions.all, { default: false })
4949
.option('-p, --pretty', descriptions.pretty, { default: false })
5050
.option('-p, --project [project]', descriptions.project, { default: false })
5151
.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')
5858
.action(async (key: string, options: SecretOptions) => {
59-
log.debug('Running `buddy secret:get` ...', options)
59+
log.debug('Running `buddy env:get` ...', options)
6060

6161
const args = ['get']
6262

@@ -83,19 +83,19 @@ export function secret(buddy: CLI): void {
8383
})
8484

8585
buddy
86-
.command('secret:set [key] [value]', descriptions.set)
86+
.command('env:set [key] [value]', descriptions.set)
8787
.option('-f, --file [file]', descriptions.file, { default: '' })
8888
.option('--format [format]', descriptions.format, { default: 'json' })
8989
.option('-a, --all', descriptions.all, { default: false })
9090
.option('-p, --pretty', descriptions.pretty, { default: false })
9191
.option('-p, --project [project]', descriptions.project, { default: false })
9292
.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')
9797
.action(async (key: string, value: string, options: SecretOptions) => {
98-
log.debug('Running `buddy secret:set` ...', options)
98+
log.debug('Running `buddy env:set` ...', options)
9999

100100
const args = ['set']
101101

@@ -124,14 +124,14 @@ export function secret(buddy: CLI): void {
124124
})
125125

126126
buddy
127-
.command('secret:encrypt [key]', descriptions.encrypt)
127+
.command('env:encrypt [key]', descriptions.encrypt)
128128
.option('-f, --file [file]', descriptions.file, { default: '' })
129129
.option('-fk, --file-keys [fileKeys]', descriptions.fileKeys, { default: '' })
130130
.option('-k, --keypair [keypair]', descriptions.keypair, { default: '' })
131131
.option('-o, --stdout', descriptions.stdout, { default: false })
132132
.option('-ek, --exclude-key [excludeKey]', descriptions.excludeKey, { default: '' })
133133
.action(async (key: string, options: SecretOptions) => {
134-
log.debug('Running `buddy secret:encrypt` ...', options)
134+
log.debug('Running `buddy env:encrypt` ...', options)
135135

136136
const args = ['encrypt']
137137

@@ -159,13 +159,13 @@ export function secret(buddy: CLI): void {
159159
})
160160

161161
buddy
162-
.command('secret:decrypt [key]', descriptions.decrypt)
162+
.command('env:decrypt [key]', descriptions.decrypt)
163163
.option('-f, --file [file]', descriptions.file, { default: '' })
164164
.option('-fk, --file-keys [fileKeys]', descriptions.fileKeys, { default: '' })
165165
.option('-k, --keypair [keypair]', descriptions.keypair, { default: '' })
166166
.option('-o, --stdout', descriptions.stdout, { default: false })
167167
.action(async (key: string, options: SecretOptions) => {
168-
log.debug('Running `buddy secret:decrypt` ...', options)
168+
log.debug('Running `buddy env:decrypt` ...', options)
169169

170170
const args = ['decrypt']
171171

@@ -192,12 +192,12 @@ export function secret(buddy: CLI): void {
192192
})
193193

194194
buddy
195-
.command('secret:keypair [key]', descriptions.keypair)
195+
.command('env:keypair [key]', descriptions.keypair)
196196
.option('-f, --file [file]', descriptions.file, { default: '' })
197197
.option('-fk, --file-keys [fileKeys]', descriptions.fileKeys, { default: '' })
198198
.option('-o, --stdout', descriptions.stdout, { default: false })
199199
.action(async (key: string, options: SecretOptions) => {
200-
log.debug('Running `buddy secret:keypair` ...', options)
200+
log.debug('Running `buddy env:keypair` ...', options)
201201

202202
const args = ['keypair']
203203

@@ -223,13 +223,13 @@ export function secret(buddy: CLI): void {
223223
})
224224

225225
buddy
226-
.command('secret:rotate [key]', descriptions.rotate)
226+
.command('env:rotate [key]', descriptions.rotate)
227227
.option('-f, --file [file]', descriptions.file, { default: '' })
228228
.option('-fk, --file-keys [fileKeys]', descriptions.fileKeys, { default: '' })
229229
.option('-k, --keypair [keypair]', descriptions.keypair, { default: '' })
230230
.option('-o, --stdout', descriptions.stdout, { default: false })
231231
.action(async (key: string, options: SecretOptions) => {
232-
log.debug('Running `buddy secret:rotate` ...', options)
232+
log.debug('Running `buddy env:rotate` ...', options)
233233

234234
const args = ['rotate']
235235

@@ -255,7 +255,7 @@ export function secret(buddy: CLI): void {
255255
}
256256
})
257257

258-
buddy.on('secret:*', () => {
258+
buddy.on('env:*', () => {
259259
console.error('Invalid command: %s\nSee --help for a list of available commands.', buddy.args.join(' '))
260260
process.exit(1)
261261
})

storage/framework/core/buddy/src/commands/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export * from './deploy'
99
export * from './dev'
1010
export * from './dns'
1111
export * from './domains'
12+
export * from './env'
1213
export * from './fresh'
1314
export * from './generate'
1415
export * from './http'
@@ -28,7 +29,6 @@ export * from './route'
2829
export * from './saas'
2930
export * from './schedule'
3031
export * from './search'
31-
export * from './secret'
3232
export * from './seed'
3333
export * from './setup'
3434
export * from './test'

0 commit comments

Comments
 (0)