Files
phaseflow/ralph-sandbox.sh
2026-01-10 17:13:18 +00:00

21 lines
864 B
Bash
Executable File

#!/usr/bin/env bash
# ABOUTME: Wrapper script to run Ralph in Nix-isolated environment.
# ABOUTME: Uses the 'ralph' devShell for restricted execution.
# Usage: ./ralph-sandbox.sh [args...]
# Examples:
# ./ralph-sandbox.sh plan 3 # Plan mode, 3 iterations
# ./ralph-sandbox.sh 10 # Build mode, 10 iterations
# ./ralph-sandbox.sh # Build mode, unlimited
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🔒 Launching Ralph in Nix Sandbox"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Run loop.sh inside the ralph devShell
nix develop "${SCRIPT_DIR}#ralph" --command "${SCRIPT_DIR}/loop.sh" "$@"