From de40ddd225a1eea346ee935cd96e038611ae4911 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Fri, 20 Feb 2026 07:47:49 -0800 Subject: [PATCH] Make the `branch` argument optional in the `shell` command, falling back to a plain VM shell when omitted --- src/cli.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 2e32b75..a3e04a1 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -359,9 +359,15 @@ program program .command("shell") - .argument("", "branch name") - .description("Open a shell in the VM at the session's worktree") - .action(async (branch: string) => { + .argument("[branch]", "branch name (omit for a plain VM shell)") + .description("Open a shell in the VM (at the session's worktree if branch given)") + .action(async (branch?: string) => { + if (!branch) { + await vm.ensure() + await vm.shell() + return + } + const root = await git.repoRoot() const session = await state.getSession(root, branch) if (!session) {