fix(goose2): add confirm parameter to wipe recipe for non-interactive use

Add a `confirm` parameter (default "no") to the `just goose2 wipe`
recipe. When invoked with `confirm=yes`, the interactive prompt is
skipped, allowing scripted/piped usage without hanging on stdin.

Interactive:  just goose2 wipe
Scripted:     just goose2 wipe confirm=yes
Signed-off-by: Matt Toohey <contact@matttoohey.com>
This commit is contained in:
Matt Toohey
2026-05-07 15:46:19 +10:00
parent b6a2d02d6b
commit 2429e793bd
+5 -3
View File
@@ -273,7 +273,7 @@ kill-all:
# ── Utilities ────────────────────────────────────────────────
# Delete goose2 dev session data and webview storage so the next launch shows onboarding
wipe:
wipe confirm="no":
#!/usr/bin/env bash
set -euo pipefail
@@ -286,8 +286,10 @@ wipe:
echo ""
echo "Preserved: config.yaml, secrets, keyring, legacy .jsonl sessions, scheduler, prod data, app state"
echo ""
read -p "Continue? [y/N] " confirm
[[ "$confirm" =~ ^[Yy]$ ]] || exit 0
if [[ "{{ confirm }}" != "yes" ]]; then
read -p "Continue? [y/N] " answer
[[ "$answer" =~ ^[Yy]$ ]] || exit 0
fi
# Sessions DB (preserve .jsonl files for re-migration)
rm -f "$DATA_DIR/sessions/sessions.db" \