
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@thaodangspace/code-sandbox
Advanced tools
A robust Rust CLI tool that creates isolated Ubuntu Docker containers with development agents pre-installed. Code Sandbox provides a secure, disposable environment for running AI assistants like Claude, Gemini, Codex, and Qwen, ensuring their actions are confined to the container while maintaining a clean, reproducible workspace.
Running an agent inside an isolated container provides several benefits:
csb-{agent}-{dir}-{branch}-{yymmddhhmm})codesandbox --continue# Add the tap (replace with actual repository URL)
brew tap your-username/codesandbox
# Install codesandbox
brew install codesandbox
# Clone the repository
git clone https://github.com/your-org/code-sandbox.git
cd code-sandbox
# Build the release binary
cargo build --release
# Install globally (optional)
sudo cp target/release/codesandbox /usr/local/bin/
# Install directly from the local repository
cargo install --path .
# Or install from crates.io (when published)
cargo install codesandbox
Visit the Releases page to download pre-built binaries for your platform.
npm install -g @thaodangspace/code-sandbox
This compiles the CLI using Rust and exposes a codesandbox command via npm.
Navigate to your project directory and run:
codesandbox
This command will:
/workspace in the container.claude from ~/.claude)# Use Qwen instead of Claude
codesandbox --agent qwen
# Use Gemini
codesandbox --agent gemini
# Add a read-only reference directory
codesandbox --add_dir /path/to/reference/repo
# Resume the last container from this directory
codesandbox --continue
# List all containers and optionally attach
codesandbox ls
# Create and use a git worktree for isolated branch work
codesandbox --worktree feature-branch
To open the browser-based terminal instead of attaching in your CLI:
codesandbox --web
Set it as the default via ~/.config/codesandbox/settings.json:
{
"web": true
}
When web mode is enabled, codesandbox will start the local server if needed, open http://localhost:6789, and auto-run your selected agent in the browser terminal.
After the container is created, you can connect to it using:
docker exec -it <container-name> /bin/bash
The container name will be displayed when codesandbox runs.
List all sandbox containers created from the current directory and optionally attach to one:
codesandbox ls
You will be shown a numbered list of containers. Enter a number to attach or press Enter to cancel.
This repository includes an optional HTTP server that reports file changes inside a running sandbox container.
Start the server:
codesandbox serve
Run it as a background daemon:
codesandbox serve -d
Stop the server:
codesandbox stop
Restart the server (optionally in the background):
codesandbox restart
codesandbox restart -d
The server listens on port 6789. Query the changes for a specific container:
curl http://localhost:6789/api/changed/<container-name>
The response lists changed files along with their git status and diff contents.
ubuntu with sudo privileges/workspace (your mounted folder)The tool automatically detects and mounts your Claude configuration from:
~/.claude (standard location)$XDG_CONFIG_HOME/claude (XDG standard)Additional behavior can be configured via settings.json located at
~/.config/codesandbox/settings.json. Example:
{
"auto_remove_minutes": 30,
"skip_permission_flags": {
"claude": "--dangerously-skip-permissions",
"gemini": "--yolo",
"qwen": "--yolo"
},
"env_files": [".env", ".env.local"]
}
The skip_permission_flags map assigns a permission-skipping flag to each
agent. When launching an agent, the corresponding flag is appended to the
command.
Environment files listed in env_files that exist in the project directory are
masked from the container by overlaying them with empty temporary files,
keeping sensitive data on the host.
To start a container without launching an agent and open a shell:
codesandbox --shell
To remove all containers created from the current directory:
codesandbox --cleanup
To remove the built image:
docker rmi codesandbox-image
docker groupdocker exec -it <container> <agent>We welcome contributions to Code Sandbox! Here's how you can help:
git clone https://github.com/thaodangspace/code-sandbox.git
cd code-sandbox
main:
git checkout -b feature/your-feature-name
Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install dependencies and build:
cargo build
Run tests:
cargo test
cargo fmt and cargo clippyPush your changes to your fork:
git push origin feature/your-feature-name
Create a Pull Request with:
cargo fmt before committingcargo clippy passes without warningsWhen reporting bugs, please include:
rustc --version)For new features:
Thank you for contributing to Code Sandbox!
This project is licensed under the MIT License - see the LICENSE file for details.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Made with ❤️ by the Code Sandbox contributors
FAQs
Code Sandbox CLI packaged for npm
We found that @thaodangspace/code-sandbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.