Skip to main content

project-sandbox

PyPI

Container/microVM sandbox for coding agents — supervised or headless sessions, credential & network isolation, git/jj workspace integration: 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.2.1

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.2.1
File Size Uploaded
project_sandbox-0.2.1.tar.gz 88.6 kB Details

Built distribution (wheel)

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

Total release size: 192.6 kB

Release files / project_sandbox-0.2.1.tar.gz

Download URL project_sandbox-0.2.1.tar.gz
Size 88.6 kB
Tags Source
SHA-256 checksum
How to use checksums
81f796e28439bc111a91a4adf38e568ad3ac98545942710bd00616a8b6e2b22c
BLAKE2b-256 checksum
How to use checksums
a5ba83099817df58e5001f3c97ea90d24a2aa417439e57d870d85c35fd161dd8
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.2.1-py3-none-any.whl

Download URL project_sandbox-0.2.1-py3-none-any.whl
Size 104.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2ad45c487ce2f9507d0e5dcd0db6132be2d1906b927e89685d497cd85aeeb2c
BLAKE2b-256 checksum
How to use checksums
e3a065fd21f456998a856b1a647d9c4f1ba2d08120995ac813302dce320d7540
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

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

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