more sandbox config

This commit is contained in:
root 2026-07-18 18:59:14 -03:00
parent 0f1a81c2aa
commit 6447486643
No known key found for this signature in database
6 changed files with 533 additions and 90 deletions

12
executables/opencode.sh Normal file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
SSH_TARGET="sandbox@vsock%3"
if [[ "$PWD" == /home/user* ]]; then
project="${PWD/\/home\/user/\/home\/sandbox}"
else
project="$(ssh "$SSH_TARGET" 'mktemp -d -p /tmp opencode-XXXXXX')"
fi
exec ssh -t "$SSH_TARGET" opencode "$project" "$@"