From d941af207892b96b35396601d0c889ab3d6d4229 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Thu, 19 Feb 2026 09:54:21 -0800 Subject: [PATCH] Add prompt and print mode options to the `open` command --- src/cli.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 67dc353..52329a6 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -105,8 +105,10 @@ program program .command("open") .argument("", "branch name") + .argument("[prompt]", "initial prompt for Claude") + .option("-p, --print ", "run Claude in non-interactive mode with -p") .description("Re-enter an existing session") - .action(async (branch: string) => { + .action(async (branch: string, prompt: string | undefined, opts: { print?: string }) => { const root = await git.repoRoot() const session = await state.getSession(root, branch) @@ -119,7 +121,8 @@ program await vm.ensure((msg) => { spin.text = msg }) spin.succeed("Session ready") - await vm.claude(session.worktree) + if (opts.print) console.log(`Running prompt…`) + await vm.claude(session.worktree, { prompt, print: opts.print }) }) // ── sandlot close ───────────────────────────────────────────