shuru - Local-first microVM sandbox for AI agents
Extracto
Local-first microVM sandbox for AI agents on macOS
Resumen
Resumen Principal
La herramienta CLI Shuru se presenta como una solución potente para ejecutar comandos en entornos de máquina virtual aislados y efímeros, diseñados para garantizar la reproducibilidad y la seguridad. Su comando principal, shuru run, permite ejecutar tareas en un sandbox basado en Alpine Linux que se inicializa, ejecuta y destruye
Contenido
Simple CLI.
Run, checkpoint, restore.
terminal
$ shuru run -- echo "hello from the sandbox"
hello from the sandbox
$ shuru run -- cat /etc/os-release | head -1
NAME="Alpine Linux"
# VM boots, runs, and tears down — nothing persists.
$ shuru run -- ping -c1 8.8.8.8
ping: sendto: Operation not permitted
$ shuru run --allow-net -- apk add python3
fetch https://dl-cdn.alpinelinux.org/...
OK: 45 MiB in 28 packages
$ shuru run --cpus 4 --memory 4096 -- free -m | head -2
total used free
Mem: 4096 38 4002
$ shuru run --disk-size 2048 -- df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/vda 2.0G 18M 1.9G 1% /
$ shuru run --mount ./src:/workspace -- ls /workspace
main.py utils.py tests/
$ shuru run --mount ./src:/workspace -- sh -c 'echo "new" > /workspace/tmp && cat /workspace/tmp'
new
# Host directory is untouched. Guest writes live in a tmpfs overlay.
$ shuru checkpoint create myenv --allow-net -- sh -c 'apk add nodejs npm'
shuru: checkpoint 'myenv' saved
$ shuru run --from myenv -- node -e 'console.log("ready")'
ready
# Restore any checkpoint instantly. Branch and reuse.
$ shuru checkpoint create py --allow-net -- apk add python3
shuru: checkpoint 'py' saved
$ shuru run --from py -p 8080:8000 -- python3 -m http.server 8000
shuru: forwarding 127.0.0.1:8080 -> guest:8000
$ curl http://127.0.0.1:8080/
<!DOCTYPE HTML>...
# No --allow-net needed. Tunneled over vsock.