claude-code-sandbox  by textcortex

Secure local sandbox for autonomous AI code execution

Created 7 months ago
254 stars

Top 99.1% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project addresses the challenge of enabling autonomous AI agentic workflows for code execution, specifically for Claude Code. It targets developers and researchers seeking to leverage AI for complex coding tasks without constant user intervention. The primary benefit is a locally controlled, autonomous development assistant that can execute commands, make code changes, and manage Git operations safely within isolated Docker containers.

How It Works

The core approach involves running Claude Code within isolated Docker or Podman containers, leveraging the --dangerously-skip-permissions flag to allow instant command execution without user prompts. The system automatically creates a new Git branch for each session, monitors commits made by Claude, and provides an interactive review interface. It securely forwards necessary credentials and facilitates push/PR creation workflows, creating a safe, autonomous development environment.

Quick Start & Requirements

  • Installation: Install globally via npm: npm install -g @textcortex/claude-code-sandbox
  • Prerequisites: Node.js >= 18.0.0, Docker or Podman, Git, Claude Code (npm install -g @anthropic-ai/claude-code@latest).
  • Links: TODO.md for roadmap, dev@textcortex.com for inquiries.

Highlighted Details

  • Autonomous Agent Execution: Enables Claude Code to run autonomously within Docker containers, executing commands instantly without permission prompts.
  • Secure Isolation: Uses Docker/Podman containers with read-only credential mounts and file copying for true isolation, preventing host system contamination.
  • Interactive Workflow: Provides a browser-based terminal (http://localhost:3456) for monitoring and interaction, with real-time diffs and commit review before pushing.
  • Credential Forwarding: Automatically discovers and forwards Anthropic API keys, GitHub credentials, AWS/Google Cloud credentials, and Git configurations.
  • Podman Support: Offers seamless integration with Podman as an alternative to Docker.

Maintenance & Community

  • Contact: Email dev@textcortex.com for inquiries.
  • Roadmap: Check TODO.md for project roadmap.
  • Development: Instructions for building from source and contributing are provided, including scripts for build, test, and linting.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: The MIT license generally permits commercial use and integration with closed-source projects.

Limitations & Caveats

This project is explicitly marked as "alpha" and may contain security vulnerabilities; users should exercise caution. It relies on the --dangerously-skip-permissions flag for Claude Code, which bypasses standard safety checks, although this is mitigated by containerization. Troubleshooting documentation addresses potential issues with installation, Docker permissions, and credential discovery.

Health Check
Last Commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
27 stars in the last 30 days

Explore Similar Projects

Starred by Mckay Wrigley Mckay Wrigley(Founder of Takeoff AI), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
23 more.

E2B by e2b-dev

0.9%
10k
Open-source cloud runtime for AI apps and agents
Created 2 years ago
Updated 1 day ago
Feedback? Help us improve.