class LittleGhost::UnrestrictedSandbox

UnrestrictedSandbox is a convenient host-backed sandbox for trusted local work. It offers bounded text-file operations and command execution using only Ruby’s standard library.

workspace = LittleGhost::Workspace.new(root: Dir.pwd)
sandbox = LittleGhost::UnrestrictedSandbox.new(workspace:)
sandbox.read("README.md").lines.first # => "# LittleGhost\n"

Reads return valid UTF-8 text. Writes preserve the supplied String bytes. Paths must be relative, may not contain .., and are checked against the configured workspace root.

Security and trust

This sandbox is not a security boundary. Commands run directly on the host with the Ruby process’s permissions, and filesystem containment cannot defend against concurrent adversarial mutation. Use an isolated Sandbox implementation for untrusted work.