A Docker-based development environment that runs Claude Code and development tools in isolation, accessible via VS Code/Cursor.
Running Claude Code directly on your host machine gives AI unrestricted system access. This container provides:
- Security: Claude Code runs isolated from your host system
- Consistency: Linux environment for all npm packages and builds
- Integration: Full VS Code/Cursor support with remote development
- Docker Desktop
- Node.js 18+
- VS Code/Cursor with Dev Containers extension
# Clone repository
git clone <your-repo-url> devvy-container
cd devvy-container
# Install CLI
npm install
npm run compile
# Run setup wizard
./devvy setupThe setup wizard will:
- Collect your configuration (GitHub token, etc.)
- Generate SSH keys for container access
- Build the Docker image
- Start the container
devvy setup # Initial setup wizard
devvy start # Start container
devvy stop # Stop container
devvy connect # SSH into container
devvy cursor # Launch Cursor attached to container (as devvy user)
devvy vscode # Launch VS Code attached to container (as devvy user)
devvy status # Check container status
devvy logs # View container logs
devvy rebuild # Rebuild container (preserves data)
# Options: --no-cache, --force, --accept-all
devvy cleanup # Clean up Docker resourcesThe devvy rebuild command supports the following options:
--no-cache- Rebuild without using Docker's build cache--force- Force rebuild even if container is currently running--accept-all- Accept all prompts automatically (answer yes to all questions)
Example usage:
# Quick rebuild accepting all prompts
devvy rebuild --accept-all
# Force rebuild with fresh build (no cache)
devvy rebuild --force --no-cache --accept-all# Launch Cursor and automatically attach as 'devvy' user
devvy cursor
# Launch VS Code and automatically attach as 'devvy' user
devvy vscode
# Open a specific folder
devvy cursor --folder /home/devvy/projects
devvy vscode --folder /home/devvy/projectsThis command:
- Configures Cursor/VS Code to connect as the
devvyuser (not root) - Opens the correct home directory (
/home/devvy) - Ensures proper shell and terminal configuration
- Start the container:
devvy start - Open VS Code/Cursor
- Press
Cmd+Shift+Pβ "Dev Containers: Attach to Running Container" - Select
devvy-container
Note: The container includes a .devcontainer/devcontainer.json that automatically configures VS Code to connect as the devvy user.
devvy-container/
βββ src/ # TypeScript CLI source
β βββ commands/ # CLI command implementations
β βββ services/ # Business logic
β βββ config/ # Configuration management
βββ container-scripts/# Container initialization scripts
βββ secrets/ # SSH keys (git-ignored)
β βββ host_rsa # Private key on local machine for SSH access to the container
β βββ host_rsa.pub # Public key
β βββ authorized_keys # Container's authorized keys
βββ .env # Configuration (created during setup)
The .env file (created during setup) contains:
# User/Group IDs
HOST_UID=1000
HOST_GID=1000
# Git configuration
GIT_USER_NAME="Your Name"
GIT_USER_EMAIL="[email protected]"
# Project path
PROJECTS_PATH=/Users/you/repos
# Optional services
GITHUB_TOKEN=ghp_...Your projects are mounted at:
- Host:
~/repos/(or your configured path) - Container:
/home/devvy/repos/
# β
CORRECT - Inside container
devvy connect
cd ~/repos/your-project
npm install
npm run dev
# β WRONG - On host machine
cd ~/repos/your-project
npm install # This creates macOS binaries that won't work in Linux container# Connect via SSH
ssh -p 2222 devvy@localhost -i ./secrets/host_rsa
# Or use the CLI (recommended)
devvy connect| Port | Purpose |
|---|---|
| 2222 | SSH access |
| 3000-3003 | Development servers |
| 60000-60010 | Mosh (UDP) |
devvy status # Check current state
devvy logs # View error logs
devvy rebuild # Rebuild if neededEnsure your user/group IDs are correct:
id -u # Should match HOST_UID in .env
id -g # Should match HOST_GID in .env- Ensure container is running:
devvy status - Check Docker Desktop is running
- Try:
devvy stop && devvy start
The rebuild command handles SSH known_hosts automatically. If issues persist:
ssh-keygen -R "[localhost]:2222"
devvy connect # Will prompt to verify new host key# Run quality checks
npm run quality # TypeScript + linting
npm run format # Auto-format code
# Build CLI
npm run build # Compile TypeScript
npm run compile # Build + make executable
# Development mode
npm run dev # Run with hot reloadMIT