by kevinMEH
Safely run OpenCode, Codex, Claude Code with full permissions.
# Add to your Claude Code skills
git clone https://github.com/kevinMEH/code-containercontainer is available as a NPM package. To install, simply run:
npm install -g code-container
Then run the following to copy all your AI harness configs from ~/ to ~/.code-container/configs for mounting onto the container.
container init
Alternatively, you can copy configs manually:
~/.config/opencode → ~/.code-container/configs/.opencode~/.codex → ~/.code-container/configs/.codex~/.claude → ~/.code-container/configs/.claude~/.claude.json → ~/.code-container/configs/.claude.json~/.gemini → ~/.code-container/configs/.geminiFinally, build the Docker image. This may take up to 5 minutes.
container build
You're done 🎉; container is now ready to use.
No comments yet. Be the first to share your thoughts!
container.sh[!Note] Are you still on the shell script version of
container? Migrate to the NPM package by running the following:# Exit all containers & save important work... npm install -g code-container bash scripts/migrate.sh # Migrate configs over to ~/.code-container/configs bash scripts/cleanup.sh # Optional: Cleanup config files container buildNote: Ensure that all work is saved and the container is ready for deletion. Containers from the previous version are not compatible with containers from the current version.
Navigate to any project and run container to mount project and enter container.
cd /path/to/your/project
container # Enter container
Inside the container: Start your harness and develop like normal.
opencode # Start OpenCode
npm install <package> # Persists per container
# ...
Container state is saved. Next invocation resumes where you left off. AI conversations and settings persist across all projects.
container # Enter the container
container run /path/to # Enter container for specific project
container list # List all containers
container stop # Stop current project's container
container remove # Remove current project's container
container build # Build Docker image
container clean # Remove all stopped containers
container init # Copy/recopy config files
Don't want to configure manually? Clone this repo and ask your harness to configure for you.
Please confi...