Skip to main content

Run Claude Code in Docker sandboxes with team configs and git worktree support

Project description

SCC - Sandboxed Claude CLI

PyPI Python License: MIT Contributions Welcome

Quick Start · Commands · CLI Reference · Configuration · Architecture


Run Claude Code (Anthropic's AI coding CLI) in Docker sandboxes with organization-managed team profiles and git worktree support.

SCC isolates AI execution in containers, enforces branch safety, and prevents destructive git commands. Organizations distribute plugins through a central config—developers get standardized setups without manual configuration.

Plugin Marketplace: Extend Claude with the official plugin marketplace. Start with scc-safety-net to block destructive git commands like push --force.

30-Second Guide

Requires: Python 3.10+, Docker Desktop 4.50+, Git 2.30+

pip install scc-cli      # Install
scc setup                # Configure (paste your org URL, pick your team)
cd ~/project && scc      # Auto-detect workspace and launch (or scc start ~/project)

Run scc doctor to verify your environment or troubleshoot issues.

Smart Start Flow

When you run scc or scc start:

  • Auto-detects workspace from git repository root or .scc.yaml location
  • Shows Quick Resume if you have recent sessions for this workspace
  • Prints brief context (workspace root, entry directory, team) before launching
  • Safety guard: Won't auto-launch from suspicious directories (home, /tmp). Explicit paths like scc start ~/ prompt for confirmation

Keyboard shortcuts in interactive mode:

  • Enter — Select/resume session
  • n — Start new session
  • Esc — Go back
  • q — Quit

Find Your Path

You are... Start here
Developer joining a team Developer Onboarding — what you get automatically
Team Lead setting up your team Team Setup — manage plugins in your own repo
Org Admin configuring security Organization Setup — control what's allowed org-wide
Exploring plugins Plugin Marketplace — official plugins & safety tools

Developer Onboarding

New to a team? After running scc setup and scc start, you get:

  • Your team's approved plugins and MCP servers — pre-configured and ready
  • Organization security policies — applied automatically, no action needed
  • Command guardrails — block destructive git commands like push --force (when scc-safety-net plugin is enabled)
  • Isolated git worktrees — your main branch stays clean while Claude experiments

What you never need to do:

  • Edit config files manually
  • Download or configure plugins
  • Worry about security settings

Your org admin and team lead handle the configuration. You just code.


Who Controls What

Setting Org Admin Team Lead Developer
Block dangerous plugins/servers Sets ❌ Cannot override ❌ Cannot override
Default plugins for all teams Sets
Team-specific plugins ✅ Approves Chooses
Project-local config (.scc.yaml) ✅ Can restrict ✅ Can restrict Extends
Safety-net policy (block/warn) Sets ❌ Cannot override ❌ Cannot override

Organization security blocks cannot be overridden by teams or developers.

"Approves" = teams can only select from org-allowed marketplaces; blocks always apply. "Extends" = can add plugins/settings, cannot remove org defaults.


Organization Setup

Org admins create a single JSON config that controls security for all teams:

{
  "schema_version": "1.0.0",
  "organization": { "name": "Acme Corp", "id": "acme" },
  "marketplaces": {
    "sandboxed-code-official": {
      "source": "github",
      "owner": "CCimen",
      "repo": "sandboxed-code-plugins"
    }
  },
  "security": {
    "blocked_plugins": ["*malicious*"],
    "blocked_mcp_servers": ["*.untrusted.com"],
    "safety_net": { "action": "block" }
  },
  "defaults": {
    "allowed_plugins": ["*"],
    "network_policy": "unrestricted"
  },
  "profiles": {
    "backend": { "additional_plugins": ["scc-safety-net@sandboxed-code-official"] },
    "frontend": { "additional_plugins": ["scc-safety-net@sandboxed-code-official"] }
  }
}

Host this anywhere: GitHub, GitLab, S3, or any HTTPS URL. Private repos work with token auth.

See examples/ for complete org configs and GOVERNANCE.md for delegation rules.


Team Setup

Teams can manage their plugins two ways:

Option A: Inline (simple) — Team config lives in the org config file.

"profiles": {
  "backend": {
    "additional_plugins": ["scc-safety-net@sandboxed-code-official"]
  }
}

Option B: Team Repo (GitOps) — Team maintains their own config repo.

"profiles": {
  "backend": {
    "config_source": {
      "source": "github",
      "owner": "acme",
      "repo": "backend-team-scc-config"
    }
  }
}

With Option B, team leads can update plugins via PRs to their own repo—no org admin approval needed for allowed additions.

Config precedence: Org defaults → Team profile → Project .scc.yaml (additive merge; blocks apply after merge).


Commands

Essential Commands

Command Description
scc Smart start: auto-detect workspace, show Quick Resume, or launch
scc setup Configure organization connection
scc doctor Check system health and diagnose issues
scc stop Stop running sandbox(es)

Session & Team

Command Description
scc start --resume Resume most recent session
scc start --select Pick from recent sessions
scc team switch Switch to a different team profile
scc sessions List recent sessions

Worktrees

Command Description
scc worktree create <repo> <name> Create git worktree for parallel development
scc worktree enter [target] Enter worktree in subshell (no shell config needed)
scc worktree list -v List worktrees with git status

Governance & Admin

Command Description
scc config explain Show effective config with sources
scc exceptions list View active exceptions
scc audit plugins Audit installed plugins
scc support bundle Generate support bundle for troubleshooting

Run scc <command> --help for options. See CLI Reference for the complete command list (40+ commands).

Git Worktrees

Primary method (no shell config needed):

scc worktree enter feature-auth   # Opens a subshell in the worktree
# Type 'exit' to return to your previous directory

Power users: Add this shell wrapper for seamless cd switching:

# Add to ~/.bashrc or ~/.zshrc
wt() {
  local p
  p="$(scc worktree switch "$@")" || return $?
  cd "$p" || return 1
}

Usage examples (both methods):

scc worktree enter ^        # Enter main branch worktree
scc worktree enter -        # Enter previous worktree (like cd -)
wt feature-auth             # Switch with shell wrapper
wt scc/feature-x            # Match by full branch name

Note: Branch names with / are sanitized to - (e.g., feature/authfeature-auth).

Status indicators in list -v:

Symbol Meaning
+N N staged files
!N N modified files
?N N untracked files
. Clean worktree
Status timed out

Cleanup stale entries:

scc worktree prune -n   # Dry-run: show what would be pruned
scc worktree prune      # Actually prune stale entries

Configuration

Setup Modes

Organization mode (recommended):

scc setup
# Enter URL when prompted: https://gitlab.example.org/devops/scc-config.json

Standalone mode (no org config):

scc setup --standalone

Project Config

Add .scc.yaml to your repository root for project-specific settings:

additional_plugins:
  - "project-linter@internal"

session:
  timeout_hours: 4

File Locations

~/.config/scc/config.json    # Org URL, team, preferences
~/.cache/scc/                # Cache (safe to delete)
<repo>/.scc.yaml             # Project-specific config

Troubleshooting

Run scc doctor to diagnose issues.

Problem Solution
Docker not reachable Start Docker Desktop
Organization config fetch failed Check URL and token
Plugin blocked Check scc config explain for security blocks

See TROUBLESHOOTING.md for more solutions.


Documentation


Automation & CI

SCC supports non-interactive operation for CI/CD pipelines and scripting.

# CI pipeline example
scc start --non-interactive --team backend ~/project

# Preview configuration as JSON
scc start --dry-run --json

# Full automation mode
scc start --dry-run --json --non-interactive ~/project

Key flags:

  • --non-interactive — Fail fast instead of prompting
  • --json — Machine-readable output with standardized envelope
  • --dry-run — Preview configuration without launching

Exit codes: 0 (success), 2 (usage error), 3 (config error), 4 (tool error), 5 (prerequisites), 6 (governance block), 130 (cancelled)

See CLI Reference → Exit Codes for complete documentation.


Development

uv sync              # Install dependencies
uv run pytest        # Run tests
uv run ruff check    # Run linter

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scc_cli-1.5.2.tar.gz (620.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scc_cli-1.5.2-py3-none-any.whl (391.3 kB view details)

Uploaded Python 3

File details

Details for the file scc_cli-1.5.2.tar.gz.

File metadata

  • Download URL: scc_cli-1.5.2.tar.gz
  • Upload date:
  • Size: 620.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for scc_cli-1.5.2.tar.gz
Algorithm Hash digest
SHA256 3934af7f3e76542d797439f5ede394ccc8c2319dbb86fee1ebc4155451158ecb
MD5 08a1e8fc42389b288f1ace34aa15a047
BLAKE2b-256 60190827aa58a78c3b15775c5143cdfc1779381098175e64ecf7dc3d0b27d687

See more details on using hashes here.

Provenance

The following attestation bundles were made for scc_cli-1.5.2.tar.gz:

Publisher: python-publish.yml on CCimen/scc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scc_cli-1.5.2-py3-none-any.whl.

File metadata

  • Download URL: scc_cli-1.5.2-py3-none-any.whl
  • Upload date:
  • Size: 391.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for scc_cli-1.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e5210b65fcfc3fa9578d5c285d9adba3d34aa42329a735032f81e6f02ae70c64
MD5 186f871c8f8ec718352856ffc1f2a15b
BLAKE2b-256 444cf1678706929f99a53b137eef25dd4cd1cdf57dc49e642798d7aa77648b7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scc_cli-1.5.2-py3-none-any.whl:

Publisher: python-publish.yml on CCimen/scc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page