From f128053183446533ea0b83724745a8105d7b471d Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Thu, 12 Mar 2026 14:24:55 -0700 Subject: [PATCH] Add upgrade command to CLI --- src/cli/index.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/cli/index.ts b/src/cli/index.ts index 34f4277..e68d473 100755 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -264,4 +264,16 @@ $ true [0]`) }) +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.parse()