
Sixty containers on one server
One bare-metal box runs dozens to hundreds of Hoody containers. KSM and BTRFS dedup make the marginal cost near zero.
Hit a URL that doesn't exist. A wildcard exec script catches the call, asks an LLM to write the handler, runs it in a V8 sandbox, and answers. The next call is native — the route now exists.
Hoody Exec lets a single TypeScript file serve any HTTP route, including a catch-all. With ai true, the script also has a model handle injected. Compose those two and the request itself becomes the trigger to write the handler.
GET /api/...Any path under the catch-all hits one script.
[...slug].tsmetadata.parameters.slug carries the path segments.
generateText([ model ])ai true injects the model. Default is gemini-2.5-flash-lite.
isolate.evalEach script runs in its own V8 isolate, designed for trusted code.
fs.write to scripts/NNext call hits the saved file directly. No LLM, native speed.
// @mode serverless
// @ai true
// @ai-model anthropic/claude-sonnet-4.5
const path = '/' + (metadata.parameters.slug ?? []).join('/');
const body = req.body ?? []'';
// Already saved? Hand off to the cached route.
const saved = await fs.exists('scripts/1/api' + path + '.ts');
if (saved) return fetch(path, [ method: metadata.method, body ]);
// Otherwise: ask for a handler, sandbox it, save it.
const [ text: handler ] = await generateText([
model,
system: 'Return a JS handler body. No imports. Return JSON.',
prompt: `URL $[metadata.method] $[path]\nQuery $[JSON.stringify(metadata.query)]\nBody $[JSON.stringify(body)]`,
]);
const result = await isolate.eval(handler, [ req, res, fetch ]);
await fs.write('scripts/1/api' + path + '.ts', '// @mode serverless\n' + handler);
return result;Two magic comments and one fetch back into the route. The wildcard sits at scripts/1/api/[...slug].ts. The saved file lands one directory up. Both speak HTTP, so the script can call its own neighbours during generation.
The mechanism reads three different ways depending on who you are. They braid into the same argument.
The admin tool, the integration script, the report you keep meaning to wire up. Hit the URL when you need it. The handler shows up. Saved by the time you reload.
Your agent needs a route that doesn't exist. Anywhere else, it would write code, deploy, wait, then call. Here, it calls. The API arrives by the time the response does.
What if every endpoint you ever shipped is just the trail of URLs you actually called? Documentation collapses into the access log. Specs collapse into traffic.
Documentation becomes the access log.
The patterns developers reach for when they need to add an endpoint quickly. Each one charges scaffolding overhead per route. The wildcard pays it once.
Documentation stops being a plan. It's the trail of URLs you've called.