@@ -32,7 +32,7 @@ import {
3232 runKeysUpdate ,
3333} from "./commands/keys.js" ;
3434import { readConfig } from "./config.js" ;
35- import { error } from "./output/log.js" ;
35+ import { error , warn } from "./output/log.js" ;
3636import { makeDebug } from "./debug.js" ;
3737
3838const program = new Command ( ) ;
@@ -203,8 +203,7 @@ secrets
203203 await runSecretsDelete ( key , opts . project , opts . env ) . catch ( handleError ) ;
204204 } ) ;
205205
206- // βββ kfl upload ββββββββββββββββββββββββββββββββββββββββββββββ
207- program
206+ secrets
208207 . command ( "upload <file>" )
209208 . description (
210209 "Upload a .env file β REPLACES all secrets in the target environment"
@@ -216,8 +215,7 @@ program
216215 await runUpload ( file , opts . project , opts . env , opts ) . catch ( handleError ) ;
217216 } ) ;
218217
219- // βββ kfl download ββββββββββββββββββββββββββββββββββββββββββββ
220- program
218+ secrets
221219 . command ( "download" )
222220 . description ( "Download secrets to stdout or a file" )
223221 . requiredOption ( "--project <name>" , "Project name" , resolveProject ( ) )
@@ -228,6 +226,32 @@ program
228226 await runDownload ( opts . project , opts . env , opts ) . catch ( handleError ) ;
229227 } ) ;
230228
229+ // βββ Deprecated aliases: kfl upload/download ββββββββββββββββ
230+ program
231+ . command ( "upload <file>" , { hidden : true } )
232+ . description (
233+ "Upload a .env file β REPLACES all secrets in the target environment"
234+ )
235+ . requiredOption ( "--project <name>" , "Project name" , resolveProject ( ) )
236+ . requiredOption ( "--env <name>" , "Environment name" , resolveEnvironment ( ) )
237+ . option ( "--force" , "Skip confirmation prompt" )
238+ . action ( async ( file : string , opts : { project : string ; env : string ; force ?: boolean } ) => {
239+ warn ( "`kfl upload` is deprecated; use `kfl secrets upload`" ) ;
240+ await runUpload ( file , opts . project , opts . env , opts ) . catch ( handleError ) ;
241+ } ) ;
242+
243+ program
244+ . command ( "download" , { hidden : true } )
245+ . description ( "Download secrets to stdout or a file" )
246+ . requiredOption ( "--project <name>" , "Project name" , resolveProject ( ) )
247+ . requiredOption ( "--env <name>" , "Environment name" , resolveEnvironment ( ) )
248+ . option ( "--format <fmt>" , "Output format: env, json, yaml, shell" , "env" )
249+ . option ( "--output <file>" , "Write to file instead of stdout" )
250+ . action ( async ( opts : { project : string ; env : string ; format ?: string ; output ?: string } ) => {
251+ warn ( "`kfl download` is deprecated; use `kfl secrets download`" ) ;
252+ await runDownload ( opts . project , opts . env , opts ) . catch ( handleError ) ;
253+ } ) ;
254+
231255// βββ kfl run βββββββββββββββββββββββββββββββββββββββββββββββββ
232256program
233257 . command ( "run" )
0 commit comments