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/cli.js CHANGED
@@ -1,278 +1,269 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * SandboxBox CLI - Portable Container Runner with Podman
5
- *
6
- * Cross-platform container runner using Podman
7
- * Works on Windows, macOS, and Linux
8
- *
9
- * Simple usage:
10
- * npx sandboxbox build # Build container from Dockerfile
11
- * npx sandboxbox run <project> # Run project in container
12
- * npx sandboxbox shell <project> # Interactive shell
13
- */
14
-
15
- import { readFileSync, existsSync } from 'fs';
16
- import { execSync } from 'child_process';
17
- import { fileURLToPath } from 'url';
18
- import { dirname, resolve } from 'path';
19
-
20
- const __filename = fileURLToPath(import.meta.url);
21
- const __dirname = dirname(__filename);
22
-
23
- // Colors for output
24
- const colors = {
25
- red: '\x1b[31m',
26
- green: '\x1b[32m',
27
- yellow: '\x1b[33m',
28
- blue: '\x1b[34m',
29
- magenta: '\x1b[35m',
30
- cyan: '\x1b[36m',
31
- white: '\x1b[37m',
32
- reset: '\x1b[0m'
33
- };
34
-
35
- function color(colorName, text) {
36
- return `${colors[colorName]}${text}${colors.reset}`;
37
- }
38
-
39
- function showBanner() {
40
- console.log(color('cyan', 'šŸ“¦ SandboxBox - Portable Container Runner'));
41
- console.log(color('cyan', '═════════════════════════════════════════════════'));
42
- console.log('');
43
- }
44
-
45
- function showHelp() {
46
- console.log(color('yellow', 'Usage:'));
47
- console.log(' npx sandboxbox <command> [options]');
48
- console.log('');
49
- console.log(color('yellow', 'Commands:'));
50
- console.log(' build [dockerfile] Build container from Dockerfile (default: ./Dockerfile)');
51
- console.log(' run <project-dir> [cmd] Run project in container');
52
- console.log(' shell <project-dir> Start interactive shell in container');
53
- console.log(' version Show version information');
54
- console.log('');
55
- console.log(color('yellow', 'Examples:'));
56
- console.log(' npx sandboxbox build');
57
- console.log(' npx sandboxbox build ./Dockerfile.custom');
58
- console.log(' npx sandboxbox run ./my-project');
59
- console.log(' npx sandboxbox run ./my-project "npm test"');
60
- console.log(' npx sandboxbox shell ./my-project');
61
- console.log('');
62
- console.log(color('yellow', 'Requirements:'));
63
- console.log(' - Podman (https://podman.io/getting-started/installation)');
64
- console.log(' - Works on Windows, macOS, and Linux!');
65
- console.log('');
66
- console.log(color('magenta', 'šŸš€ Fast startup • True isolation • Cross-platform'));
67
- }
68
-
69
- function getPodmanPath() {
70
- // Check for bundled podman first
71
- const platform = process.platform;
72
- const arch = process.arch === 'arm64' ? 'arm64' : 'amd64';
73
- let bundledPodman;
74
-
75
- if (platform === 'win32') {
76
- bundledPodman = resolve(__dirname, 'bin', 'podman.exe');
77
- } else if (platform === 'darwin') {
78
- bundledPodman = resolve(__dirname, 'bin', 'podman');
79
- } else {
80
- bundledPodman = resolve(__dirname, 'bin', `podman-remote-static-linux_${arch}`);
81
- }
82
-
83
- if (existsSync(bundledPodman)) {
84
- return bundledPodman;
85
- }
86
- // Fall back to system podman
87
- return 'podman';
88
- }
89
-
90
- function checkPodman() {
91
- const podmanPath = getPodmanPath();
92
- const isBundled = podmanPath.includes('bin');
93
-
94
- try {
95
- const version = execSync(`"${podmanPath}" --version`, { encoding: 'utf-8', stdio: 'pipe' }).trim();
96
- console.log(color('green', `āœ… ${version}${isBundled ? ' (bundled)' : ''}`));
97
- return podmanPath;
98
- } catch (error) {
99
- // If no bundled Podman and system Podman not found, try to download
100
- if (!isBundled && !existsSync(podmanPath)) {
101
- console.log(color('red', 'āŒ Podman not found'));
102
- console.log(color('yellow', '\nšŸ“¦ Auto-downloading Podman...'));
103
-
104
- try {
105
- // Run the download script directly
106
- const scriptPath = resolve(__dirname, 'scripts', 'download-podman.js');
107
- execSync(`node "${scriptPath}"`, { stdio: 'inherit', cwd: __dirname });
108
-
109
- // Try again with downloaded Podman
110
- const newPodmanPath = getPodmanPath();
111
- const version = execSync(`"${newPodmanPath}" --version`, { encoding: 'utf-8', stdio: 'pipe' }).trim();
112
- console.log(color('green', `\nāœ… ${version} (auto-downloaded)`));
113
- return newPodmanPath;
114
- } catch (downloadError) {
115
- console.log(color('red', `\nāŒ Auto-download failed: ${downloadError.message}`));
116
- console.log(color('yellow', '\nšŸ’” Please install Podman manually:'));
117
- }
118
- } else {
119
- console.log(color('red', 'āŒ Podman not found'));
120
- console.log(color('yellow', '\nšŸ’” Please install Podman manually:'));
121
- }
122
-
123
- console.log('');
124
- if (process.platform === 'win32') {
125
- console.log(color('cyan', ' Windows:'));
126
- console.log(' winget install RedHat.Podman');
127
- } else if (process.platform === 'darwin') {
128
- console.log(color('cyan', ' macOS:'));
129
- console.log(' brew install podman');
130
- console.log(' podman machine init && podman machine start');
131
- } else {
132
- console.log(color('cyan', ' Linux:'));
133
- console.log(' sudo apt-get install podman # Ubuntu/Debian');
134
- console.log(' sudo dnf install podman # Fedora');
135
- }
136
- console.log('');
137
- return null;
138
- }
139
- }
140
-
141
- async function main() {
142
- const args = process.argv.slice(2);
143
-
144
- showBanner();
145
-
146
- if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
147
- showHelp();
148
- process.exit(0);
149
- }
150
-
151
- const command = args[0].toLowerCase();
152
- const commandArgs = args.slice(1);
153
-
154
- switch (command) {
155
- case 'build':
156
- const dockerfilePath = commandArgs[0] || './Dockerfile';
157
-
158
- if (!existsSync(dockerfilePath)) {
159
- console.log(color('red', `āŒ Dockerfile not found: ${dockerfilePath}`));
160
- process.exit(1);
161
- }
162
-
163
- console.log(color('blue', 'šŸ—ļø Building container...'));
164
- console.log(color('yellow', `Dockerfile: ${dockerfilePath}\n`));
165
-
166
- const buildPodman = checkPodman();
167
- if (!buildPodman) process.exit(1);
168
-
169
- try {
170
- console.log('');
171
- execSync(`"${buildPodman}" build -f "${dockerfilePath}" -t sandboxbox:latest .`, {
172
- stdio: 'inherit',
173
- cwd: __dirname
174
- });
175
- console.log('');
176
- console.log(color('green', 'āœ… Container built successfully!'));
177
- console.log(color('cyan', '\nšŸ’” Next steps:'));
178
- console.log(' npx sandboxbox run ./my-project');
179
- } catch (error) {
180
- console.log(color('red', `\nāŒ Build failed: ${error.message}`));
181
- process.exit(1);
182
- }
183
- break;
184
-
185
- case 'run':
186
- if (commandArgs.length === 0) {
187
- console.log(color('red', 'āŒ Please specify a project directory'));
188
- console.log(color('yellow', 'Usage: npx sandboxbox run <project-dir> [command]'));
189
- process.exit(1);
190
- }
191
-
192
- const projectDir = resolve(commandArgs[0]);
193
- const cmd = commandArgs[1] || 'bash';
194
-
195
- if (!existsSync(projectDir)) {
196
- console.log(color('red', `āŒ Project directory not found: ${projectDir}`));
197
- process.exit(1);
198
- }
199
-
200
- console.log(color('blue', 'šŸš€ Running project in container...'));
201
- console.log(color('yellow', `Project: ${projectDir}`));
202
- console.log(color('yellow', `Command: ${cmd}\n`));
203
-
204
- const runPodman = checkPodman();
205
- if (!runPodman) process.exit(1);
206
-
207
- try {
208
- console.log('');
209
- execSync(`"${runPodman}" run --rm -it -v "${projectDir}:/workspace" -w /workspace sandboxbox:latest ${cmd}`, {
210
- stdio: 'inherit'
211
- });
212
- console.log('');
213
- console.log(color('green', 'āœ… Container execution completed!'));
214
- } catch (error) {
215
- console.log(color('red', `\nāŒ Run failed: ${error.message}`));
216
- process.exit(1);
217
- }
218
- break;
219
-
220
- case 'shell':
221
- if (commandArgs.length === 0) {
222
- console.log(color('red', 'āŒ Please specify a project directory'));
223
- console.log(color('yellow', 'Usage: npx sandboxbox shell <project-dir>'));
224
- process.exit(1);
225
- }
226
-
227
- const shellProjectDir = resolve(commandArgs[0]);
228
-
229
- if (!existsSync(shellProjectDir)) {
230
- console.log(color('red', `āŒ Project directory not found: ${shellProjectDir}`));
231
- process.exit(1);
232
- }
233
-
234
- console.log(color('blue', '🐚 Starting interactive shell...'));
235
- console.log(color('yellow', `Project: ${shellProjectDir}\n`));
236
-
237
- const shellPodman = checkPodman();
238
- if (!shellPodman) process.exit(1);
239
-
240
- try {
241
- console.log('');
242
- execSync(`"${shellPodman}" run --rm -it -v "${shellProjectDir}:/workspace" -w /workspace sandboxbox:latest /bin/bash`, {
243
- stdio: 'inherit'
244
- });
245
- } catch (error) {
246
- console.log(color('red', `\nāŒ Shell failed: ${error.message}`));
247
- process.exit(1);
248
- }
249
- break;
250
-
251
- case 'version':
252
- try {
253
- const packageJson = JSON.parse(readFileSync(resolve(__dirname, 'package.json'), 'utf-8'));
254
- console.log(color('green', `SandboxBox v${packageJson.version}`));
255
- console.log(color('cyan', 'Portable containers with Claude Code & Playwright'));
256
- if (checkPodman()) {
257
- console.log('');
258
- }
259
- } catch (error) {
260
- console.log(color('red', 'āŒ Could not read version'));
261
- }
262
- break;
263
-
264
- default:
265
- console.log(color('red', `āŒ Unknown command: ${command}`));
266
- console.log(color('yellow', 'Use --help for usage information'));
267
- process.exit(1);
268
- }
269
- }
270
-
271
- // Run if called directly
272
- main().catch(error => {
273
- console.error(color('red', 'āŒ SandboxBox failed:'));
274
- console.error(color('red', error.message));
275
- console.error('');
276
- console.error(color('yellow', 'šŸ’” Try: npx sandboxbox --help'));
277
- process.exit(1);
278
- });
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * SandboxBox CLI - Portable Container Runner with Podman
5
+ *
6
+ * Cross-platform container runner using Podman with Claude Code integration
7
+ * Works on Windows, macOS, and Linux
8
+ */
9
+
10
+ import { readFileSync, existsSync, writeFileSync } from 'fs';
11
+ import { execSync } from 'child_process';
12
+ import { resolve, dirname } from 'path';
13
+ import { fileURLToPath } from 'url';
14
+
15
+ import { color } from './utils/colors.js';
16
+ import { checkPodman, getPodmanPath } from './utils/podman.js';
17
+ import { buildClaudeContainerCommand, createClaudeDockerfile } from './utils/claude-workspace.js';
18
+
19
+ const __filename = fileURLToPath(import.meta.url);
20
+ const __dirname = dirname(__filename);
21
+
22
+ function showBanner() {
23
+ console.log(color('cyan', 'šŸ“¦ SandboxBox - Portable Container Runner'));
24
+ console.log(color('cyan', '═════════════════════════════════════════════════'));
25
+ console.log('');
26
+ }
27
+
28
+ function showHelp() {
29
+ console.log(color('yellow', 'Usage:'));
30
+ console.log(' npx sandboxbox <command> [options]');
31
+ console.log('');
32
+ console.log(color('yellow', 'Commands:'));
33
+ console.log(' build [dockerfile] Build container from Dockerfile');
34
+ console.log(' run <project-dir> [cmd] Run project in container');
35
+ console.log(' shell <project-dir> Start interactive shell');
36
+ console.log(' claude <project-dir> Start Claude Code with local repository');
37
+ console.log(' version Show version information');
38
+ console.log('');
39
+ console.log(color('yellow', 'Examples:'));
40
+ console.log(' npx sandboxbox build');
41
+ console.log(' npx sandboxbox claude ./my-project');
42
+ console.log(' npx sandboxbox run ./my-project "npm test"');
43
+ console.log(' npx sandboxbox shell ./my-project');
44
+ console.log('');
45
+ console.log(color('yellow', 'Requirements:'));
46
+ console.log(' - Podman (auto-downloaded if needed)');
47
+ console.log(' - Works on Windows, macOS, and Linux!');
48
+ console.log('');
49
+ console.log(color('magenta', 'šŸš€ Fast startup • True isolation • Claude Code integration'));
50
+ }
51
+
52
+ function buildClaudeContainer() {
53
+ const dockerfilePath = resolve(__dirname, 'Dockerfile.claude');
54
+ const dockerfileContent = createClaudeDockerfile();
55
+
56
+ writeFileSync(dockerfilePath, dockerfileContent);
57
+ console.log(color('blue', 'šŸ—ļø Building Claude Code container...'));
58
+
59
+ const podmanPath = checkPodman();
60
+ if (!podmanPath) return false;
61
+
62
+ try {
63
+ execSync(`"${podmanPath}" build -f "${dockerfilePath}" -t sandboxbox-local:latest .`, {
64
+ stdio: 'inherit',
65
+ cwd: __dirname,
66
+ shell: process.platform === 'win32'
67
+ });
68
+ console.log(color('green', '\nāœ… Claude Code container built successfully!'));
69
+ return true;
70
+ } catch (error) {
71
+ console.log(color('red', `\nāŒ Build failed: ${error.message}`));
72
+ return false;
73
+ }
74
+ }
75
+
76
+ function runClaudeWorkspace(projectDir, command = 'claude') {
77
+ if (!existsSync(projectDir)) {
78
+ console.log(color('red', `āŒ Project directory not found: ${projectDir}`));
79
+ return false;
80
+ }
81
+
82
+ if (!existsSync(resolve(projectDir, '.git'))) {
83
+ console.log(color('red', `āŒ Not a git repository: ${projectDir}`));
84
+ console.log(color('yellow', 'Please run this command in a git repository directory'));
85
+ return false;
86
+ }
87
+
88
+ console.log(color('blue', 'šŸš€ Starting Claude Code with local repository...'));
89
+ console.log(color('yellow', `Project: ${projectDir}`));
90
+ console.log(color('yellow', `Command: ${command}\n`));
91
+
92
+ const podmanPath = checkPodman();
93
+ if (!podmanPath) return false;
94
+
95
+ try {
96
+ const containerCommand = buildClaudeContainerCommand(projectDir, podmanPath, command);
97
+ execSync(containerCommand, {
98
+ stdio: 'inherit',
99
+ shell: process.platform === 'win32'
100
+ });
101
+ console.log(color('green', '\nāœ… Claude Code session completed!'));
102
+ return true;
103
+ } catch (error) {
104
+ console.log(color('red', `\nāŒ Claude Code failed: ${error.message}`));
105
+ return false;
106
+ }
107
+ }
108
+
109
+ async function main() {
110
+ const args = process.argv.slice(2);
111
+ showBanner();
112
+
113
+ if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
114
+ showHelp();
115
+ process.exit(0);
116
+ }
117
+
118
+ const command = args[0].toLowerCase();
119
+ const commandArgs = args.slice(1);
120
+
121
+ switch (command) {
122
+ case 'build':
123
+ const dockerfilePath = commandArgs[0] || './Dockerfile';
124
+
125
+ if (!existsSync(dockerfilePath)) {
126
+ console.log(color('red', `āŒ Dockerfile not found: ${dockerfilePath}`));
127
+ process.exit(1);
128
+ }
129
+
130
+ console.log(color('blue', 'šŸ—ļø Building container...'));
131
+ console.log(color('yellow', `Dockerfile: ${dockerfilePath}\n`));
132
+
133
+ const buildPodman = checkPodman();
134
+ if (!buildPodman) process.exit(1);
135
+
136
+ try {
137
+ execSync(`"${buildPodman}" build -f "${dockerfilePath}" -t sandboxbox:latest .`, {
138
+ stdio: 'inherit',
139
+ cwd: dirname(dockerfilePath),
140
+ shell: process.platform === 'win32'
141
+ });
142
+ console.log(color('green', '\nāœ… Container built successfully!'));
143
+ } catch (error) {
144
+ console.log(color('red', `\nāŒ Build failed: ${error.message}`));
145
+ process.exit(1);
146
+ }
147
+ break;
148
+
149
+ case 'run':
150
+ if (commandArgs.length === 0) {
151
+ console.log(color('red', 'āŒ Please specify a project directory'));
152
+ console.log(color('yellow', 'Usage: npx sandboxbox run <project-dir> [command]'));
153
+ process.exit(1);
154
+ }
155
+
156
+ const projectDir = resolve(commandArgs[0]);
157
+ const cmd = commandArgs[1] || 'bash';
158
+
159
+ if (!existsSync(projectDir)) {
160
+ console.log(color('red', `āŒ Project directory not found: ${projectDir}`));
161
+ process.exit(1);
162
+ }
163
+
164
+ console.log(color('blue', 'šŸš€ Running project in container...'));
165
+ console.log(color('yellow', `Project: ${projectDir}`));
166
+ console.log(color('yellow', `Command: ${cmd}\n`));
167
+
168
+ const runPodman = checkPodman();
169
+ if (!runPodman) process.exit(1);
170
+
171
+ try {
172
+ execSync(`"${runPodman}" run --rm -it -v "${projectDir}:/workspace" -w /workspace sandboxbox:latest ${cmd}`, {
173
+ stdio: 'inherit',
174
+ shell: process.platform === 'win32'
175
+ });
176
+ console.log(color('green', '\nāœ… Container execution completed!'));
177
+ } catch (error) {
178
+ console.log(color('red', `\nāŒ Run failed: ${error.message}`));
179
+ process.exit(1);
180
+ }
181
+ break;
182
+
183
+ case 'shell':
184
+ if (commandArgs.length === 0) {
185
+ console.log(color('red', 'āŒ Please specify a project directory'));
186
+ console.log(color('yellow', 'Usage: npx sandboxbox shell <project-dir>'));
187
+ process.exit(1);
188
+ }
189
+
190
+ const shellProjectDir = resolve(commandArgs[0]);
191
+
192
+ if (!existsSync(shellProjectDir)) {
193
+ console.log(color('red', `āŒ Project directory not found: ${shellProjectDir}`));
194
+ process.exit(1);
195
+ }
196
+
197
+ console.log(color('blue', '🐚 Starting interactive shell...'));
198
+ console.log(color('yellow', `Project: ${shellProjectDir}\n`));
199
+
200
+ const shellPodman = checkPodman();
201
+ if (!shellPodman) process.exit(1);
202
+
203
+ try {
204
+ execSync(`"${shellPodman}" run --rm -it -v "${shellProjectDir}:/workspace" -w /workspace sandboxbox:latest /bin/bash`, {
205
+ stdio: 'inherit',
206
+ shell: process.platform === 'win32'
207
+ });
208
+ } catch (error) {
209
+ console.log(color('red', `\nāŒ Shell failed: ${error.message}`));
210
+ process.exit(1);
211
+ }
212
+ break;
213
+
214
+ case 'claude':
215
+ if (commandArgs.length === 0) {
216
+ console.log(color('red', 'āŒ Please specify a project directory'));
217
+ console.log(color('yellow', 'Usage: npx sandboxbox claude <project-dir>'));
218
+ process.exit(1);
219
+ }
220
+
221
+ const claudeProjectDir = resolve(commandArgs[0]);
222
+ const claudeCommand = commandArgs.slice(1).join(' ') || 'claude';
223
+
224
+ // Check if Claude container exists, build if needed
225
+ const podmanPath = getPodmanPath();
226
+ try {
227
+ execSync(`"${podmanPath}" image inspect sandboxbox-local:latest`, {
228
+ stdio: 'pipe',
229
+ shell: process.platform === 'win32'
230
+ });
231
+ } catch {
232
+ console.log(color('yellow', 'šŸ“¦ Building Claude Code container...'));
233
+ if (!buildClaudeContainer()) {
234
+ process.exit(1);
235
+ }
236
+ }
237
+
238
+ if (!runClaudeWorkspace(claudeProjectDir, claudeCommand)) {
239
+ process.exit(1);
240
+ }
241
+ break;
242
+
243
+ case 'version':
244
+ try {
245
+ const packageJson = JSON.parse(readFileSync(resolve(__dirname, 'package.json'), 'utf-8'));
246
+ console.log(color('green', `SandboxBox v${packageJson.version}`));
247
+ console.log(color('cyan', 'Portable containers with Claude Code integration'));
248
+ if (checkPodman()) {
249
+ console.log('');
250
+ }
251
+ } catch (error) {
252
+ console.log(color('red', 'āŒ Could not read version'));
253
+ }
254
+ break;
255
+
256
+ default:
257
+ console.log(color('red', `āŒ Unknown command: ${command}`));
258
+ console.log(color('yellow', 'Use --help for usage information'));
259
+ process.exit(1);
260
+ }
261
+ }
262
+
263
+ main().catch(error => {
264
+ console.error(color('red', 'āŒ SandboxBox failed:'));
265
+ console.error(color('red', error.message));
266
+ console.error('');
267
+ console.error(color('yellow', 'šŸ’” Try: npx sandboxbox --help'));
268
+ process.exit(1);
269
+ });
@@ -0,0 +1,75 @@
1
+ @echo off
2
+ setlocal enabledelayedexpansion
3
+
4
+ REM SandboxBox Launcher with Claude Auth Transfer (Windows)
5
+ REM Usage: launch-sandboxbox.bat [repository-path] [command]
6
+
7
+ set "REPO_PATH=%~1"
8
+ if "%REPO_PATH%"=="" set "REPO_PATH=."
9
+
10
+ set "COMMAND=%~2"
11
+ if "%COMMAND%"=="" set "COMMAND=claude"
12
+
13
+ echo šŸš€ Launching SandboxBox with Claude Code...
14
+ echo šŸ“ Repository: %REPO_PATH%
15
+ echo šŸ”§ Command: %COMMAND%
16
+
17
+ REM Get absolute path
18
+ for %%F in ("%REPO_PATH%") do set "REPO_ABS_PATH=%%~fF"
19
+
20
+ echo šŸ“ Absolute path: %REPO_ABS_PATH%
21
+
22
+ REM Check if it's a git repository
23
+ if not exist "%REPO_ABS_PATH%\.git" (
24
+ echo āŒ Error: %REPO_ABS_PATH% is not a git repository
25
+ echo Please ensure the directory contains a .git folder
26
+ exit /b 1
27
+ )
28
+
29
+ REM Collect Anthropic and Claude environment variables
30
+ set "ENV_ARGS="
31
+ for /f "tokens=1 delims==" %%a in ('set ^| findstr /r "^ANTHROPIC"^=') do (
32
+ set "ENV_ARGS=!ENV_ARGS! -e %%a=!%%a!"
33
+ )
34
+ for /f "tokens=1 delims==" %%a in ('set ^| findstr /r "^CLAUDE"^=') do (
35
+ set "ENV_ARGS=!ENV_ARGS! -e %%a=!%%a!"
36
+ )
37
+
38
+ echo šŸ”‘ Environment variables transferred
39
+
40
+ REM Find SandboxBox podman binary
41
+ set "PODMAN_PATH="
42
+ if exist "bin\podman.exe" (
43
+ set "PODMAN_PATH=bin\podman.exe"
44
+ ) else (
45
+ where podman >nul 2>&1
46
+ if !errorlevel! equ 0 (
47
+ for /f "tokens=*" %%i in ('where podman') do set "PODMAN_PATH=%%i"
48
+ )
49
+ )
50
+
51
+ if "%PODMAN_PATH%"=="" (
52
+ echo āŒ Error: Podman binary not found
53
+ echo Please ensure SandboxBox is properly installed
54
+ exit /b 1
55
+ )
56
+
57
+ echo 🐳 Using Podman: %PODMAN_PATH%
58
+
59
+ REM Build the Podman command with complete Claude session transfer
60
+ set "PODMAN_CMD=%PODMAN_PATH% run --rm -it"
61
+ set "PODMAN_CMD=%PODMAN_CMD% -v "%REPO_ABS_PATH%:/project""
62
+ set "PODMAN_CMD=%PODMAN_CMD% -v "%USERPROFILE%\.ssh:/root/.ssh:ro""
63
+ set "PODMAN_CMD=%PODMAN_CMD% -v "%USERPROFILE%\.gitconfig:/root/.gitconfig:ro""
64
+ set "PODMAN_CMD=%PODMAN_CMD% -v "%USERPROFILE%\.claude:/root/.claude""
65
+ set "PODMAN_CMD=%PODMAN_CMD% %ENV_ARGS%"
66
+ set "PODMAN_CMD=%PODMAN_CMD% --env REPO_PATH=/project"
67
+ set "PODMAN_CMD=%PODMAN_CMD% --env HOME=/root"
68
+ set "PODMAN_CMD=%PODMAN_CMD% sandboxbox-auth:latest"
69
+ set "PODMAN_CMD=%PODMAN_CMD% %COMMAND%"
70
+
71
+ echo šŸŽÆ Running command...
72
+ echo.
73
+
74
+ REM Execute the command
75
+ %PODMAN_CMD%