Environment Variables
Every FABRIC_* environment variable Fabric Agents reads — server, paths, runtimes, Web UI, automations, feature flags, and thin-client setup.
Fabric Agents is configurable through a small set of FABRIC_* environment variables. They're useful for running the headless server, thin-client setups, automations, CI pipelines, and debugging.
Most users don't need to set any of these — the desktop app works out of the box. The ones you're most likely to touch are in the Server & network and Thin-client tables.
Server & network
Used by the headless Fabric Agents server. See Workspaces → Remote workspaces for setup walkthrough.
| Variable | Default | Purpose |
|---|---|---|
FABRIC_SERVER_TOKEN | — | Required for server mode. Bearer token clients must present. Generate with openssl rand -hex 32. |
FABRIC_RPC_HOST | 127.0.0.1 | WebSocket bind address. Set to 0.0.0.0 to accept remote connections. |
FABRIC_RPC_PORT | 9100 | WebSocket bind port. |
FABRIC_RPC_TLS_CERT | — | Path to a PEM certificate. Enables wss://. Required together with FABRIC_RPC_TLS_KEY. |
FABRIC_RPC_TLS_KEY | — | Path to the matching PEM private key. |
FABRIC_RPC_TLS_CA | — | PEM CA chain file for client-certificate verification. Optional. |
FABRIC_HEALTH_PORT | 0 | HTTP port for a health endpoint. 0 disables it. |
Thin-client (desktop connecting to a remote server)
| Variable | Default | Purpose |
|---|---|---|
FABRIC_SERVER_URL | — | ws:// or wss:// URL of the remote Fabric Agents server. |
FABRIC_WORKSPACE_ID | — | Workspace ID on the remote server to connect to. |
FABRIC_TLS_CA | — | PEM CA bundle for self-signed server certificates (client-side). |
Example:
FABRIC_SERVER_URL=wss://203.0.113.5:9100 \
FABRIC_SERVER_TOKEN=<token> \
FABRIC_WORKSPACE_ID=ws-my-project \
bun run electron:startPaths & assets
Mostly set automatically by the app. You usually only touch these when running in development or from source.
| Variable | Default | Purpose |
|---|---|---|
FABRIC_APP_ROOT | cwd | Root path for bundled assets and scripts. |
FABRIC_RESOURCES_PATH | cwd/resources | Resources directory path. |
FABRIC_BUNDLED_ASSETS_ROOT | — | Root of bundled assets. Set to repo root in dev, packaged app dir in production. |
FABRIC_CONFIG_DIR | ~/.fabric-agent | User config directory. Override for testing or multi-profile setups. |
FABRIC_SCRIPTS | — | Scripts directory path. Set by the app at startup. |
Runtimes
Paths to bundled language runtimes. Set automatically; override when debugging.
| Variable | Purpose |
|---|---|
FABRIC_BUN | Bun binary path. |
FABRIC_NODE | Node.js binary path. |
FABRIC_UV | Python uv binary path (for Python-based skills/tools). |
FABRIC_DEV_RUNTIME | Set to 1 to resolve the Claude SDK and interceptor from the monorepo during development. |
App state
Set automatically by the app. Read by internal code.
| Variable | Purpose |
|---|---|
FABRIC_IS_PACKAGED | 1 if running a packaged build, 0 in dev. |
FABRIC_VERSION | App version string. |
FABRIC_DEBUG | 1 or true to enable debug logging. |
FABRIC_HEADLESS | 1 to run Electron without opening a window. |
FABRIC_INSTANCE_NUMBER | For multi-instance dock icons / badges. |
FABRIC_DEEPLINK_SCHEME | Override the fabricagents:// protocol name. |
FABRIC_APP_NAME | Override the window title. |
FABRIC_AGENT_SAFE_MODE | 1 skips workspace config loading — recovery mode. |
Web UI
When hosting the browser-based UI on the server.
| Variable | Purpose |
|---|---|
FABRIC_WEBUI_DIR | Path to the Web UI dist/ directory. Setting this enables the Web UI. |
FABRIC_WEBUI_PASSWORD | Extra password on the login page. |
FABRIC_WEBUI_SECURE_COOKIE | Set Secure flag on the session cookie. Required when served over HTTPS. |
FABRIC_WEBUI_WS_URL | Public wss:// URL when the server is behind a reverse proxy. |
Automation event injection
Set by Fabric Agents when invoking an automation's prompt action. Read these inside a command's $ARGUMENTS template or a shell automation to know the trigger context.
| Variable | Purpose |
|---|---|
FABRIC_EVENT | Event type: SchedulerTick, LabelAdd, LabelRemove, PreToolUse, PostToolUse, SessionStart, SessionEnd, SessionStatusChange, FlagChange, PermissionModeChange. |
FABRIC_EVENT_DATA | Full event payload as a JSON string. |
FABRIC_SESSION_ID | ID of the session the event came from. |
FABRIC_SESSION_NAME | Name of the session. |
FABRIC_WORKSPACE_ID | Workspace the session belongs to. |
FABRIC_LABEL | Label name for LabelAdd / LabelRemove events. |
FABRIC_LOCAL_TIME | HH:MM for SchedulerTick. |
FABRIC_LOCAL_DATE | YYYY-MM-DD for SchedulerTick. |
See Automations for how to wire these up.
Feature flags
| Variable | Purpose |
|---|---|
FABRIC_FEATURE_FABRIC_AGENTS_CLI | Enable/disable the fabric-cli feature exposure. 0 hides it in the UI. |
FABRIC_FEATURE_DEVELOPER_FEEDBACK | Toggle developer-feedback-specific UI. |
FABRIC_ENABLE_1M_CONTEXT | false to disable the 1M context window. |
FABRIC_EXTENDED_PROMPT_CACHE | true to use the 1-hour prompt cache TTL. |
FABRIC_RICH_TOOL_DESCRIPTIONS | false to disable the _intent / action metadata on tool calls. |
FABRIC_INTERCEPTOR_DISABLE_AUTO_INSTALL | 1 skips auto-installing the network interceptor. |
FABRIC_LOCAL_MCP_ENABLED | Enables local MCP server support. |
LLM routing (internal)
Set by the Pi interceptor when routing requests to provider-specific endpoints. Don't set these by hand.
| Variable | Purpose |
|---|---|
FABRIC_PI_MODEL_API | API-type hint for a Pi model. |
FABRIC_PI_MODEL_PROVIDER | Provider hint for a Pi model. |
FABRIC_PI_MODEL_BASE_URL | Base-URL hint for a Pi model. |
Browser tool
Tunables for the built-in Chromium browser tool.
| Variable | Purpose |
|---|---|
FABRIC_BROWSER_OPEN_SETTLE_TIMEOUT_MS | Max ms to wait for a browser launch to settle. |
FABRIC_BROWSER_OPEN_SETTLE_POLL_MS | Poll interval while waiting for settle. |
Related
- fabric-cli — the CLI reads
FABRIC_SERVER_URLandFABRIC_SERVER_TOKEN. - Workspaces — thin-client and remote server setup.
- Automations — how automations inject
FABRIC_EVENT*andFABRIC_SESSION*variables. - config.json — persistent settings that these env vars override at runtime.
Network proxy
Configure an HTTP/HTTPS proxy and a custom CA certificate for Fabric Agents — for corporate networks, TLS inspection middleboxes, and local proxies like mitmproxy.
Share Links & Design Publishing
How session share links (/s/) and design publish links (/d/) work — TTL, expiry, automatic re-share, and the Cloudflare worker endpoints behind them.