Docs menu

Reference

Configuration

Every environment variable and config key, grouped by tool.

brico CLI

VariableDescription
BRICO_VAULTVault location. Overrides vaultPath in the config; overridden by --vault
BRICO_PUBLISH_REPORepository for publish and pull. Overrides publishRepo; overridden by --repo

The config file keys are in Manifest and project files.

Install script

VariableDefaultDescription
BRICO_VERSIONlatestVersion to install, without the leading v
BRICO_INSTALL_DIR~/.local/binWhere to put the binary
BRICO_RELEASE_BASEGitHub releasesAlternative 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.

ProviderKeyDefault chat / slot modelGuard
openrouterOPENROUTER_API_KEYopenrouter/freeOnly openrouter/free or :free models
mistralMISTRAL_API_KEYmistral-small-latest / codestral-latestExperiment plan
googleGOOGLE_GENERATIVE_AI_API_KEYgemini-2.5-flashFlash models only
groqGROQ_API_KEYllama-3.3-70b-versatileFree tier
localnone; set BRICO_LOCAL_MODELqwen2.5:3b / BRICO_LOCAL_SLOT_MODELAny OpenAI-compatible server; no rate limit

Model chain

VariableDefaultDescription
BRICO_AI_PROVIDERopenrouterFirst provider tried
BRICO_AI_MODELopenrouter/freeInterview model
BRICO_AI_SLOT_MODELBRICO_AI_MODELModel that writes function bodies
BRICO_AI_FALLBACKS—Explicit order, for example mistral:codestral-latest,groq
BRICO_AI_AUTO_FALLBACKtrueUse 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_URLhttp://localhost:11434/v1OpenAI-compatible endpoint (Ollama by default)
BRICO_LOCAL_API_KEY—Key for that endpoint, if it needs one
BRICO_LOCAL_TOOLSonSet 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

VariableDescription
BRICO_APP_URLPublic URL of the Builder, for example http://localhost:3000
BRICO_BUILDER_ACCESS_KEYOptional shared key for the Builder endpoints. The UI asks for it once per tab
BRICO_ACCESS_MODEtoken requires a personal invite to use the Builder. The Vault stays public
BRICO_SESSION_SECRETSecret that signs invite sessions in token mode
BRICO_REQUEST_ACCESS_URLWhere the access page sends people without an invite
BRICO_PUBLIC_DEMOtrue 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_GENERATEDIn public demo mode, keep at most this many generated bricks and remove the oldest. Shipped bricks are never removed
apps/workbench/.env.local
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:3000

Managing invites

With BRICO_ACCESS_MODE=token, create, list and revoke invites on the server:

bash
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

VariableRequiredDescription
DATABASE_URLyesPostgres connection string. Use a least-privileged role
MISTRAL_API_KEYyesKey for code generation
MISTRAL_MODELnoDefaults to codestral-latest
BRICO_VAULTnoWhere finished bricks are published

Missing values are read from db/.env.local. Command-line flags are in Worker.

This website

VariableDescription
NEXT_PUBLIC_BUILDER_URLBuilder used by /builder. Default https://builder.bricowerx.com