From e6aa31f769d9740fdbf8d6ccb44b387660666307 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Tue, 17 Feb 2026 10:50:58 -0800 Subject: [PATCH] sandlot list --json --- src/cli.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index a811bcc..5db304e 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -51,11 +51,17 @@ program program .command("list") .description("Show all active sessions") - .action(async () => { + .option("--json", "Output as JSON") + .action(async (opts: { json?: boolean }) => { const root = await git.repoRoot() const st = await state.load(root) const sessions = Object.values(st.sessions) + if (opts.json) { + console.log(JSON.stringify(sessions, null, 2)) + return + } + if (sessions.length === 0) { console.log("No active sessions.") return