Documentation
¶
Overview ¶
Package sandbox implements `monolith sandbox`: run a repo's commands in a lith, isolated from the Mac, the way a virtualenv scopes a project.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "sandbox", Aliases: []string{"sbx"}, Short: "Run a repo's commands in an isolated lith", Long: `Run code you don't trust in a lith, scoped to one repo, like a virtualenv. cd some-repo monolith sandbox activate # a shell inside the sandbox, at the repo npm install && npm test # runs in the lith, not on your Mac deactivate # back on the Mac; the sandbox pauses to disk monolith sandbox diff # what the code changed monolith sandbox apply PATH # copy chosen changes back to the Mac Each repo (its git root, else the current directory) gets its own VM. Only the repo is shared, read-only; writes land in a layer inside the VM, so your files change only when you apply them. Nothing else from the Mac is visible: no home directory, keys, environment or agent. By default the shell can reach the internet but not your Mac or local network (--network). Commands run in a container (--image, or the repo's .devcontainer, else ` + defaultImage + `). The network policy limits where the code can connect, not what it sends: with internet access, code can upload anything inside the sandbox, including the repo. Use --network none or an allowlist for code you suspect.`, }
Cmd is the parent command for repo sandboxes.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.