From 3d0d40ab1a2bac594b0de68a6f6d97bd84424ba8 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 8 Mar 2026 22:23:37 -0700 Subject: [PATCH] Add upgrade command to CLI --- src/cli.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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")