claudepod 1.1.2 → 1.2.2
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/.devcontainer/.env +18 -0
- package/.devcontainer/CHANGELOG.md +68 -0
- package/.devcontainer/CLAUDE.md +100 -0
- package/.devcontainer/README.md +220 -0
- package/.devcontainer/config/main-system-prompt.md +118 -0
- package/.devcontainer/config/settings.json +41 -0
- package/.devcontainer/devcontainer.json +71 -113
- package/.devcontainer/features/README.md +113 -0
- package/.devcontainer/features/ast-grep/README.md +24 -0
- package/.devcontainer/features/ast-grep/devcontainer-feature.json +24 -0
- package/.devcontainer/features/ast-grep/install.sh +51 -0
- package/.devcontainer/features/ccstatusline/README.md +296 -0
- package/.devcontainer/features/ccstatusline/devcontainer-feature.json +19 -0
- package/.devcontainer/features/ccstatusline/install.sh +290 -0
- package/.devcontainer/features/ccusage/README.md +205 -0
- package/.devcontainer/features/ccusage/devcontainer-feature.json +38 -0
- package/.devcontainer/features/ccusage/install.sh +132 -0
- package/.devcontainer/features/claude-code/README.md +498 -0
- package/.devcontainer/features/claude-code/config/settings.json +36 -0
- package/.devcontainer/features/claude-code/config/system-prompt.md +118 -0
- package/.devcontainer/features/claude-code/config/world-building-sp.md +1432 -0
- package/.devcontainer/features/claude-code/devcontainer-feature.json +42 -0
- package/.devcontainer/features/claude-code/install.sh +466 -0
- package/.devcontainer/features/claude-monitor/README.md +74 -0
- package/.devcontainer/features/claude-monitor/devcontainer-feature.json +38 -0
- package/.devcontainer/features/claude-monitor/install.sh +99 -0
- package/.devcontainer/features/lsp-servers/README.md +85 -0
- package/.devcontainer/features/lsp-servers/devcontainer-feature.json +34 -0
- package/.devcontainer/features/lsp-servers/install.sh +92 -0
- package/.devcontainer/features/mcp-qdrant/CHANGES.md +399 -0
- package/.devcontainer/features/mcp-qdrant/README.md +474 -0
- package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +57 -0
- package/.devcontainer/features/mcp-qdrant/install.sh +295 -0
- package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +129 -0
- package/.devcontainer/features/mcp-reasoner/README.md +177 -0
- package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +20 -0
- package/.devcontainer/features/mcp-reasoner/install.sh +177 -0
- package/.devcontainer/features/mcp-reasoner/poststart-hook.sh +67 -0
- package/.devcontainer/features/splitrail/README.md +140 -0
- package/.devcontainer/features/splitrail/devcontainer-feature.json +34 -0
- package/.devcontainer/features/splitrail/install.sh +129 -0
- package/.devcontainer/features/tree-sitter/README.md +138 -0
- package/.devcontainer/features/tree-sitter/devcontainer-feature.json +52 -0
- package/.devcontainer/features/tree-sitter/install.sh +173 -0
- package/.devcontainer/scripts/setup-aliases.sh +52 -0
- package/.devcontainer/scripts/setup-config.sh +28 -0
- package/.devcontainer/scripts/setup-irie-claude.sh +32 -0
- package/.devcontainer/scripts/setup-lsp.sh +20 -0
- package/.devcontainer/scripts/setup-plugins.sh +31 -0
- package/.devcontainer/scripts/setup.sh +60 -0
- package/README.md +153 -187
- package/package.json +6 -10
- package/setup.js +2 -2
- package/.devcontainer/config/claude/mcp.json +0 -76
- package/.devcontainer/config/claude/mcp.json.template +0 -117
- package/.devcontainer/config/claude/output-styles/strict-development.md +0 -158
- package/.devcontainer/config/claude/settings.json +0 -10
- package/.devcontainer/config/claude/system-prompt.md +0 -3
- package/.devcontainer/config/searxng/ods_config.json +0 -22
- package/.devcontainer/config/searxng/searxng_env_template +0 -71
- package/.devcontainer/config/serena/serena_config.yml +0 -72
- package/.devcontainer/config/taskmaster/config.json +0 -37
- package/.devcontainer/ods_config.json +0 -21
- package/.devcontainer/post-create.sh +0 -1077
- package/.devcontainer/post-start.sh +0 -551
- package/.devcontainer/sanitize-system-prompt.sh +0 -31
- package/.devcontainer/scripts/config/claude-core.sh +0 -210
- package/.devcontainer/scripts/config/searxng.sh +0 -411
- package/.devcontainer/scripts/config/serena.sh +0 -47
- package/.devcontainer/scripts/config/taskmaster.sh +0 -41
- package/.devcontainer/scripts/generate-mcp-config.js +0 -205
- package/.devcontainer/scripts/install/claude-code.sh +0 -112
- package/.devcontainer/scripts/shell/zsh-config.sh +0 -271
- package/.devcontainer/scripts/utils.sh +0 -44
- package/.devcontainer/setup-zsh.sh +0 -234
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
# Claude Code CLI
|
|
2
|
+
|
|
3
|
+
**Installs Claude Code CLI for AI-powered coding assistance in your DevContainer**
|
|
4
|
+
|
|
5
|
+
This DevContainer feature provides a streamlined way to install Claude Code CLI with support for both native binary installation (recommended) and npm-based installation methods.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- ✅ **Dual Installation Methods**: Native binary (default) or npm
|
|
10
|
+
- ✅ **SHA256 Checksum Verification**: Native method verifies binary integrity
|
|
11
|
+
- ✅ **Version Selection**: Install latest or specific version
|
|
12
|
+
- ✅ **Platform Auto-Detection**: Supports x64/arm64, glibc/musl
|
|
13
|
+
- ✅ **Idempotent**: Safe to run multiple times
|
|
14
|
+
- ✅ **Multi-user Support**: NPM method supports user-specific installs
|
|
15
|
+
- ✅ **Minimal Dependencies**: Native method only requires jq and curl
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
### Recommended: Native Installation
|
|
20
|
+
|
|
21
|
+
The native method is recommended as it has minimal dependencies and includes SHA256 checksum verification.
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"features": {
|
|
26
|
+
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
27
|
+
"ghcr.io/yourorg/features/claude-code:1": {}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### NPM Installation
|
|
33
|
+
|
|
34
|
+
For Node.js projects or when you prefer npm package management:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"features": {
|
|
39
|
+
"ghcr.io/devcontainers/features/node:1": {
|
|
40
|
+
"nvmInstallPath": "/usr/local/share/nvm"
|
|
41
|
+
},
|
|
42
|
+
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
43
|
+
"ghcr.io/yourorg/features/claude-code:1": {
|
|
44
|
+
"installMethod": "npm"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Specific Version
|
|
51
|
+
|
|
52
|
+
Install a specific version of Claude Code:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"features": {
|
|
57
|
+
"ghcr.io/yourorg/features/claude-code:1": {
|
|
58
|
+
"version": "2.0.42"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Options
|
|
65
|
+
|
|
66
|
+
| Option | Type | Default | Description |
|
|
67
|
+
|--------|------|---------|-------------|
|
|
68
|
+
| `installMethod` | string | `"native"` | Installation method: `"npm"` or `"native"` |
|
|
69
|
+
| `version` | string | `"latest"` | Claude Code version (e.g., `"2.0.42"` or `"latest"`) |
|
|
70
|
+
| `username` | string | `"automatic"` | Container user to install for (npm method only; native installs globally) |
|
|
71
|
+
|
|
72
|
+
### installMethod
|
|
73
|
+
|
|
74
|
+
Determines how Claude Code CLI is installed:
|
|
75
|
+
|
|
76
|
+
- **`native`** (default): Downloads pre-built binary from official distribution
|
|
77
|
+
- No Node.js dependency required
|
|
78
|
+
- SHA256 checksum verification
|
|
79
|
+
- Installs globally to `/usr/local/bin/claude`
|
|
80
|
+
- Smaller installation footprint
|
|
81
|
+
|
|
82
|
+
- **`npm`**: Installs via npm package manager
|
|
83
|
+
- Requires Node.js feature
|
|
84
|
+
- Installs to `~/.npm-global/bin/claude`
|
|
85
|
+
- User-specific installation
|
|
86
|
+
- Familiar to Node.js developers
|
|
87
|
+
|
|
88
|
+
### version
|
|
89
|
+
|
|
90
|
+
Specifies which version of Claude Code to install:
|
|
91
|
+
|
|
92
|
+
- **`latest`** (default): Automatically fetches and installs the current stable version
|
|
93
|
+
- **Specific version** (e.g., `"2.0.42"`): Installs the exact version specified
|
|
94
|
+
|
|
95
|
+
### username
|
|
96
|
+
|
|
97
|
+
Only applies to npm installation method:
|
|
98
|
+
|
|
99
|
+
- **`automatic`** (default): Auto-detects container user (vscode, node, codespace, or root)
|
|
100
|
+
- **Specific username**: Installs for the specified user
|
|
101
|
+
- **Native method**: This option is ignored as native installation is global
|
|
102
|
+
|
|
103
|
+
## Installation Methods Comparison
|
|
104
|
+
|
|
105
|
+
| Feature | Native | NPM |
|
|
106
|
+
|---------|--------|-----|
|
|
107
|
+
| **Speed** | ⚡⚡⚡ Fast download | ⚡⚡ Slower (npm overhead) |
|
|
108
|
+
| **Size** | ~200MB binary | ~200MB+ (with npm deps) |
|
|
109
|
+
| **Dependencies** | jq, curl, sha256sum | Node.js + npm + NVM + jq |
|
|
110
|
+
| **Install Location** | `/usr/local/bin/claude` (global) | `~/.npm-global/bin/claude` (user) |
|
|
111
|
+
| **Checksum Verification** | ✅ SHA256 verified | ❌ Via npm only |
|
|
112
|
+
| **Updates** | Manual or via feature | `npm update -g` |
|
|
113
|
+
| **Recommended** | ✅ Yes | For Node.js projects |
|
|
114
|
+
|
|
115
|
+
## Supported Platforms
|
|
116
|
+
|
|
117
|
+
The native installation method supports the following platforms:
|
|
118
|
+
|
|
119
|
+
| Platform | Architecture | C Library | Status |
|
|
120
|
+
|----------|--------------|-----------|--------|
|
|
121
|
+
| `linux-x64` | x86_64 | glibc | ✅ Fully supported |
|
|
122
|
+
| `linux-arm64` | ARM64/aarch64 | glibc | ✅ Fully supported |
|
|
123
|
+
| `linux-x64-musl` | x86_64 | musl | ✅ Alpine Linux |
|
|
124
|
+
| `linux-arm64-musl` | ARM64/aarch64 | musl | ✅ Alpine Linux |
|
|
125
|
+
|
|
126
|
+
The feature automatically detects your platform and downloads the appropriate binary.
|
|
127
|
+
|
|
128
|
+
## Dependencies
|
|
129
|
+
|
|
130
|
+
### Native Method
|
|
131
|
+
|
|
132
|
+
- `jq` - JSON parsing (provided by common-utils feature)
|
|
133
|
+
- `curl` - Downloading binaries
|
|
134
|
+
- `sha256sum` - Checksum verification
|
|
135
|
+
|
|
136
|
+
### NPM Method
|
|
137
|
+
|
|
138
|
+
- `jq` - JSON parsing (provided by common-utils feature)
|
|
139
|
+
- Node.js 18+ (provided by node feature)
|
|
140
|
+
- npm (included with Node.js)
|
|
141
|
+
- NVM at `/usr/local/share/nvm/nvm.sh`
|
|
142
|
+
|
|
143
|
+
## Usage Examples
|
|
144
|
+
|
|
145
|
+
### Basic Native Installation
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"name": "My Dev Container",
|
|
150
|
+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
|
|
151
|
+
"features": {
|
|
152
|
+
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
153
|
+
"ghcr.io/yourorg/features/claude-code:1": {}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### NPM Installation with Specific User
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"features": {
|
|
163
|
+
"ghcr.io/devcontainers/features/node:1": {
|
|
164
|
+
"version": "20",
|
|
165
|
+
"nvmInstallPath": "/usr/local/share/nvm"
|
|
166
|
+
},
|
|
167
|
+
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
168
|
+
"ghcr.io/yourorg/features/claude-code:1": {
|
|
169
|
+
"installMethod": "npm",
|
|
170
|
+
"username": "vscode"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Pinned Version Installation
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"features": {
|
|
181
|
+
"ghcr.io/yourorg/features/claude-code:1": {
|
|
182
|
+
"installMethod": "native",
|
|
183
|
+
"version": "2.0.42"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Complete Example with Multiple Features
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"name": "Full Stack Dev Container",
|
|
194
|
+
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
|
|
195
|
+
"features": {
|
|
196
|
+
"ghcr.io/devcontainers/features/common-utils:2": {
|
|
197
|
+
"installZsh": true,
|
|
198
|
+
"username": "vscode"
|
|
199
|
+
},
|
|
200
|
+
"ghcr.io/devcontainers/features/node:1": {
|
|
201
|
+
"version": "20",
|
|
202
|
+
"nvmInstallPath": "/usr/local/share/nvm"
|
|
203
|
+
},
|
|
204
|
+
"ghcr.io/devcontainers/features/git:1": {},
|
|
205
|
+
"ghcr.io/yourorg/features/claude-code:1": {
|
|
206
|
+
"installMethod": "native",
|
|
207
|
+
"version": "latest"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Post-Installation
|
|
214
|
+
|
|
215
|
+
After the container is built, you can verify the installation:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Check version
|
|
219
|
+
claude --version
|
|
220
|
+
|
|
221
|
+
# Authenticate with Claude
|
|
222
|
+
claude auth login
|
|
223
|
+
|
|
224
|
+
# Start using Claude Code
|
|
225
|
+
claude
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Troubleshooting
|
|
229
|
+
|
|
230
|
+
### Native Installation Issues
|
|
231
|
+
|
|
232
|
+
#### "Failed to fetch latest version"
|
|
233
|
+
|
|
234
|
+
**Cause**: Network issue or GCS bucket unavailable
|
|
235
|
+
|
|
236
|
+
**Solution**:
|
|
237
|
+
- Check internet connectivity
|
|
238
|
+
- Retry the build
|
|
239
|
+
- Use a specific version instead of "latest"
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"features": {
|
|
244
|
+
"ghcr.io/yourorg/features/claude-code:1": {
|
|
245
|
+
"version": "2.0.42"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
#### "Checksum verification failed"
|
|
252
|
+
|
|
253
|
+
**Cause**: Corrupted download or network interference (proxy, firewall)
|
|
254
|
+
|
|
255
|
+
**Solution**:
|
|
256
|
+
- Retry the build
|
|
257
|
+
- Check network proxy settings
|
|
258
|
+
- Ensure no man-in-the-middle SSL inspection
|
|
259
|
+
|
|
260
|
+
#### "Platform not found in manifest"
|
|
261
|
+
|
|
262
|
+
**Cause**: Unsupported architecture or the specified version doesn't support your platform
|
|
263
|
+
|
|
264
|
+
**Solution**:
|
|
265
|
+
- Use a different version
|
|
266
|
+
- Switch to npm method
|
|
267
|
+
- Use a different base image
|
|
268
|
+
|
|
269
|
+
#### "Unsupported architecture"
|
|
270
|
+
|
|
271
|
+
**Cause**: Running on a non-x64/arm64 architecture
|
|
272
|
+
|
|
273
|
+
**Solution**:
|
|
274
|
+
- Use npm method instead
|
|
275
|
+
- Use a different base image (e.g., arm64 or x86_64)
|
|
276
|
+
|
|
277
|
+
### NPM Installation Issues
|
|
278
|
+
|
|
279
|
+
#### "npm not available"
|
|
280
|
+
|
|
281
|
+
**Cause**: Node feature not installed
|
|
282
|
+
|
|
283
|
+
**Solution**: Add the node feature before claude-code:
|
|
284
|
+
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"features": {
|
|
288
|
+
"ghcr.io/devcontainers/features/node:1": {
|
|
289
|
+
"nvmInstallPath": "/usr/local/share/nvm"
|
|
290
|
+
},
|
|
291
|
+
"ghcr.io/yourorg/features/claude-code:1": {
|
|
292
|
+
"installMethod": "npm"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
#### "NVM not found"
|
|
299
|
+
|
|
300
|
+
**Cause**: Node feature installed without correct nvmInstallPath
|
|
301
|
+
|
|
302
|
+
**Solution**: Ensure the node feature has the correct nvmInstallPath:
|
|
303
|
+
|
|
304
|
+
```json
|
|
305
|
+
{
|
|
306
|
+
"features": {
|
|
307
|
+
"ghcr.io/devcontainers/features/node:1": {
|
|
308
|
+
"nvmInstallPath": "/usr/local/share/nvm"
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
#### "Installation failed - claude command not found"
|
|
315
|
+
|
|
316
|
+
**Cause**: npm install succeeded but binary not in expected location
|
|
317
|
+
|
|
318
|
+
**Solution**:
|
|
319
|
+
- Check that `~/.npm-global/bin` exists
|
|
320
|
+
- Verify npm prefix configuration
|
|
321
|
+
- Check installation logs for errors
|
|
322
|
+
|
|
323
|
+
### General Issues
|
|
324
|
+
|
|
325
|
+
#### "jq not available"
|
|
326
|
+
|
|
327
|
+
**Cause**: common-utils feature not installed
|
|
328
|
+
|
|
329
|
+
**Solution**: Add common-utils feature:
|
|
330
|
+
|
|
331
|
+
```json
|
|
332
|
+
{
|
|
333
|
+
"features": {
|
|
334
|
+
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
335
|
+
"ghcr.io/yourorg/features/claude-code:1": {}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
#### "command not found: claude" after installation
|
|
341
|
+
|
|
342
|
+
**Native method**: The command should work immediately as it's installed globally. If not:
|
|
343
|
+
- Verify `/usr/local/bin` is in your PATH
|
|
344
|
+
- Check that `/usr/local/bin/claude` exists and is executable
|
|
345
|
+
|
|
346
|
+
**NPM method**: You may need to reload your shell:
|
|
347
|
+
```bash
|
|
348
|
+
# Reload bash
|
|
349
|
+
source ~/.bashrc
|
|
350
|
+
|
|
351
|
+
# Or reload zsh
|
|
352
|
+
source ~/.zshrc
|
|
353
|
+
|
|
354
|
+
# Or start a new shell
|
|
355
|
+
exec bash
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
## Migration from Module-based Installation
|
|
359
|
+
|
|
360
|
+
If you're migrating from the old module-based installation, here are the key changes:
|
|
361
|
+
|
|
362
|
+
### Breaking Changes
|
|
363
|
+
|
|
364
|
+
1. **No settings.json management**
|
|
365
|
+
- **Old**: Copied from `configurations/cc/settings.json`
|
|
366
|
+
- **New**: Not handled by this feature
|
|
367
|
+
- **Action**: Manage `~/.claude/settings.json` manually or via separate feature
|
|
368
|
+
|
|
369
|
+
2. **No system prompt handling**
|
|
370
|
+
- **Old**: Created shell alias with `--system-prompt` flag
|
|
371
|
+
- **New**: Not handled by this feature
|
|
372
|
+
- **Action**: Configure manually if needed
|
|
373
|
+
|
|
374
|
+
3. **No shell alias creation**
|
|
375
|
+
- **Old**: Created `alias claude=...`
|
|
376
|
+
- **New**: Plain `claude` command only
|
|
377
|
+
- **Action**: Create aliases manually if needed
|
|
378
|
+
|
|
379
|
+
4. **No MCP server injection**
|
|
380
|
+
- **Old**: Injected Qdrant MCP config
|
|
381
|
+
- **New**: Removed (mcp-qdrant feature handles this)
|
|
382
|
+
- **Action**: Use dedicated MCP server features
|
|
383
|
+
|
|
384
|
+
5. **Install method selection**
|
|
385
|
+
- **Old**: Always npm
|
|
386
|
+
- **New**: Native by default, npm optional
|
|
387
|
+
- **Action**: Set `installMethod: "npm"` if you need npm method
|
|
388
|
+
|
|
389
|
+
### Migration Example
|
|
390
|
+
|
|
391
|
+
**Old (module-based):**
|
|
392
|
+
```bash
|
|
393
|
+
# In postStartCommand.sh
|
|
394
|
+
source "$modules_path/claude_code/cc_install.sh"
|
|
395
|
+
source "$modules_path/claude_code/options/copy_local_settings.sh"
|
|
396
|
+
source "$modules_path/claude_code/cc_alias.sh"
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**New (feature-based):**
|
|
400
|
+
```json
|
|
401
|
+
{
|
|
402
|
+
"features": {
|
|
403
|
+
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
404
|
+
"ghcr.io/yourorg/features/claude-code:1": {}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
For NPM compatibility:
|
|
410
|
+
```json
|
|
411
|
+
{
|
|
412
|
+
"features": {
|
|
413
|
+
"ghcr.io/devcontainers/features/node:1": {
|
|
414
|
+
"nvmInstallPath": "/usr/local/share/nvm"
|
|
415
|
+
},
|
|
416
|
+
"ghcr.io/devcontainers/features/common-utils:2": {},
|
|
417
|
+
"ghcr.io/yourorg/features/claude-code:1": {
|
|
418
|
+
"installMethod": "npm"
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
## Security
|
|
425
|
+
|
|
426
|
+
### Checksum Verification
|
|
427
|
+
|
|
428
|
+
The native installation method verifies SHA256 checksums for all downloaded binaries:
|
|
429
|
+
|
|
430
|
+
1. Fetches manifest.json containing expected checksums
|
|
431
|
+
2. Downloads the binary
|
|
432
|
+
3. Computes actual SHA256 checksum
|
|
433
|
+
4. Compares against expected value
|
|
434
|
+
5. Fails installation if mismatch detected
|
|
435
|
+
|
|
436
|
+
This ensures the binary hasn't been corrupted or tampered with during download.
|
|
437
|
+
|
|
438
|
+
### Official Distribution
|
|
439
|
+
|
|
440
|
+
All native binaries are downloaded from the official Claude Code distribution:
|
|
441
|
+
|
|
442
|
+
```
|
|
443
|
+
https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
## Technical Details
|
|
447
|
+
|
|
448
|
+
### Version Resolution
|
|
449
|
+
|
|
450
|
+
When `version: "latest"` is specified, the feature:
|
|
451
|
+
|
|
452
|
+
1. Fetches the stable version from: `${BASE_URL}/stable`
|
|
453
|
+
2. Receives a plain text version number (e.g., "2.0.42")
|
|
454
|
+
3. Uses that version for manifest and binary URLs
|
|
455
|
+
|
|
456
|
+
### Platform Detection
|
|
457
|
+
|
|
458
|
+
The feature automatically detects your platform:
|
|
459
|
+
|
|
460
|
+
1. **Architecture**: Uses `uname -m` to detect x86_64 or arm64/aarch64
|
|
461
|
+
2. **C Library**: Uses `ldd --version` to detect musl (Alpine) vs glibc
|
|
462
|
+
3. **Platform String**: Combines to form platform identifier (e.g., "linux-x64-musl")
|
|
463
|
+
|
|
464
|
+
### Installation Paths
|
|
465
|
+
|
|
466
|
+
**Native method**:
|
|
467
|
+
- Binary: `/usr/local/bin/claude`
|
|
468
|
+
- Available globally to all users
|
|
469
|
+
- No PATH configuration needed
|
|
470
|
+
|
|
471
|
+
**NPM method**:
|
|
472
|
+
- Binary: `/home/{username}/.npm-global/bin/claude`
|
|
473
|
+
- User-specific installation
|
|
474
|
+
- PATH configured in `~/.bashrc` and `~/.zshrc`
|
|
475
|
+
|
|
476
|
+
### Idempotency
|
|
477
|
+
|
|
478
|
+
The feature is idempotent and handles re-runs gracefully:
|
|
479
|
+
|
|
480
|
+
- Checks if `claude` command already exists
|
|
481
|
+
- Compares installed version with requested version
|
|
482
|
+
- Skips installation if already present (for "latest")
|
|
483
|
+
- Skips installation if requested version already installed
|
|
484
|
+
- Proceeds with installation if different version requested
|
|
485
|
+
|
|
486
|
+
## Contributing
|
|
487
|
+
|
|
488
|
+
Issues and pull requests are welcome! Please follow the DevContainer Feature development guidelines.
|
|
489
|
+
|
|
490
|
+
## License
|
|
491
|
+
|
|
492
|
+
[Your License Here]
|
|
493
|
+
|
|
494
|
+
## See Also
|
|
495
|
+
|
|
496
|
+
- [Claude Code Documentation](https://claude.ai/docs)
|
|
497
|
+
- [DevContainer Features Specification](https://containers.dev/implementors/features/)
|
|
498
|
+
- [Common DevContainer Features](https://github.com/devcontainers/features)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cleanupPeriodDays": 360,
|
|
3
|
+
"includeCoAuthoredBy": false,
|
|
4
|
+
"statusLine": {
|
|
5
|
+
"type": "command",
|
|
6
|
+
"command": "/usr/local/bin/ccstatusline-wrapper"
|
|
7
|
+
},
|
|
8
|
+
"outputStyle": "",
|
|
9
|
+
"forceLoginMethod": "claudeai",
|
|
10
|
+
"installationMethod": "npm-global",
|
|
11
|
+
"enabledMcpjsonServers": [],
|
|
12
|
+
"disabledMcpjsonServers": [],
|
|
13
|
+
"permissions": {
|
|
14
|
+
"defaultMode": "plan",
|
|
15
|
+
"additionalDirectories": [],
|
|
16
|
+
"allow": ["Read(/workspaces/*)", "WebFetch(domain:*)"],
|
|
17
|
+
"ask": [],
|
|
18
|
+
"deny": []
|
|
19
|
+
},
|
|
20
|
+
"hooks": {},
|
|
21
|
+
"env": {
|
|
22
|
+
"ANTHROPIC_MODEL": "claude-opus-4-5-20251101",
|
|
23
|
+
"CLAUDE_CODE_SUBAGENT_MODEL": "claude-haiku-4-5-20251001",
|
|
24
|
+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5-20251101",
|
|
25
|
+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5-20250929",
|
|
26
|
+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
|
|
27
|
+
"BASH_DEFAULT_TIMEOUT_MS": "240000",
|
|
28
|
+
"BASH_MAX_TIMEOUT_MS": "600000",
|
|
29
|
+
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "true",
|
|
30
|
+
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000",
|
|
31
|
+
"MAX_MCP_OUTPUT_TOKENS": "10000",
|
|
32
|
+
"MAX_THINKING_TOKENS": "31999",
|
|
33
|
+
"MCP_TIMEOUT": "120000",
|
|
34
|
+
"MCP_TOOL_TIMEOUT": "30000"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<identity>
|
|
2
|
+
You are Alira.
|
|
3
|
+
</identity>
|
|
4
|
+
|
|
5
|
+
<response_guidelines>
|
|
6
|
+
Begin responses with substantive content.
|
|
7
|
+
|
|
8
|
+
Match emoji usage to source material or explicit requests.
|
|
9
|
+
|
|
10
|
+
Mark uncertainty explicitly. Distinguish confirmed facts from inference.
|
|
11
|
+
|
|
12
|
+
<example>
|
|
13
|
+
User: "What's the best sorting algorithm?"
|
|
14
|
+
Alira: "Context determines the answer. For nearly-sorted data, insertion sort excels. For general-purpose use with guaranteed O(n log n), merge sort or heapsort. What's your use case?"
|
|
15
|
+
</example>
|
|
16
|
+
</response_guidelines>
|
|
17
|
+
|
|
18
|
+
<core_directives>
|
|
19
|
+
Execute rigorously. Pass to all subagents. Deviation requires explicit user approval.
|
|
20
|
+
|
|
21
|
+
Write minimal code that satisfies requirements.
|
|
22
|
+
|
|
23
|
+
Address concrete problems present in the codebase.
|
|
24
|
+
|
|
25
|
+
When theory conflicts with working solutions, follow working solutions.
|
|
26
|
+
|
|
27
|
+
Data structures and their relationships are the foundation; code follows from them.
|
|
28
|
+
|
|
29
|
+
The right abstraction handles all cases uniformly.
|
|
30
|
+
|
|
31
|
+
<orchestration>
|
|
32
|
+
Main thread: orchestration and code modification only.
|
|
33
|
+
|
|
34
|
+
Subagents handle all information gathering—file reading, searches, context assembly, dependency analysis, test execution. Subagents report; main thread synthesizes, decides, acts.
|
|
35
|
+
|
|
36
|
+
<example>
|
|
37
|
+
User: "Update the authentication module to use JWT"
|
|
38
|
+
Alira: Spawns subagent to gather current auth implementation, token handling, test coverage. Receives findings. Main thread plans and executes modifications.
|
|
39
|
+
</example>
|
|
40
|
+
</orchestration>
|
|
41
|
+
|
|
42
|
+
<task_handling>
|
|
43
|
+
Present task interpretation and await approval before work begins.
|
|
44
|
+
|
|
45
|
+
When uncertain, deploy subagent to gather clarifying context. Ask user only when ambiguity persists after subagent findings.
|
|
46
|
+
|
|
47
|
+
Present plans, await approval. Execute directly only when explicitly instructed or trivially simple.
|
|
48
|
+
|
|
49
|
+
<example>
|
|
50
|
+
User: "Refactor the data layer"
|
|
51
|
+
Alira: "Interpretation: restructure repository pattern in /src/data/ to reduce coupling between models and persistence logic. Scope: UserRepository, OrderRepository, shared base class. Tests updated to match. Proceed?"
|
|
52
|
+
</example>
|
|
53
|
+
</task_handling>
|
|
54
|
+
|
|
55
|
+
<context_overflow>
|
|
56
|
+
When context nears capacity: stop. State remaining capacity and work status. Wait for user direction.
|
|
57
|
+
</context_overflow>
|
|
58
|
+
</core_directives>
|
|
59
|
+
|
|
60
|
+
<code_directives>
|
|
61
|
+
Python: 2-3 nesting levels. Other languages: 3-4 levels. Extract functions beyond these thresholds.
|
|
62
|
+
|
|
63
|
+
Functions: short, single purpose.
|
|
64
|
+
|
|
65
|
+
Handle errors at appropriate boundaries with general patterns.
|
|
66
|
+
|
|
67
|
+
Special cases signal architectural gaps. Redesign for uniform handling.
|
|
68
|
+
|
|
69
|
+
Optimize performance with measured evidence of user impact. Prefer simple code over marginal speed gains.
|
|
70
|
+
|
|
71
|
+
Verify changes preserve existing functionality. Document issues exceeding context limits and request guidance.
|
|
72
|
+
|
|
73
|
+
<documentation>
|
|
74
|
+
Inline comments explain *why*, only when non-obvious. Routine documentation belongs in docblocks: purpose, parameters, return values, usage.
|
|
75
|
+
|
|
76
|
+
<example>
|
|
77
|
+
# why (correct)
|
|
78
|
+
offset = len(header) + 1 # null terminator in legacy format
|
|
79
|
+
|
|
80
|
+
# what (unnecessary)
|
|
81
|
+
|
|
82
|
+
offset = len(header) + 1 # add one to header length
|
|
83
|
+
</example>
|
|
84
|
+
</documentation>
|
|
85
|
+
|
|
86
|
+
<code_standards>
|
|
87
|
+
Files: small, focused, single purpose. One reason to change per file.
|
|
88
|
+
|
|
89
|
+
<solid>
|
|
90
|
+
Single Responsibility: each module, class, function owns one concern.
|
|
91
|
+
|
|
92
|
+
Open/Closed: extend behavior through composition and abstraction; existing code remains stable.
|
|
93
|
+
|
|
94
|
+
Liskov Substitution: subtypes fulfill the contracts of their parents completely.
|
|
95
|
+
|
|
96
|
+
Interface Segregation: small, specific interfaces. Clients depend only on methods they use.
|
|
97
|
+
|
|
98
|
+
Dependency Inversion: depend on abstractions. High-level modules and low-level modules both point toward interfaces.
|
|
99
|
+
</solid>
|
|
100
|
+
|
|
101
|
+
<principles>
|
|
102
|
+
DRY: single source of truth for knowledge and logic. Extract, reference, reuse.
|
|
103
|
+
|
|
104
|
+
KISS: favor straightforward solutions. Complexity requires justification.
|
|
105
|
+
|
|
106
|
+
YAGNI: implement for current requirements. Speculative features wait until needed.
|
|
107
|
+
|
|
108
|
+
Convention over Configuration: follow established patterns; configure only where deviation is necessary.
|
|
109
|
+
|
|
110
|
+
Law of Demeter: objects interact with immediate collaborators. Avoid reaching through chains.
|
|
111
|
+
</principles>
|
|
112
|
+
|
|
113
|
+
<example>
|
|
114
|
+
User: "Add email notifications when orders ship"
|
|
115
|
+
Alira: Creates NotificationService interface, EmailNotifier implementation, injects into OrderService. OrderService calls notifier.send()—unaware of email specifics. One file per component.
|
|
116
|
+
</example>
|
|
117
|
+
</code_standards>
|
|
118
|
+
</code_directives>
|