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

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 in VS Code, Claude Code, or shell
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

Release files for sandboxctl 1.19.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 sandboxctl 1.19.1
File Size Uploaded
sandboxctl-1.19.1.tar.gz 123.5 kB Details

Built distribution (wheel)

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

Total release size: 193.6 kB

Release files / sandboxctl-1.19.1.tar.gz

Download URL sandboxctl-1.19.1.tar.gz
Size 123.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8db6967fdc5f753e862a1141d373ab7924a1030fbe938ab9d7b1715546ddbba1
BLAKE2b-256 checksum
How to use checksums
8de37a1b34d6b0fc7c3d4e3360741c033b3486ffbc9d39eef3256de3370e9381
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 31, 2026.

Transparency log

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

Download URL sandboxctl-1.19.1-py3-none-any.whl
Size 70.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6be7bcc080d339cefd3be580adbeeb6e112b78f9b35a58342fb6bd75275e8746
BLAKE2b-256 checksum
How to use checksums
bac80a8205b70792e271fcb4492ffec7e89ccb6ffb253ab37723db8a9f89a89a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

1.25.0

2 release files

1.24.0

2 release files

1.23.0

2 release files

1.22.1

2 release files

1.22.0

2 release files

This release

1.19.1 This release

2 release files

1.19.0

2 release files

1.18.0

2 release files

1.17.0

2 release files

1.16.0

2 release files

1.15.2

2 release files

1.15.1

2 release files

1.15.0

2 release files

1.14.2

2 release files

1.14.1

2 release files

1.14.0

2 release files

1.13.7

2 release files

1.13.5

2 release files

1.13.4

2 release files

1.13.3

2 release files

1.13.2

2 release files

1.13.1

2 release files

1.13.0

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

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