Repository navigation
Expand file tree
/
Copy pathsilo.schema.json
More file actions
263 lines (263 loc) · 9.92 KB
/
Copy pathsilo.schema.json
File metadata and controls
263 lines (263 loc) · 9.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/leighmcculloch/silo/main/silo.schema.json",
"title": "Silo Configuration",
"description": "Configuration file for silo - run AI coding tools in isolated containers",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference for editor autocompletion and validation"
},
"backend": {
"type": "string",
"enum": ["docker", "container", "fly", "namespace"],
"description": "Backend to use for running containers. 'docker' uses Docker, 'container' uses Apple's lightweight VMs, 'fly' uses Fly.io remote machines, 'namespace' uses Namespace devboxes (https://namespace.so/devbox). Default: 'container' if installed, else 'docker'",
"examples": ["docker", "container", "fly", "namespace"]
},
"tool": {
"type": "string",
"enum": ["claude", "cline", "codex", "opencode", "paperclipai", "copilot", "vibe", "kilo"],
"description": "Default tool to run. If not set, an interactive prompt is shown.",
"examples": ["claude", "cline", "codex", "opencode", "paperclipai", "copilot", "vibe", "kilo"]
},
"mounts_ro": {
"type": "array",
"items": {
"type": "string"
},
"description": "Read-only directories or files to mount into the container. Paths starting with ~ are expanded to home directory.",
"examples": [["~/.gitconfig", "~/.ssh/known_hosts"]]
},
"mounts_rw": {
"type": "array",
"items": {
"type": "string"
},
"description": "Read-write directories or files to mount into the container. Paths starting with ~ are expanded to home directory.",
"examples": [["~/.cache/myapp"]]
},
"env": {
"type": "array",
"items": {
"type": "string"
},
"description": "Environment variables. Names without '=' pass through from host, names with '=' set explicitly (e.g., 'FOO=bar').",
"examples": [["MY_API_KEY", "DEBUG=1"]]
},
"pre_run_hooks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Shell commands to run inside the container before the tool starts. Useful for dynamic setup that depends on the mounted working directory.",
"examples": [["cd /workspace && npm install"]]
},
"post_build_hooks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Shell commands to run inside the container after building the image. These are baked into the image and cached.",
"examples": [["apt-get update && apt-get install -y ripgrep", "npm install -g typescript"]]
},
"ports": {
"type": "array",
"items": {
"type": "string"
},
"description": "Host:container port mappings to publish from the container. Format: 'hostPort:containerPort' or just 'containerPort' (maps to same host port).",
"examples": [["3484:3484", "8080:8080"]]
},
"backends": {
"type": "object",
"description": "Backend-specific configuration.",
"properties": {
"fly": {
"type": "object",
"description": "Configuration for the Fly.io backend.",
"properties": {
"app": {
"type": "string",
"description": "Fly.io app name. Required when using the fly backend. App names are globally unique on Fly.io — create one with 'fly apps create <name>'.",
"examples": ["my-silo-app"]
},
"region": {
"type": "string",
"description": "Fly.io region for new machines. Default: 'syd'. See https://fly.io/docs/reference/regions/ for available regions.",
"examples": ["syd", "sjc", "iad", "lhr"]
}
},
"additionalProperties": false
},
"namespace": {
"type": "object",
"description": "Configuration for the Namespace devbox backend (https://namespace.so/devbox).",
"properties": {
"size": {
"type": "string",
"enum": ["s", "m", "l", "xl"],
"description": "Namespace devbox machine size. Default: 'm'.",
"examples": ["s", "m", "l", "xl"]
},
"site": {
"type": "string",
"description": "Namespace site to optimize built images for and run devboxes in. Default: 'sjc1'. Common sites: 'sjc1' (Bay Area), 'iad' (North Virginia), 'ord' (Illinois), 'zrh' (Switzerland).",
"examples": ["sjc1", "iad", "ord", "zrh"]
},
"idle_timeout": {
"type": "string",
"enum": ["15m", "30m", "1h", "2h", "4h", "6h", "8h", "12h"],
"description": "How long the devbox can be idle before it is automatically stopped. Default: '15m'.",
"examples": ["15m", "30m", "1h", "2h", "4h", "6h", "8h", "12h"]
},
"volume_size_gb": {
"type": "integer",
"minimum": 1,
"description": "Override the default persistent volume size, in GiB. When omitted, the devbox default is used.",
"examples": [50, 100, 300]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"tools": {
"type": "object",
"description": "Tool-specific configuration. Each key is a tool name (e.g., 'claude', 'cline', 'codex', 'opencode', 'paperclipai', 'copilot', 'vibe', 'kilo').",
"additionalProperties": {
"$ref": "#/$defs/toolConfig"
},
"examples": [{
"claude": {
"env": ["CLAUDE_SPECIFIC_VAR"]
}
}]
},
"repos": {
"type": "object",
"description": "Repository-specific configuration. Each key is a substring to match against git remote URLs (prefix matching). When the current directory is a git repository and any remote URL contains the key as a substring, that configuration is applied. Multiple patterns can match the same repo; they are applied in order of specificity (shortest pattern first), so more specific patterns extend or override less specific ones.",
"additionalProperties": {
"$ref": "#/$defs/repoConfig"
},
"examples": [{
"github.com/myorg": {
"tool": "opencode",
"env": ["ORG_API_KEY"],
"post_build_hooks": ["npm install -g @myorg/cli"]
},
"github.com/myorg/specific-repo": {
"tool": "claude",
"env": ["REPO_SPECIFIC_VAR"],
"pre_run_hooks": ["echo 'Setting up specific-repo'"]
}
}]
}
},
"$defs": {
"toolConfig": {
"type": "object",
"description": "Configuration specific to a single tool. These settings are merged with global config when running that tool.",
"properties": {
"mounts_ro": {
"type": "array",
"items": {
"type": "string"
},
"description": "Read-only directories or files to mount for this tool only."
},
"mounts_rw": {
"type": "array",
"items": {
"type": "string"
},
"description": "Read-write directories or files to mount for this tool only."
},
"env": {
"type": "array",
"items": {
"type": "string"
},
"description": "Environment variables for this tool only. Same format as global env."
},
"pre_run_hooks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Shell commands to run inside the container before this tool starts."
},
"post_build_hooks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Shell commands to run in the Dockerfile for this tool's build stage."
},
"ports": {
"type": "array",
"items": {
"type": "string"
},
"description": "Host:container port mappings to publish for this tool."
}
},
"additionalProperties": false
},
"repoConfig": {
"type": "object",
"description": "Configuration specific to a git repository. Applied when any git remote URL contains the key as a substring. When multiple patterns match, configs are merged in order of specificity (shortest pattern first).",
"properties": {
"tool": {
"type": "string",
"description": "Tool to use for this repository (e.g., 'claude', 'cline', 'opencode', 'paperclipai', 'copilot', 'kilo')."
},
"mounts_ro": {
"type": "array",
"items": {
"type": "string"
},
"description": "Read-only directories or files to mount for this repository."
},
"mounts_rw": {
"type": "array",
"items": {
"type": "string"
},
"description": "Read-write directories or files to mount for this repository."
},
"env": {
"type": "array",
"items": {
"type": "string"
},
"description": "Environment variables for this repository. Same format as global env."
},
"pre_run_hooks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Shell commands to run inside the container before the tool starts."
},
"post_build_hooks": {
"type": "array",
"items": {
"type": "string"
},
"description": "Shell commands to run in the Dockerfile."
},
"ports": {
"type": "array",
"items": {
"type": "string"
},
"description": "Host:container port mappings to publish for this repository."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}