Reference
Configuration
Every environment variable and config key, grouped by tool.
brico CLI
| Variable | Description |
|---|---|
BRICO_VAULT | Vault location. Overrides vaultPath in the config; overridden by --vault |
BRICO_PUBLISH_REPO | Repository for publish and pull. Overrides publishRepo; overridden by --repo |
The config file keys are in Manifest and project files.
Install script
| Variable | Default | Description |
|---|---|---|
BRICO_VERSION | latest | Version to install, without the leading v |
BRICO_INSTALL_DIR | ~/.local/bin | Where to put the binary |
BRICO_RELEASE_BASE | GitHub releases | Alternative download location, such as an internal mirror |
GITHUB_TOKEN | — | Used to look up the latest release, if set |
Builder
Set these in apps/workbench/.env.local. Keys stay on the server. Never prefix them with NEXT_PUBLIC_.
Model providers
The Builder only uses free tiers. Add as many keys as you have, and each one becomes a fallback.
| Provider | Key | Default chat / slot model | Guard |
|---|---|---|---|
openrouter | OPENROUTER_API_KEY | openrouter/free | Only openrouter/free or :free models |
mistral | MISTRAL_API_KEY | mistral-small-latest / codestral-latest | Experiment plan |
google | GOOGLE_GENERATIVE_AI_API_KEY | gemini-2.5-flash | Flash models only |
groq | GROQ_API_KEY | llama-3.3-70b-versatile | Free tier |
local | none; set BRICO_LOCAL_MODEL | qwen2.5:3b / BRICO_LOCAL_SLOT_MODEL | Any OpenAI-compatible server; no rate limit |
Model chain
| Variable | Default | Description |
|---|---|---|
BRICO_AI_PROVIDER | openrouter | First provider tried |
BRICO_AI_MODEL | openrouter/free | Interview model |
BRICO_AI_SLOT_MODEL | BRICO_AI_MODEL | Model that writes function bodies |
BRICO_AI_FALLBACKS | — | Explicit order, for example mistral:codestral-latest,groq |
BRICO_AI_AUTO_FALLBACK | true | Use every other provider with a key as a fallback |
BRICO_LOCAL_MODEL | — | Turns on the local provider as the last fallback |
BRICO_LOCAL_SLOT_MODEL | — | Local model for function bodies, for example qwen2.5-coder:3b |
BRICO_LOCAL_URL | http://localhost:11434/v1 | OpenAI-compatible endpoint (Ollama by default) |
BRICO_LOCAL_API_KEY | — | Key for that endpoint, if it needs one |
BRICO_LOCAL_TOOLS | on | Set to off if your local model doesn’t support tool calls |
When a provider fails (rate limit, no quota, outage or timeout), the step moves to the next model in the chain without showing an error. openrouter/free is resolved into a ranked list of free chat models from OpenRouter’s public catalogue, refreshed hourly.
Server and access
| Variable | Description |
|---|---|
BRICO_APP_URL | Public URL of the Builder, for example http://localhost:3000 |
BRICO_BUILDER_ACCESS_KEY | Optional shared key for the Builder endpoints. The UI asks for it once per tab |
BRICO_ACCESS_MODE | token requires a personal invite to use the Builder. The Vault stays public |
BRICO_SESSION_SECRET | Secret that signs invite sessions in token mode |
BRICO_REQUEST_ACCESS_URL | Where the access page sends people without an invite |
BRICO_PUBLIC_DEMO | true marks the Builder as a shared demo and applies per-person limits: 3 builds an hour, 40 interview steps and 6 gate re-runs every 10 minutes |
BRICO_MAX_GENERATED | In public demo mode, keep at most this many generated bricks and remove the oldest. Shipped bricks are never removed |
BRICO_AI_PROVIDER=openrouter
BRICO_AI_MODEL=openrouter/free
OPENROUTER_API_KEY=sk-or-…
MISTRAL_API_KEY=… # becomes a fallback automatically
BRICO_LOCAL_MODEL=qwen2.5:3b # last resort, on your machine
BRICO_APP_URL=http://localhost:3000Managing invites
With BRICO_ACCESS_MODE=token, create, list and revoke invites on the server:
node scripts/brico-access.mjs create "Ada Lovelace" --days 30 # prints a one-time link
node scripts/brico-access.mjs list
node scripts/brico-access.mjs revoke <id-or-name>Only a hash of each invite is stored. The link sets a signed, HttpOnly cookie that lasts until the invite expires (at most 30 days per sign-in). Revoking takes effect on the person’s next request. Rate limits apply per person, and each build records who ran it.
Worker
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | yes | Postgres connection string. Use a least-privileged role |
MISTRAL_API_KEY | yes | Key for code generation |
MISTRAL_MODEL | no | Defaults to codestral-latest |
BRICO_VAULT | no | Where finished bricks are published |
Missing values are read from db/.env.local. Command-line flags are in Worker.
This website
| Variable | Description |
|---|---|
NEXT_PUBLIC_BUILDER_URL | Builder used by /builder. Default https://builder.bricowerx.com |