sandboxbox 2.0.4 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,242 +1,242 @@
1
- # SandboxBox
2
-
3
- **Cross-platform container runner with Claude Code and Playwright support**
4
-
5
- Run your projects in isolated containers using Podman. Works on **Windows, macOS, and Linux**.
6
-
7
- ## Installation
8
-
9
- No installation required! **Podman binaries auto-download** on first use:
10
-
11
- ```bash
12
- npx sandboxbox build
13
- npx sandboxbox run ./my-project
14
- ```
15
-
16
- ### Auto-Download Feature
17
-
18
- SandboxBox automatically downloads portable Podman binaries when you run it:
19
- - ✅ **Windows** - Downloads podman.exe (v4.9.3)
20
- - ✅ **macOS** - Downloads podman remote client
21
- - ✅ **Linux** - Downloads static podman binary
22
-
23
- Just like sqlite or Playwright, no manual installation needed!
24
-
25
- ### Manual Installation (Optional)
26
-
27
- If you prefer to install Podman system-wide:
28
-
29
- **Windows:**
30
- ```powershell
31
- winget install RedHat.Podman
32
- ```
33
-
34
- **macOS:**
35
- ```bash
36
- brew install podman
37
- podman machine init
38
- podman machine start
39
- ```
40
-
41
- **Linux:**
42
- ```bash
43
- sudo apt-get install podman # Ubuntu/Debian
44
- sudo dnf install podman # Fedora
45
- sudo apk add podman # Alpine
46
- ```
47
-
48
- ## Quick Start
49
-
50
- ### 1. Build Container
51
-
52
- ```bash
53
- npx sandboxbox build
54
- ```
55
-
56
- This builds a container with:
57
- - Node.js v22
58
- - Claude Code CLI
59
- - Playwright with all browser dependencies
60
- - Git, npm, and essential build tools
61
-
62
- ### 2. Run Your Project
63
-
64
- ```bash
65
- # Run with default shell
66
- npx sandboxbox run ./my-project
67
-
68
- # Run custom command
69
- npx sandboxbox run ./my-project "npm test"
70
-
71
- # Run Claude Code
72
- npx sandboxbox run ./my-project "claude --help"
73
-
74
- # Run Playwright tests
75
- npx sandboxbox run ./my-project "npx playwright test"
76
- ```
77
-
78
- ### 3. Interactive Shell
79
-
80
- ```bash
81
- npx sandboxbox shell ./my-project
82
- ```
83
-
84
- ## Features
85
-
86
- ### 🌍 Cross-Platform
87
- - **Windows** - Full support with Podman Desktop
88
- - **macOS** - Works with Podman machine
89
- - **Linux** - Native Podman support
90
-
91
- ### 🔒 Isolation
92
- - Complete container isolation
93
- - Your host system stays clean
94
- - Workspace mounted at `/workspace`
95
-
96
- ### 🚀 Pre-installed Tools
97
- - **Node.js v22**
98
- - **Claude Code CLI** - AI-powered development
99
- - **Playwright** - Browser automation with all dependencies
100
- - **Git** - Version control
101
- - **npm** - Package management
102
-
103
- ### 📦 NPX-First Design
104
- - No global installation needed
105
- - Single command execution
106
- - Works with any project directory
107
-
108
- ## Commands
109
-
110
- ```bash
111
- # Build container from Dockerfile
112
- npx sandboxbox build
113
- npx sandboxbox build ./Dockerfile.custom
114
-
115
- # Run project in container
116
- npx sandboxbox run <project-dir> [command]
117
-
118
- # Interactive shell
119
- npx sandboxbox shell <project-dir>
120
-
121
- # Show version
122
- npx sandboxbox version
123
- ```
124
-
125
- ## How It Works
126
-
127
- 1. **Builds** a container image from the Dockerfile using Podman
128
- 2. **Mounts** your project directory to `/workspace` in the container
129
- 3. **Runs** your command in the isolated container environment
130
- 4. **Removes** the container automatically when done
131
-
132
- ```
133
- Your Project Container
134
- ./my-project ━━━━━> /workspace
135
- (host) (isolated)
136
- ```
137
-
138
- ## Use Cases
139
-
140
- ### Run Claude Code
141
- ```bash
142
- npx sandboxbox run ./my-app "claude --version"
143
- npx sandboxbox run ./my-app "claude code review lib/"
144
- ```
145
-
146
- ### Run Playwright Tests
147
- ```bash
148
- npx sandboxbox run ./my-app "npx playwright test"
149
- npx sandboxbox run ./my-app "npx playwright test --headed"
150
- ```
151
-
152
- ### Development Workflow
153
- ```bash
154
- # Build once
155
- npx sandboxbox build
156
-
157
- # Interactive development
158
- npx sandboxbox shell ./my-app
159
-
160
- # Inside container:
161
- npm install
162
- npm test
163
- git commit -am "Update"
164
- exit
165
- ```
166
-
167
- ### Run npm Scripts
168
- ```bash
169
- npx sandboxbox run ./my-app "npm run build"
170
- npx sandboxbox run ./my-app "npm run lint"
171
- npx sandboxbox run ./my-app "npm run test:e2e"
172
- ```
173
-
174
- ## Custom Dockerfile
175
-
176
- Create your own `Dockerfile`:
177
-
178
- ```dockerfile
179
- FROM node:22-alpine
180
-
181
- # Install system dependencies
182
- RUN apk add --no-cache git bash curl
183
-
184
- # Install global packages
185
- RUN npm install -g @anthropic-ai/claude-code @playwright/test
186
-
187
- # Install Playwright browsers
188
- RUN npx playwright install --with-deps chromium
189
-
190
- WORKDIR /workspace
191
-
192
- CMD ["/bin/bash"]
193
- ```
194
-
195
- Then build:
196
- ```bash
197
- npx sandboxbox build ./Dockerfile
198
- ```
199
-
200
- ## Requirements
201
-
202
- - **Podman** (https://podman.io/getting-started/installation)
203
- - **Node.js 16+** (for running npx)
204
-
205
- ## Project Structure
206
-
207
- ```
208
- sandboxbox/
209
- ├── cli.js # Main CLI - Podman integration
210
- ├── Dockerfile # Container definition
211
- ├── package.json # NPM package config
212
- └── README.md # This file
213
- ```
214
-
215
- ## Why Podman?
216
-
217
- - ✅ **Cross-platform** - Works on Windows, macOS, Linux
218
- - ✅ **Rootless** - No daemon, runs as regular user
219
- - ✅ **Docker-compatible** - Uses OCI standard containers
220
- - ✅ **Secure** - Better security model than Docker
221
- - ✅ **Fast** - Lightweight and efficient
222
-
223
- ## Differences from v1.x
224
-
225
- **v1.x (bubblewrap):**
226
- - Linux-only
227
- - Required bubblewrap installation
228
- - Direct process isolation
229
-
230
- **v2.x (Podman):**
231
- - Cross-platform (Windows/macOS/Linux)
232
- - Uses Podman containers
233
- - OCI-standard container images
234
- - More portable and widely supported
235
-
236
- ## License
237
-
238
- MIT
239
-
240
- ## Contributing
241
-
242
- Contributions welcome! This project focuses on cross-platform container execution with Claude Code and Playwright support using Podman.
1
+ # SandboxBox
2
+
3
+ **Cross-platform container runner with Claude Code and Playwright support**
4
+
5
+ Run your projects in isolated containers using Podman. Works on **Windows, macOS, and Linux**.
6
+
7
+ ## Installation
8
+
9
+ No installation required! **Podman binaries auto-download** on first use:
10
+
11
+ ```bash
12
+ npx sandboxbox build
13
+ npx sandboxbox run ./my-project
14
+ ```
15
+
16
+ ### Auto-Download Feature
17
+
18
+ SandboxBox automatically downloads portable Podman binaries when you run it:
19
+ - ✅ **Windows** - Downloads podman.exe (v4.9.3)
20
+ - ✅ **macOS** - Downloads podman remote client
21
+ - ✅ **Linux** - Downloads static podman binary
22
+
23
+ Just like sqlite or Playwright, no manual installation needed!
24
+
25
+ ### Manual Installation (Optional)
26
+
27
+ If you prefer to install Podman system-wide:
28
+
29
+ **Windows:**
30
+ ```powershell
31
+ winget install RedHat.Podman
32
+ ```
33
+
34
+ **macOS:**
35
+ ```bash
36
+ brew install podman
37
+ podman machine init
38
+ podman machine start
39
+ ```
40
+
41
+ **Linux:**
42
+ ```bash
43
+ sudo apt-get install podman # Ubuntu/Debian
44
+ sudo dnf install podman # Fedora
45
+ sudo apk add podman # Alpine
46
+ ```
47
+
48
+ ## Quick Start
49
+
50
+ ### 1. Build Container
51
+
52
+ ```bash
53
+ npx sandboxbox build
54
+ ```
55
+
56
+ This builds a container with:
57
+ - Node.js v22
58
+ - Claude Code CLI
59
+ - Playwright with all browser dependencies
60
+ - Git, npm, and essential build tools
61
+
62
+ ### 2. Run Your Project
63
+
64
+ ```bash
65
+ # Run with default shell
66
+ npx sandboxbox run ./my-project
67
+
68
+ # Run custom command
69
+ npx sandboxbox run ./my-project "npm test"
70
+
71
+ # Run Claude Code
72
+ npx sandboxbox run ./my-project "claude --help"
73
+
74
+ # Run Playwright tests
75
+ npx sandboxbox run ./my-project "npx playwright test"
76
+ ```
77
+
78
+ ### 3. Interactive Shell
79
+
80
+ ```bash
81
+ npx sandboxbox shell ./my-project
82
+ ```
83
+
84
+ ## Features
85
+
86
+ ### 🌍 Cross-Platform
87
+ - **Windows** - Full support with Podman Desktop
88
+ - **macOS** - Works with Podman machine
89
+ - **Linux** - Native Podman support
90
+
91
+ ### 🔒 Isolation
92
+ - Complete container isolation
93
+ - Your host system stays clean
94
+ - Workspace mounted at `/workspace`
95
+
96
+ ### 🚀 Pre-installed Tools
97
+ - **Node.js v22**
98
+ - **Claude Code CLI** - AI-powered development
99
+ - **Playwright** - Browser automation with all dependencies
100
+ - **Git** - Version control
101
+ - **npm** - Package management
102
+
103
+ ### 📦 NPX-First Design
104
+ - No global installation needed
105
+ - Single command execution
106
+ - Works with any project directory
107
+
108
+ ## Commands
109
+
110
+ ```bash
111
+ # Build container from Dockerfile
112
+ npx sandboxbox build
113
+ npx sandboxbox build ./Dockerfile.custom
114
+
115
+ # Run project in container
116
+ npx sandboxbox run <project-dir> [command]
117
+
118
+ # Interactive shell
119
+ npx sandboxbox shell <project-dir>
120
+
121
+ # Show version
122
+ npx sandboxbox version
123
+ ```
124
+
125
+ ## How It Works
126
+
127
+ 1. **Builds** a container image from the Dockerfile using Podman
128
+ 2. **Mounts** your project directory to `/workspace` in the container
129
+ 3. **Runs** your command in the isolated container environment
130
+ 4. **Removes** the container automatically when done
131
+
132
+ ```
133
+ Your Project Container
134
+ ./my-project ━━━━━> /workspace
135
+ (host) (isolated)
136
+ ```
137
+
138
+ ## Use Cases
139
+
140
+ ### Run Claude Code
141
+ ```bash
142
+ npx sandboxbox run ./my-app "claude --version"
143
+ npx sandboxbox run ./my-app "claude code review lib/"
144
+ ```
145
+
146
+ ### Run Playwright Tests
147
+ ```bash
148
+ npx sandboxbox run ./my-app "npx playwright test"
149
+ npx sandboxbox run ./my-app "npx playwright test --headed"
150
+ ```
151
+
152
+ ### Development Workflow
153
+ ```bash
154
+ # Build once
155
+ npx sandboxbox build
156
+
157
+ # Interactive development
158
+ npx sandboxbox shell ./my-app
159
+
160
+ # Inside container:
161
+ npm install
162
+ npm test
163
+ git commit -am "Update"
164
+ exit
165
+ ```
166
+
167
+ ### Run npm Scripts
168
+ ```bash
169
+ npx sandboxbox run ./my-app "npm run build"
170
+ npx sandboxbox run ./my-app "npm run lint"
171
+ npx sandboxbox run ./my-app "npm run test:e2e"
172
+ ```
173
+
174
+ ## Custom Dockerfile
175
+
176
+ Create your own `Dockerfile`:
177
+
178
+ ```dockerfile
179
+ FROM node:22-alpine
180
+
181
+ # Install system dependencies
182
+ RUN apk add --no-cache git bash curl
183
+
184
+ # Install global packages
185
+ RUN npm install -g @anthropic-ai/claude-code @playwright/test
186
+
187
+ # Install Playwright browsers
188
+ RUN npx playwright install --with-deps chromium
189
+
190
+ WORKDIR /workspace
191
+
192
+ CMD ["/bin/bash"]
193
+ ```
194
+
195
+ Then build:
196
+ ```bash
197
+ npx sandboxbox build ./Dockerfile
198
+ ```
199
+
200
+ ## Requirements
201
+
202
+ - **Podman** (https://podman.io/getting-started/installation)
203
+ - **Node.js 16+** (for running npx)
204
+
205
+ ## Project Structure
206
+
207
+ ```
208
+ sandboxbox/
209
+ ├── cli.js # Main CLI - Podman integration
210
+ ├── Dockerfile # Container definition
211
+ ├── package.json # NPM package config
212
+ └── README.md # This file
213
+ ```
214
+
215
+ ## Why Podman?
216
+
217
+ - ✅ **Cross-platform** - Works on Windows, macOS, Linux
218
+ - ✅ **Rootless** - No daemon, runs as regular user
219
+ - ✅ **Docker-compatible** - Uses OCI standard containers
220
+ - ✅ **Secure** - Better security model than Docker
221
+ - ✅ **Fast** - Lightweight and efficient
222
+
223
+ ## Differences from v1.x
224
+
225
+ **v1.x (bubblewrap):**
226
+ - Linux-only
227
+ - Required bubblewrap installation
228
+ - Direct process isolation
229
+
230
+ **v2.x (Podman):**
231
+ - Cross-platform (Windows/macOS/Linux)
232
+ - Uses Podman containers
233
+ - OCI-standard container images
234
+ - More portable and widely supported
235
+
236
+ ## License
237
+
238
+ MIT
239
+
240
+ ## Contributing
241
+
242
+ Contributions welcome! This project focuses on cross-platform container execution with Claude Code and Playwright support using Podman.