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) {