Skip to main content

project-sandbox

PyPI

project-sandbox runs Claude Code, Codex CLI, OpenCode, Pi, or a plain Bash shell inside per-project Linux containers. On macOS, direct CLI runs default to Apple's container runtime, where each container runs in its own VM. On Linux, direct CLI runs support Docker or Podman.

⚠️ Created with the help of AI.
🚧 Experimental work in progress
‼️ Use at your own risk.

Main features

Many sandboxes exist - this is the one with a feature-set / configureable agency-boundary that I was comfortable with in the end:

  • Strong isolation - on OSX with Apple Container VMs. Custom Dockerfile support (as long as it's based on Debian)
  • Agent config glue: Forward host credentials / agent subscriptions into containers selectively, update settings to bypass permissions inside the container.
  • Devcontainer support: Creates a matched devcontainer config for editor support (weaker isolation but integrated workflow).
  • Unsupervised job runs - submit batch jobs.
  • Network access restrictions: restrict to allowed domains, (somewhat) hardened firewall script.
  • git/jj integration: Managed execution with worktrees / workspaces. No credentials to push inside containers.
  • pinned dependencies: pre-install agents & extra tools into the image, manual upversioning.
  • Simple workflow (in my view).
  • Minimal dependencies (jinja2)

Quick Start

Install from PyPI:

uv tool install project-sandbox
project-sandbox --help

Or run directly from PyPI without installing:

uvx project-sandbox --help
uvx project-sandbox /absolute/path/to/repo python:3.12-slim

From a source checkout:

uv sync
uv run project-sandbox --help

Generate sandbox files for a project:

project-sandbox /absolute/path/to/repo python:3.12-slim

Preview every action without writing files or starting a runtime:

project-sandbox --dry-run /absolute/path/to/repo python:3.12-slim

Start an agent in the sandbox:

project-sandbox --agent codex /absolute/path/to/repo python:3.12-slim

Build on top of an existing project Dockerfile:

project-sandbox /absolute/path/to/repo --dockerfile /absolute/path/to/repo/Dockerfile

Documentation

License

MIT. See LICENSE.

Metadata

Release files for project-sandbox 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for project-sandbox 0.1.3
File Size Uploaded
project_sandbox-0.1.3.tar.gz 81.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for project-sandbox 0.1.3
File Interpreter ABI Platform
project_sandbox-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 176.3 kB

Release files / project_sandbox-0.1.3.tar.gz

Download URL project_sandbox-0.1.3.tar.gz
Size 81.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4ee46b2c819dc478f2620635ad7c7566271b40219768034b92c0aa5476d597e5
BLAKE2b-256 checksum
How to use checksums
36c1f01003c22d86a69e42299cd673a0b75e4a6d33d52efec5f08de50efbecd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / project_sandbox-0.1.3-py3-none-any.whl

Download URL project_sandbox-0.1.3-py3-none-any.whl
Size 95.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac9314b5becec4bef6ffd6c2de6c84129bf9d0bf5915fc7cc071e1f6aa6e52a1
BLAKE2b-256 checksum
How to use checksums
bd1a36a44567c4e27bccaf3dc1436a62eefd6d813c49993857be27f576ba64ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page