@@ -39,6 +39,7 @@ const InitCommandOptions = CommonCommandOptions.extend({
39
39
overrideConfig : z . boolean ( ) . default ( false ) ,
40
40
tag : z . string ( ) . default ( "beta" ) ,
41
41
skipPackageInstall : z . boolean ( ) . default ( false ) ,
42
+ runtime : z . string ( ) . default ( "node" ) ,
42
43
pkgArgs : z . string ( ) . optional ( ) ,
43
44
gitRef : z . string ( ) . default ( "main" ) ,
44
45
javascript : z . boolean ( ) . default ( false ) ,
@@ -62,6 +63,11 @@ export function configureInitCommand(program: Command) {
62
63
"The version of the @trigger.dev/sdk package to install" ,
63
64
"beta"
64
65
)
66
+ . option (
67
+ "-r, --runtime <runtime>" ,
68
+ "Which runtime to use for the project. Currently only supports node and bun" ,
69
+ "node"
70
+ )
65
71
. option ( "--skip-package-install" , "Skip installing the @trigger.dev/sdk package" )
66
72
. option ( "--override-config" , "Override the existing config file if it exists" )
67
73
. option (
@@ -490,12 +496,14 @@ async function writeConfigFile(
490
496
"cli.projectDir" : projectDir ,
491
497
"cli.templatePath" : templateUrl ,
492
498
"cli.outputPath" : outputPath ,
499
+ "cli.runtime" : options . runtime ,
493
500
} ) ;
494
501
495
502
const result = await createFileFromTemplate ( {
496
503
templateUrl,
497
504
replacements : {
498
505
projectRef : project . externalRef ,
506
+ runtime : options . runtime ,
499
507
triggerDirectoriesOption : triggerDir . isCustomValue
500
508
? `\n dirs: ["${ triggerDir . location } "],`
501
509
: `\n dirs: ["/src/trigger"],` ,
0 commit comments