@@ -233,7 +233,9 @@ export const sandboxListCommand = new Command<SandboxContext>()
233233
234234export const sandboxKillCommand = new Command < SandboxContext > ( )
235235 . description ( "Kill a running sandbox" )
236- . arguments ( "<sandbox-id:string>" )
236+ . argument ( "<sandbox-id:string>" , "The id of the sandbox" , {
237+ default : Deno . env . get ( "SANDBOX_ID" ) ,
238+ } )
237239 . action ( actionHandler ( async ( config , options , sandboxId ) => {
238240 config . noCreate ( ) ;
239241 const org = await getOrg ( options , config , options . org ) ;
@@ -257,7 +259,9 @@ export const sandboxKillCommand = new Command<SandboxContext>()
257259
258260export const sandboxSshCommand = new Command < SandboxContext > ( )
259261 . description ( "SSH into a running sandbox" )
260- . arguments ( "<sandbox-id:string>" )
262+ . argument ( "<sandbox-id:string>" , "The id of the sandbox" , {
263+ default : Deno . env . get ( "SANDBOX_ID" ) ,
264+ } )
261265 . action ( actionHandler ( async ( config , options , sandboxId ) => {
262266 config . noCreate ( ) ;
263267 await using sandbox = await connectToSandbox ( options , config , sandboxId ) ;
@@ -433,7 +437,10 @@ export const sandboxExecCommand = new Command<SandboxContext>()
433437 )
434438 . option ( "-q, --quiet" , "Don't pipe the command to the console" )
435439 . option ( "--cwd <path:string>" , "Working directory of the command" )
436- . arguments ( "<sandbox-id:string> <command...:string>" )
440+ . argument ( "<sandbox-id:string>" , "The id of the sandbox" , {
441+ default : Deno . env . get ( "SANDBOX_ID" ) ,
442+ } )
443+ . arguments ( "<command...:string>" )
437444 . action (
438445 actionHandler ( async function ( config , options , sandboxId , ...command ) {
439446 config . noCreate ( ) ;
@@ -461,7 +468,10 @@ export const sandboxExecCommand = new Command<SandboxContext>()
461468
462469export const sandboxExtendCommand = new Command < SandboxContext > ( )
463470 . description ( "Extend the timeout of a running sandbox" )
464- . arguments ( "<sandbox-id:string> <timeout:string>" )
471+ . argument ( "<sandbox-id:string>" , "The id of the sandbox" , {
472+ default : Deno . env . get ( "SANDBOX_ID" ) ,
473+ } )
474+ . argument ( "<timeout:string>" , "The amount to extend the timeout by" )
465475 . action ( actionHandler ( async ( config , options , sandboxId , timeout ) => {
466476 config . noCreate ( ) ;
467477 await using sandbox = await connectToSandbox ( options , config , sandboxId ) ;
@@ -479,7 +489,10 @@ export const sandboxDeployCommand = new Command<SandboxContext>()
479489 "--args <args...:string>" ,
480490 "Arguments to pass to the entrypoint script" ,
481491 )
482- . arguments ( "<sandbox-id:string> <app:string>" )
492+ . argument ( "<sandbox-id:string>" , "The id of the sandbox" , {
493+ default : Deno . env . get ( "SANDBOX_ID" ) ,
494+ } )
495+ . argument ( "<app:string>" , "The app to deploy to" )
483496 . action ( actionHandler ( async ( config , options , sandboxId , app ) => {
484497 config . noCreate ( ) ;
485498 await using sandbox = await connectToSandbox ( options , config , sandboxId ) ;
0 commit comments