@kokorolx/ai-sandbox-wrapper 2.0.1 → 2.1.1
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 +80 -84
- package/bin/ai-run +211 -144
- package/bin/ai-run.bak +1212 -0
- package/bin/cli.js +91 -2
- package/dockerfiles/amp/Dockerfile +13 -6
- package/dockerfiles/base/Dockerfile +28 -58
- package/lib/install-aider.sh +2 -2
- package/lib/install-amp.sh +15 -8
- package/lib/install-auggie.sh +2 -2
- package/lib/install-base.sh +54 -36
- package/lib/install-claude.sh +2 -2
- package/lib/install-codebuddy.sh +2 -2
- package/lib/install-codeserver.sh +2 -2
- package/lib/install-codex.sh +2 -2
- package/lib/install-droid.sh +2 -2
- package/lib/install-gemini.sh +2 -2
- package/lib/install-jules.sh +2 -2
- package/lib/install-kilo.sh +2 -2
- package/lib/install-opencode.sh +2 -2
- package/lib/install-qoder.sh +2 -2
- package/lib/install-qwen.sh +2 -2
- package/lib/install-shai.sh +2 -2
- package/lib/install-tool.sh +2 -2
- package/lib/install-vscode.sh +2 -2
- package/package.json +1 -1
- package/setup.sh +16 -40
- package/dockerfiles/AGENTS.md +0 -92
- package/dockerfiles/aider/Dockerfile +0 -5
- package/dockerfiles/auggie/Dockerfile +0 -12
- package/dockerfiles/claude/Dockerfile +0 -11
- package/dockerfiles/codebuddy/Dockerfile +0 -12
- package/dockerfiles/codex/Dockerfile +0 -9
- package/dockerfiles/droid/Dockerfile +0 -8
- package/dockerfiles/gemini/Dockerfile +0 -9
- package/dockerfiles/jules/Dockerfile +0 -12
- package/dockerfiles/kilo/Dockerfile +0 -25
- package/dockerfiles/qoder/Dockerfile +0 -12
- package/dockerfiles/qwen/Dockerfile +0 -10
- package/dockerfiles/shai/Dockerfile +0 -9
package/README.md
CHANGED
|
@@ -8,46 +8,26 @@ AI coding tools like Claude, Gemini, and Aider have full access to your filesyst
|
|
|
8
8
|
|
|
9
9
|
**What you get:** Peace of mind using AI coding tools without risking your personal and system data.
|
|
10
10
|
|
|
11
|
-
*Last updated:
|
|
11
|
+
*Last updated: Tuesday, February 3, 2026*
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## ✨ New in v2.1.0: Stability & Native Persistence
|
|
14
14
|
|
|
15
|
-
**
|
|
15
|
+
The **v2.1.0 release** focuses on architectural stability and a more intuitive persistence model.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
├── ssh/ # SSH keys and config
|
|
32
|
-
└── keys/ # Per-workspace key selections
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Automatic Migration
|
|
36
|
-
|
|
37
|
-
When you run any AI tool, the wrapper automatically migrates:
|
|
38
|
-
|
|
39
|
-
| Old Location | New Location |
|
|
40
|
-
|--------------|-------------|
|
|
41
|
-
| `~/.ai-sandbox/home/<tool>/` | `~/.ai-sandbox/tools/<tool>/home/` |
|
|
42
|
-
| `~/.ai-sandbox/cache/<tool>/` | `~/.ai-sandbox/tools/<tool>/cache/` |
|
|
43
|
-
| `~/.ai-sandbox/cache/git/` | `~/.ai-sandbox/shared/git/` |
|
|
44
|
-
| `~/.ai-sandbox/git-keys/` | `~/.ai-sandbox/shared/git/keys/` |
|
|
45
|
-
| `~/.ai-sandbox/workspaces` (file) | `config.json.workspaces` |
|
|
46
|
-
| `~/.ai-sandbox/git-allowed` (file) | `config.json.git.allowedWorkspaces` |
|
|
47
|
-
|
|
48
|
-
**No action required** - migration happens automatically on first run.
|
|
49
|
-
|
|
50
|
-
**Legacy file compatibility**: Old files (`workspaces`, `git-allowed`) are still read as fallback.
|
|
17
|
+
- ✅ **Stable Node 22 LTS**: Switched to a robust Node 22 base image for maximum compatibility and performance.
|
|
18
|
+
- ✅ **Direct Mount Persistence**: Changes made *inside* the container (logins, settings, sessions) now save directly to your host's native folders.
|
|
19
|
+
- ✅ **Cache Isolation**: Heavy caches (`node_modules`, `.npm`, `.cache`) are isolated using anonymous volumes to prevent "cache poisoning" and runtime conflicts.
|
|
20
|
+
|
|
21
|
+
### Native Config Mapping
|
|
22
|
+
Your tool configurations are now directly linked from your Mac/PC:
|
|
23
|
+
- Host: `~/.config/opencode` ↔ Container: `/home/agent/.config/opencode`
|
|
24
|
+
- Host: `~/.local/share/opencode` ↔ Container: `/home/agent/.local/share/opencode`
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ⚠️ Breaking Change: v2.0.0 - Config Directory Reorganization
|
|
29
|
+
|
|
30
|
+
**Version 2.0.0** reorganized the directory structure to a tool-centric layout and introduced a unified `config.json`.
|
|
51
31
|
|
|
52
32
|
## 🛡️ Why Use This?
|
|
53
33
|
|
|
@@ -100,7 +80,7 @@ npx @kokorolx/ai-sandbox-wrapper setup --no-cache
|
|
|
100
80
|
```
|
|
101
81
|
|
|
102
82
|
### Step 3: Follow the Interactive Prompts
|
|
103
|
-
1. **Whitelist workspaces** - Enter
|
|
83
|
+
1. **Whitelist workspaces (Optional)** - Enter directories AI tools can access, or just hit **Enter** to whitelist on-demand later.
|
|
104
84
|
2. **Select tools** - Use arrow keys to move, space to select, Enter to confirm
|
|
105
85
|
3. **Choose image source** - Select registry (faster) or build locally
|
|
106
86
|
|
|
@@ -182,7 +162,7 @@ docker pull registry.gitlab.com/kokorolee/ai-sandbox-wrapper/ai-aider:latest
|
|
|
182
162
|
```
|
|
183
163
|
|
|
184
164
|
**Available pre-built images:**
|
|
185
|
-
- `ai-base:latest` - Base image with
|
|
165
|
+
- `ai-base:latest` - Base image with Node.js 22 LTS runtime
|
|
186
166
|
- `ai-amp:latest` - Sourcegraph Amp
|
|
187
167
|
- `ai-claude:latest` - Claude Code CLI
|
|
188
168
|
- `ai-droid:latest` - Factory CLI
|
|
@@ -211,22 +191,34 @@ docker pull registry.gitlab.com/kokorolee/ai-sandbox-wrapper/ai-aider:latest
|
|
|
211
191
|
|------|--------|--------------|-------------|
|
|
212
192
|
| **claude** | ✅ | Native binary | Anthropic Claude Code |
|
|
213
193
|
| **opencode** | ✅ | Native Go | Open-source AI coding |
|
|
214
|
-
| **gemini** | ✅ | npm/
|
|
194
|
+
| **gemini** | ✅ | npm/Node | Google Gemini CLI (free tier) |
|
|
215
195
|
| **aider** | ✅ | Python | AI pair programmer (Git-native) |
|
|
216
|
-
| **kilo** | ✅ | npm/
|
|
217
|
-
| **codex** | ✅ | npm/
|
|
218
|
-
| **amp** | ✅ | npm/
|
|
219
|
-
| **qwen** | ✅ | npm/
|
|
196
|
+
| **kilo** | ✅ | npm/Node | Kilo Code (500+ models) |
|
|
197
|
+
| **codex** | ✅ | npm/Node | OpenAI Codex agent |
|
|
198
|
+
| **amp** | ✅ | npm/Node | Sourcegraph Amp |
|
|
199
|
+
| **qwen** | ✅ | npm/Node | Alibaba Qwen CLI (1M context) |
|
|
220
200
|
| **droid** | ✅ | Custom | Factory CLI |
|
|
221
201
|
|
|
222
|
-
|
|
202
|
+
> **Note:** GUI tools (VSCode, codeserver) have been removed in v2.0.1. Use your native IDE with AI tools running in the sandbox.
|
|
203
|
+
|
|
204
|
+
## ⚠️ Known Issues
|
|
205
|
+
|
|
206
|
+
### Native Tool Config Compatibility
|
|
207
|
+
|
|
208
|
+
In v2.1.0+, tool configurations are **directly bind-mounted** from your host. This ensures 100% compatibility with your native tool settings and authentications.
|
|
223
209
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
210
|
+
1. **Host Config**: `~/.config/<tool>/` or `~/.<tool>/`
|
|
211
|
+
2. **Container Mount**: `/home/agent/.config/<tool>` (Automatic)
|
|
212
|
+
|
|
213
|
+
**Currently Supported for Direct Mount:**
|
|
214
|
+
- ✅ `claude`
|
|
215
|
+
- ✅ `opencode`
|
|
216
|
+
- ✅ `amp`
|
|
217
|
+
- ✅ `gemini`
|
|
218
|
+
- ✅ `aider`
|
|
219
|
+
- ... and all other supported tools.
|
|
220
|
+
|
|
221
|
+
Please [open an issue](https://github.com/kokorolx/ai-sandbox-wrapper/issues) if you encounter problems with specific tools.
|
|
230
222
|
|
|
231
223
|
## 🖥️ Platform Support
|
|
232
224
|
|
|
@@ -252,26 +244,17 @@ AI Sandbox Wrapper creates and manages a single consolidated directory in your h
|
|
|
252
244
|
|
|
253
245
|
```
|
|
254
246
|
~/.ai-sandbox/
|
|
255
|
-
├──
|
|
256
|
-
|
|
257
|
-
│
|
|
258
|
-
│
|
|
259
|
-
|
|
260
|
-
│
|
|
261
|
-
|
|
262
|
-
│ ├── claude/ # .claude.json and settings
|
|
263
|
-
│ ├── gemini/ # Gemini configuration
|
|
264
|
-
│ ├── aider/ # Aider config and history
|
|
265
|
-
│ └── .gitconfig # Git configuration (when Git access enabled)
|
|
266
|
-
├── config.json # Network configuration
|
|
267
|
-
├── workspaces # List of whitelisted directories AI can access
|
|
268
|
-
├── env # API keys (format: KEY=value, one per line)
|
|
269
|
-
├── git-allowed # Workspaces with persistent Git access
|
|
270
|
-
├── git-keys/ # Saved SSH key selections for each workspace
|
|
271
|
-
│ └── {hash} # MD5-hashed workspace path
|
|
272
|
-
└── .migrated # Migration marker (prevents re-migration)
|
|
247
|
+
├── config.json # Unified config (workspaces, git, networks)
|
|
248
|
+
├── tools/ # Isolated sandbox environments
|
|
249
|
+
│ └── <tool>/
|
|
250
|
+
│ └── home/ # Sandbox home directory (excludes native configs)
|
|
251
|
+
├── shared/ # Shared assets
|
|
252
|
+
│ └── git/ # Shared git config and keys
|
|
253
|
+
└── env # API keys (format: KEY=value)
|
|
273
254
|
```
|
|
274
255
|
|
|
256
|
+
**Note:** Tools also bind-mount your **native** `~/.config/<tool>` directories for persistence.
|
|
257
|
+
|
|
275
258
|
### Key Files
|
|
276
259
|
|
|
277
260
|
| File | Purpose |
|
|
@@ -283,6 +266,18 @@ AI Sandbox Wrapper creates and manages a single consolidated directory in your h
|
|
|
283
266
|
|
|
284
267
|
## ⚙️ Configuration
|
|
285
268
|
|
|
269
|
+
### Tool-Specific Configuration
|
|
270
|
+
|
|
271
|
+
Each tool has its own persistent home directory inside `~/.ai-sandbox/tools/<tool>/home/`.
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# View configuration paths for a specific tool (Recommended)
|
|
275
|
+
npx @kokorolx/ai-sandbox-wrapper config tool claude
|
|
276
|
+
|
|
277
|
+
# View configuration content
|
|
278
|
+
npx @kokorolx/ai-sandbox-wrapper config tool claude --show
|
|
279
|
+
```
|
|
280
|
+
|
|
286
281
|
### API Keys
|
|
287
282
|
```bash
|
|
288
283
|
# Edit environment file
|
|
@@ -466,21 +461,19 @@ GOOGLE_API_KEY=AIza...
|
|
|
466
461
|
|
|
467
462
|
### Per-Project Config
|
|
468
463
|
|
|
469
|
-
Each tool supports project-specific config files that override global settings:
|
|
464
|
+
Each tool supports project-specific config files that override global settings. These files are located in your workspace and are accessible to the tool:
|
|
470
465
|
|
|
471
|
-
| Tool | Project Config | Global Config
|
|
472
|
-
|
|
473
|
-
| Claude | `.claude.json` | `~/.
|
|
474
|
-
| Gemini | `.gemini.json` | `~/.
|
|
475
|
-
| Aider | `.aider.conf` | `~/.
|
|
476
|
-
| Opencode | `.opencode.json` | `~/.
|
|
477
|
-
|
|
|
478
|
-
| Codex | `.codex.json` | `~/.ai-sandbox/home/codex/.config/codex/` |
|
|
479
|
-
| Amp | `.amp.json` | `~/.ai-sandbox/home/amp/.config/amp/` |
|
|
466
|
+
| Tool | Project Config | Native Global Config |
|
|
467
|
+
|------|----------------|----------------------|
|
|
468
|
+
| Claude | `.claude.json` | `~/.config/claude/` |
|
|
469
|
+
| Gemini | `.gemini.json` | `~/.config/gemini/` |
|
|
470
|
+
| Aider | `.aider.conf` | `~/.config/aider/` |
|
|
471
|
+
| Opencode | `.opencode.json` | `~/.config/opencode/` |
|
|
472
|
+
| Amp | `.amp.json` | `~/.config/amp/` |
|
|
480
473
|
|
|
481
|
-
**
|
|
474
|
+
**Persistence:** Since v2.1.0, changes to global settings *inside* the container are automatically saved back to your **Native Global Config** on the host.
|
|
482
475
|
|
|
483
|
-
**
|
|
476
|
+
**Priority:** Project config > Native Global config > Container defaults
|
|
484
477
|
|
|
485
478
|
```bash
|
|
486
479
|
# Example: Project-specific Claude config
|
|
@@ -640,9 +633,12 @@ nano ~/.ai-sandbox/git-allowed # Delete the line
|
|
|
640
633
|
- Reload your shell: `source ~/.zshrc`
|
|
641
634
|
- Verify setup completed: check if `~/bin/ai-run` exists
|
|
642
635
|
|
|
643
|
-
**"Workspaces not configured"**
|
|
644
|
-
-
|
|
645
|
-
-
|
|
636
|
+
**"Workspaces not configured"** (Legacy)
|
|
637
|
+
- Note: This error is resolved in v2.1.0+.
|
|
638
|
+
- Run setup again: `./setup.sh` or simply run an AI tool in your project folder to trigger interactive whitelisting.
|
|
639
|
+
|
|
640
|
+
**"BunInstallFailedError"** (Resolved in v2.1.0)
|
|
641
|
+
- This was caused by stale caches. We now use **Cache Isolation** via anonymous volumes. If you still see this, run `./setup.sh --no-cache` to force a clean build.
|
|
646
642
|
|
|
647
643
|
**Tool doesn't start**
|
|
648
644
|
- Check if you selected the tool during setup
|