sandbox

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 27 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL