Documentation
¶
Overview ¶
Command fabriq is the data fabric's single binary: a Forge app wrapped in a CLI (forge/cli RunApp). The same image runs the long-lived worker and the one-shot operator commands, sharing one wiring path.
fabriq serve (default): run the background plane fabriq serve|start|run same, explicit fabriq migrate up|down|status grove migrations (advisory-locked) fabriq inspect registry|state dump entity specs / projection state fabriq rebuild blue-green projection rebuild fabriq reconcile drift reconciliation fabriq analytics backfill replay tenant snapshots into the analytics sink fabriq info|health|extensions Forge built-ins
The worker (serve) is a Forge RunnableExtension: leader-elected outbox relay, projection consumers, reconciler, document plane. With FABRIQ_ADMIN_API=true serve also mounts the admin API under /admin behind API-key auth. fabriq's own probes are /_/livez and /_/readyz (ready only once the facade is open and the stores answer, with no grace period); forge adds /_/health and /_/metrics, fabriq adds /metrics.
Configuration is environment-first (the deployment injects a secret + configmap); --dsn overrides FABRIQ_POSTGRES_DSN for ad-hoc operator use. rebuild and reconcile read the same store addresses and credentials, and their --falkordb and --elasticsearch flags override the addresses.
FABRIQ_POSTGRES_DSN (required to serve) FABRIQ_REDIS_ADDR (required to serve) FABRIQ_FALKORDB_ADDR (optional: graph projection) FABRIQ_ELASTICSEARCH_ADDRS (optional, comma-separated: search projection) FABRIQ_REDIS_USERNAME, FABRIQ_REDIS_PASSWORD (optional) FABRIQ_FALKORDB_USERNAME, FABRIQ_FALKORDB_PASSWORD (optional) FABRIQ_ELASTICSEARCH_USERNAME, FABRIQ_ELASTICSEARCH_PASSWORD (optional) FABRIQ_HTTP_ADDR (default :8081) FABRIQ_RECONCILE_INTERVAL (Go duration, default 5m; "0" disables) FABRIQ_DOMAIN_PACK (example (default) or none) FABRIQ_DYNAMIC_PERSIST (default true: persist and reload runtime-defined entity types) FABRIQ_DYNAMIC_SYNC_INTERVAL (Go duration, default 15s: pick up types other processes define) FABRIQ_ADMIN_API (default false: mount the admin API with key auth) FABRIQ_ADMIN_KEY (required when FABRIQ_ADMIN_API=true: bootstrap key, fq_ + 32 or more letters or digits) FABRIQ_ADMIN_LOGIN_USER (optional, with FABRIQ_ADMIN_LOGIN_PASSWORD: enable POST /admin/login) FABRIQ_ADMIN_LOGIN_PASSWORD (optional, with FABRIQ_ADMIN_LOGIN_USER; at most 72 bytes) FABRIQ_ALLOW_RLS_BYPASS (default false; development only: let the admin API serve as a superuser or BYPASSRLS role)
A bad value in FABRIQ_HTTP_ADDR down to FABRIQ_DYNAMIC_SYNC_INTERVAL (a bad duration or bool, an unknown pack) fails every command, because the config is wrong. The admin-only variables (FABRIQ_ADMIN_*, FABRIQ_ALLOW_RLS_BYPASS) are checked only when the server starts, so a bad value there, half a login pair, a login password over 72 bytes or a missing FABRIQ_ADMIN_KEY makes serve exit 1 while migrate and the other operator commands ignore them.