Recipes
Typed, tested stacks that return connection strings, not Dockerfiles.
A recipe is a TypeScript module in packages/recipes that renders one or more briq specs
from validated parameters, and computes outputs (connection strings, credentials) once the
stack is healthy.
Every recipe in the registry gets a page in the cookbook, generated from the same code. A recipe cannot exist without docs, params and a render test.
Anatomy
export const postgres = defineRecipe({
name: 'postgres',
title: 'PostgreSQL',
description: 'A PostgreSQL database with a persistent volume. Optional pgvector.',
tags: ['database', 'sql'],
params: z.object({
version: z.enum(['15', '16', '17']).default('16'),
extensions: z.array(z.enum(['pgvector'])).default([]),
size: z.enum(['nano', 'small', 'medium', 'large']).default('small'),
}),
briqs: (p) => [
{
name: 'db',
image: p.extensions.includes('pgvector')
? `pgvector/pgvector:pg${p.version}`
: `postgres:${p.version}`,
env: { POSTGRES_PASSWORD: secret('POSTGRES_PASSWORD'), POSTGRES_DB: 'app' },
ports: [5432],
size: p.size,
volume: { mount: '/var/lib/postgresql/data', gb: 10 },
healthcheck: { cmd: ['pg_isready', '-U', 'postgres'] },
},
],
outputs: (ctx) => ({
DATABASE_URL: `postgres://postgres:${ctx.secret('POSTGRES_PASSWORD')}@${ctx.host('db')}:5432/app`,
}),
docs: 'postgres.mdx',
});- params is a Zod object. Defaults make
briq_run({ recipe: "postgres" })valid with no params at all. - briqs returns plain specs. Multi-briq recipes return several, and they see each other by name in the stack.
- secret(NAME) marks an env value as generated and write-only. The control plane creates it at run time, injects it, and masks it everywhere except in the recipe outputs.
- outputs runs after the healthcheck passes, with
ctx.host(name)resolving to the internal host andctx.secret(name)to the generated value.
Using a recipe
Over MCP:
briq_run({ recipe: "postgres", params: { version: "17", extensions: ["pgvector"] } })The response contains the briq ids, states, and an outputs object. briq_catalog lists all
recipes with their params and outputs so the model can pick one without reading the docs, and the
MCP resource briq://recipes/postgres carries the recipe's doc page.
Catalog
v0 ships postgres (with optional pgvector) and redis. Planned for v0: mysql, mongo,
minio, mailpit, rabbitmq, chrome (headless). v1 adds multi-briq stacks such as Redis +
BullMQ with Bull Board, Postgres + pgAdmin, Grafana + Prometheus + OTel collector, Meilisearch,
Qdrant, ClickHouse, LocalStack, Keycloak, WireMock, Langfuse, n8n, Metabase, code-server, Jupyter
and Ollama.
Community recipes arrive in v1.1 via pull request to packages/recipes, with a CI check that the
recipe boots on the mock provider, and on real infrastructure nightly.