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.2

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.2
File Size Uploaded
project_sandbox-0.1.2.tar.gz 69.0 kB Details

Built distribution (wheel)

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

Total release size: 150.6 kB

Release files / project_sandbox-0.1.2.tar.gz

Download URL project_sandbox-0.1.2.tar.gz
Size 69.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8b57c98c2dd332283d5c09e53e8cdaeb0ecabc9ae6da39ed8a2e6ed480b7a8bb
BLAKE2b-256 checksum
How to use checksums
b7d1ddabb44f7cb1afd4b65445f0a6970e5dbacb1541b24675990ead92a665b0
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.2-py3-none-any.whl

Download URL project_sandbox-0.1.2-py3-none-any.whl
Size 81.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ee9b41dac643da36cb230f2fa1b59e8b50b537166a8722b9af6ac97265ccb48
BLAKE2b-256 checksum
How to use checksums
7971f7e46cf590a7e8ee7346daa78e70f8bd0e8e577fa0fd4501c7572777cc9b
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

0.1.3

2 release files

This release

0.1.2 This release

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