summaryrefslogtreecommitdiff
path: root/modes/reset.sh
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-27 23:23:43 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-27 23:23:43 +0000
commit7519de4e56323230d06cfc64b00df52339eb2434 (patch)
tree87712be5ef45a6913601e729c18a67c20fee9f09 /modes/reset.sh
Initial project setupHEADmain
Add modal-shell project with .agent/ config, mode stubs, ms dispatcher, bare repo at /site/git.terst.org/repos/modal-shell.git, and ADR-001.
Diffstat (limited to 'modes/reset.sh')
-rwxr-xr-xmodes/reset.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/modes/reset.sh b/modes/reset.sh
new file mode 100755
index 0000000..4a8a3fc
--- /dev/null
+++ b/modes/reset.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+# reset — destroy and rebuild the environment from scratch (DESTRUCTIVE)
+set -euo pipefail
+
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+# shellcheck source=base.sh
+source "$SCRIPT_DIR/base.sh"
+
+cd "$PROJECT_ROOT"
+
+echo "WARNING: This will destroy and rebuild the environment."
+echo "All local state will be lost."
+echo ""
+read -rp "Continue? [y/N] " confirm
+[[ "$confirm" =~ ^[Yy]$ ]] || { echo "Aborted."; exit 1; }
+
+# ── TODO: implement your teardown and rebuild steps ───────────────────────────
+
+# Example: Docker Compose teardown + rebuild
+# docker compose down --volumes --remove-orphans
+# docker compose build --no-cache
+# docker compose up -d
+# docker compose exec app <your-migration-command>
+
+# Example: nix / devenv
+# nix flake update
+# direnv reload
+
+echo "error: no reset steps configured in modes/reset.sh" >&2
+exit 1