# Loginmoru auth login# Run a command and get destroyed automaticallymoru sandbox run base echo 'hello world!'# List sandboxesmoru sandbox list# View logsmoru sandbox logs <id>
# Create a sandboxmoru sandbox create base# Run a command insidemoru sandbox exec <id> 'sh -c "echo Hello Moru > /tmp/note.txt"'# Run another commandmoru sandbox exec <id> cat /tmp/note.txt# Kill when donemoru sandbox kill <id>
from moru import Sandbox# Create a sandbox using the 'base' template (default)sandbox = Sandbox.create()print(f"Sandbox created: {sandbox.sandbox_id}")# Run a commandresult = sandbox.commands.run("echo 'Hello from Moru!'")print(f"Output: {result.stdout}")# Clean upsandbox.kill()
With custom templates, you can build your own VM snapshot with your own agent pre-installed. See the Maru agent example and the templates documentation for more information.