diff --git a/src/cli.ts b/src/cli.ts index 7d9a2b4..9d74dfb 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -183,6 +183,18 @@ program registerVmCommands(program) +program + .command("upgrade") + .description("Upgrade sandlot to the latest version") + .action(async () => { + const result = await Bun.spawn(["bun", "install", "-g", "@because/sandlot@latest"], { + stdin: "inherit", + stdout: "inherit", + stderr: "inherit", + }).exited + process.exit(result) + }) + program .command("version") .description("Print the version number")