Skip to main content

sandboxctl

Safe, isolated sandboxes for using LLMs with minimal guardrails to maximize developer productivity.

Experimental. sandboxctl is under active development. Commands, configuration, and behavior may change between releases.

Features

  • Isolated sandboxes -- each sandbox runs in its own OpenShell container with a dedicated filesystem and toolchain.
  • Profile system -- define reusable sandbox configurations (repos, extensions, settings) as declarative profiles.
  • Cross-platform credentials -- OS keychain integration for GitHub and GitLab tokens on macOS and Linux.
  • Scoped Git tokens -- per-sandbox token injection so credentials never leak across projects.
  • Health checks and auto-recovery -- doctor and recover commands detect drift and repair common issues automatically.
  • Claude context management -- backup and restore Claude Code memory, settings, and projects across sandbox lifecycle.
  • Bundled skills -- ships sandbox-specific Claude Code skills (network debugging, policy linting) installed automatically during setup.
  • CLI lifecycle management -- create, open, list, backup, restore, delete, and upgrade sandboxes from a single tool.

Prerequisites

Requirement Version
Python 3.12+
NVIDIA OpenShell latest
OS macOS or Linux

Installation

Install from PyPI:

pip install sandboxctl

Or install with uv:

uv tool install sandboxctl

Optional: OpenShell SDK backend

Non-interactive gateway operations (script execution, delete) can run against the gateway through the openshell Python SDK instead of shelling out to the openshell CLI. Install the extra to enable it (falls back to the CLI automatically when unavailable):

pip install sandboxctl[sdk]

Force the legacy CLI path at any time (diagnostics/rollback):

export SANDBOXCTL_OPENSHELL_BACKEND=cli   # default: auto

For development:

git clone https://github.com/butler54/sandboxctl.git
cd sandboxctl
make dev

Quickstart

# 1. Run first-time setup (prerequisites, SSH key, credentials, providers, shell completion)
sandboxctl setup

# 2. Review and customize your config
$EDITOR "$(sandboxctl config path)"

# 3. Create a new profile skeleton
sandboxctl init my-project

# 4. Edit the profile to add repos, extensions, and settings
$EDITOR ~/.config/sandboxctl/profiles/my-project.toml

# 5. Create a sandbox from the profile
sandboxctl create --profile my-project

# 6. Open the sandbox in VS Code + Claude Code
sandboxctl open my-project

Configuration

sandboxctl uses an XDG-compliant TOML configuration file, typically located at ~/.config/sandboxctl/config.toml. Run sandboxctl config init to generate the default template:

[identity]
# user_name = "Your Name"
# user_email = "you@example.com"

[defaults]
# model = "claude-sonnet-4-20250514"
# theme = "dark"
# zoom = -1

[providers]
# provider = "anthropic"                  # "anthropic" (default) or "vertex"
# anthropic_api_key = ""                  # API key for direct Anthropic access
# vertex_project_id = ""                  # Google Cloud project (vertex only)
# vertex_region = "global"               # Vertex AI region (vertex only)

[paths]
# ssh_key = "~/.ssh/sandboxctl_ed25519"
# ca_bundle = ""

[keychain]
# github_service = "sandboxctl-github-token"
# gitlab_service = "sandboxctl-gitlab-token"

All values can also be set via environment variables with the SANDBOXCTL_ prefix (e.g., SANDBOXCTL_IDENTITY__USER_NAME).

Profiles

Profiles are TOML files under ~/.config/sandboxctl/profiles/ that describe a sandbox environment. Run sandboxctl init <name> to scaffold a new profile, then customize the generated file with your repositories, container settings, and SSH configuration.

Commands

Lifecycle

Command Description
sandboxctl create --profile <name> Create a sandbox from a profile
sandboxctl open <name> Open a sandbox (default: OpenCode resuming the most recent session; --new for a fresh session)
sandboxctl create --profile <name> Create a sandbox from a profile (optionally on a named gateway)
sandboxctl restart <name> Delete and recreate a sandbox (with data loss warning)
sandboxctl delete <name> Delete a sandbox

Inspection

Command Description
sandboxctl list List profiles and running sandboxes
sandboxctl status Show gateway and sandbox status
sandboxctl validate <name> Run validation tests inside a sandbox

Health & Recovery

Command Description
sandboxctl doctor [name] Diagnose sandbox health, credentials, and profile readiness
sandboxctl doctor --fix [name] Re-inject credentials and CA bundles into running sandboxes
sandboxctl recover [name] Recover stopped sandboxes after host reboot or podman restart

Context Management

Command Description
sandboxctl backup [name] Back up Claude context (memory, settings) from a sandbox
sandboxctl restore <name> Restore Claude context into a sandbox

Setup & Maintenance

Command Description
sandboxctl setup First-time setup: prerequisites, SSH key, credentials, providers, shell completion, bundled skills
sandboxctl upgrade Upgrade OpenShell (detects Homebrew/pip, advises gateway restart)
sandboxctl init <name> Create a new profile skeleton
sandboxctl config init Create default configuration file
sandboxctl config show Show current configuration
sandboxctl config path Print config file path
sandboxctl --version Show version and exit

Shell Completion

Shell completion is installed automatically during sandboxctl setup. To install or update manually:

sandboxctl --install-completion

Supports bash, zsh, fish, and PowerShell.

Development

This project uses uv for dependency management and ruff for linting and formatting.

make dev       # Install in dev mode with all dependencies
make lint      # Check code style (ruff check + format check)
make format    # Auto-format code
make test      # Run tests with coverage
make clean     # Remove build artifacts

Tests run with pytest and require no external services. Integration tests that need a running OpenShell instance are marked with @pytest.mark.integration and skipped by default in CI.

License

Apache-2.0

Metadata

Release files for sandboxctl 1.32.0

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

Source distribution (sdist)

Source distribution for sandboxctl 1.32.0
File Size Uploaded Provenance Actions
sandboxctl-1.32.0.tar.gz 186.8 kB With provenance Details for sandboxctl-1.32.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sandboxctl 1.32.0
File Interpreter ABI Platform Actions
sandboxctl-1.32.0-py3-none-any.whl Python 3 none any Details for sandboxctl-1.32.0-py3-none-any.whl

Total release size: 287.7 kB

Release files / sandboxctl-1.32.0.tar.gz

Download URL sandboxctl-1.32.0.tar.gz
Size 186.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a418045a784a1341cc59dee2e7884761230e783548f0910c1b23ac551344e3fc
BLAKE2b-256 checksum
How to use checksums
38579b074017179937112b9a1ff4d28d976aac39e2b47577810291f60a9ea21f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / sandboxctl-1.32.0-py3-none-any.whl

Download URL sandboxctl-1.32.0-py3-none-any.whl
Size 100.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ace9ec1f29a4abcde910c7da405cf23dd43542ac735052a84555ecff1e170e17
BLAKE2b-256 checksum
How to use checksums
9d54fe5cc5489d41909e4c200d6d7006e314b29de6e44d829ff37370fc5925dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for sandboxctl 1.32.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sandboxctl-1.32.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.32.0 This release

2 release files Full provenance

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