Skip to Content
BricoleDocs

Development and operations settings

Look up local Worker variables, runtime bindings, administration and usage commands, and the repository’s proof and packaging options.

Use the operator configuration to configure a deployed host. This reference covers the settings a developer sees when running the local host, inspecting a generated Worker configuration, or working with the repository tools.

Local host

Copy apps/host/.dev.vars.example to the git-ignored apps/host/.dev.vars. Set a fresh local operator token before using the admin commands. Run bun run dev from the repository root. The shell and wrapper build first; the local Worker normally listens on port 8787. Its dev wrapper preserves the local request origin.

Local variableMeaning
DEV_SIGNINSet to 1 for local development sign-in as an existing actor. Both the request URL and Host header must name localhost or 127.0.0.1. Leave this out of deployed configurations.
OPERATOR_TOKENSecret for the host’s administrative HTTP routes. Those routes stay disabled when the configured value is shorter than 32 characters. Replace the placeholder in your local file.
SETUP_CODEOne-time first-administrator claim. A configured value must be 32–1,024 characters to enable the claim. Empty in the example file.
APPS_DOMAIN, HOST_DOMAIN, APPS_LABEL_SUFFIXThe example uses localhost:8787 for artifact origins, an empty host override (the apps domain) and an empty label suffix. For deployed hosts the operator derives these from domains.
SIGN_IN_PROVIDEROne provider per host, email, access or oidc. An absent or unknown value leaves ordinary sign-in unconfigured. Local development sign-in has its own switch.
ACCESS_TEAM_DOMAIN, ACCESS_AUD, ACCESS_EMAIL_VERIFIEDAccess team origin, application AUD, and explicit email assurance. Only the string true enables verified-email handling. On a deployed host use the corresponding identity.access settings.
CREATORSOptional list of creator email addresses, comma-separated, trimmed and compared case-insensitively. A verified match promotes a member at sign-in. Removing an entry leaves that actor’s current role intact. Keep actual addresses in the secret.
TOOL_PROBERelease default off. When off, a revision exposing MCP supplies its tool list in the manifest. The experimental on path probes the candidate runtime at publish time. The supported operator file has no override for this setting.

Generated Worker bindings

The operator combines your installation file with the checked-in host and identity Worker bases. Read the generated files under each Worker’s .deploy/ directory to inspect the result. Editing a generated file does not persist a change to the operator file.

ComponentNames and purpose
Host state and servingARTIFACTS and DIRECTORY are SQLite Durable Object bindings. OAUTH_KV stores OAuth state. LOADER loads artifact server code. ASSETS serves the built shell. The release base fixes the classes, entry point, compatibility settings, observability, source-map upload, and shell asset configuration.
Website routingPUBLIC_WEBSITE_HOSTS maps each exact hostname to a released artifact. The operator generates it from websites.
IdentityIDENTITY binds the host to the optional identity service. That Worker uses DB for its D1 database and AUTH_SECRET for authentication. With mail configured it uses EMAIL and EMAIL_FROM. With OIDC configured it uses HOST_ORIGIN, OIDC_ISSUER, OIDC_CLIENT_ID and OIDC_CLIENT_SECRET.
Admin Usage pageThe optional analytics block supplies CLOUDFLARE_ANALYTICS_ACCOUNT, CLOUDFLARE_ANALYTICS_WORKER, CLOUDFLARE_ANALYTICS_KV, CLOUDFLARE_ANALYTICS_ARTIFACTS and CLOUDFLARE_ANALYTICS_DIRECTORY. The host also needs the read-only secret CLOUDFLARE_ANALYTICS_TOKEN.

Artifact-local storage, runtime bindings and tool declarations belong to the artifact manifest. For provider setup and credential ownership, see authentication and the operator CLI.

Administrative CLI

bun run admin help lists the break-glass administrative commands. BRICOLE_URL defaults to http://localhost:8787. The CLI reads OPERATOR_TOKEN from its environment; for a loopback host it can also read the local Worker file. Use fictional actors when exercising commands locally.

Command after bun run adminResult
actorsList actors, oldest first, with host roles and Access linkage.
actor <label> [--can-create]Create a member, or a creator when the flag is supplied.
role <actor-id> <member|creator|admin>Set a host role. Naming an admin closes the first-admin claim.
token <actor-id>Issue a token for an actor. Store the value when it is shown.
connections <actor-id>List the actor’s connections, including revoked connections.
revoke <actor-id> [<connection-id>]Revoke one connection. Omitting the connection ID revokes all remaining connections for the actor.
disable <actor-id>Offboard the actor, end sessions, revoke connections and tokens, and prevent sign-in.
enable <actor-id>Allow sign-in again. Previously revoked credentials remain revoked.

Usage and cost CLI

bun run usage help prints both forms. bun run usage cost queries Cloudflare analytics using CLOUDFLARE_ANALYTICS_TOKEN. It estimates usage at overage rates. An invoice can also reflect allowances and other account charges.

FlagMeaning
--from, --toRequired inclusive UTC dates in YYYY-MM-DD form. Use completed days only, up to 31 days per request.
--accountCloudflare account ID. Defaults to CLOUDFLARE_ACCOUNT_ID.
--script, --kvFor host totals, supply the host Worker name and OAuth KV namespace ID.
--namespacesComma-separated Durable Object namespace IDs. For host totals, omission reads every namespace on the account. Supply the installation’s IDs to isolate its usage.
--by artifact, --artifactsSwitch to per-artifact attribution and give the Artifact class’s namespace ID. Supply separate overhead namespaces in --namespaces if desired. This mode also requires BRICOLE_URL and an admin actor’s token in BRICOLE_TOKEN to join runtime IDs to artifacts.

Template proofs and packages

Command from the repository rootWhat to configure
bun run proof [--complete] [--port <n>]Builds the catalog templates and exercises their published bundles on a disposable local Worker. Uses a free port unless you specify one. --complete also requires the set of templates to cover every manifest branch the proof tracks.
bun run catalog, bun run catalog:checkGenerate or check the catalog against the template metadata.
bun run pack [--out <directory>]Builds the SDK and publisher tarballs into the selected directory, default dist/. Filenames include content hashes for local file dependencies.
bun tools/pack.ts --check <template-folder>Verify the copied template’s install, types, tests and build against packed SDK and publisher tarballs outside the workspace. bun run pack-check applies this check to the starter.

Manual and public site builds

bun run docs:dev serves the Fumadocs manual under /docs/. bun run docs:build writes the static site, search index and Markdown exports to sites/docs/dist/. The release uses sites/docs/bricole.json, with index.html as the entry. The source checkout includes release commands in sites/docs/RELEASE.md. A new build reaches the public address when the owner releases the published revision.

The marketing website has a separate workspace and artifact. bun run website:dev builds Astro and serves a local Worker on port 8788 with its local WAITLIST D1 binding. bun run --filter @bricole/website build:review packages the review variant and build:website packages the public release variant. Each mode selects its own Astro configuration, public material and bundle manifest. When preparing design assets, the template cover and website capture tools accept CHROME as the browser executable path.