Environment variables
The Récit commands read a few environment variables: a token or a password that must stay out of a config file and of a shell history, the address of another service, the path of a tool, or a switch for a build. Each one below says which command reads it and what it changes. A flag of the same command wins over its variable when both are set.
Récit sets a few more RECIT_ variables for itself (the mode of recit-site, the sidecar of Récit
Studio, its signed release build): they are not listed here, and setting them by hand is not
supported.
Account and service
| Variable | Read by | What it changes |
|---|---|---|
RECIT_TOKEN | recit whoami; recit login and recit logout warn when it is set | The bearer token used before the one recit login saved, for CI. recit logout never revokes or clears it. See Récit account. |
RECIT_ | recit login, recit logout, recit whoami, the connector, Récit Studio | The Récit service to call instead of the default one; --api-url wins over it. Plain http:// is refused except on localhost, 127.0.0.1 and [::1]. |
RECIT_ | the connector | The personal token the connector sends to the service; with RECIT_, it turns on the tools that call it. See Connector. |
RECIT_ | recit collections publish, recit- | The structure's write token, from a build secret, never from a flag or the config. See Published collections. |
Sites
| Variable | Read by | What it changes |
|---|---|---|
RECIT_ | recit-, recit export -- | The password of a site sealed by access., when access. names no other variable ({ env: "…" }). A wrong or missing one fails the build. See Password. |
RECIT_ | recit- | Set to 1, fails the build on a recoverable problem of the config instead of a warning, as --strict does; ignored by recit-. |
RECIT_ | recit- | Any value opens the browser on the site once the server listens, as --open does. |
RECIT_ | recit-, recit- | Any value writes the code the site's Vite plugins generate to dist/debug/, one file per plugin, to read what a virtual module holds. |
A variable whose name starts with RECIT_ is handed to the pages of a site, in the browser:
it may come from the environment or from a .env file next to recit.. Never put a secret
in one. access. refuses such a name for the same reason.
Stories, renders and prints
| Variable | Read by | What it changes |
|---|---|---|
RECIT_ | recit dev, recit build | Lends node_modules folders to a project that has none: absolute paths joined by : (; on Windows), searched after the project's own. A relative path or a missing folder is refused. See CLI. |
RECIT_FFMPEG | recit render, Récit Studio | The path of the ffmpeg binary that encodes an MP4, instead of the one on the PATH. |
RECIT_ | every PDF and image print | The WebSocket endpoint of a playwright run- of the same version: every print is drawn by that Chromium, with its fonts, instead of a local one. |
RECIT_ | recit app | Moves Cargo's target folder out of the site, to share the compiled dependencies between sites; an explicit CARGO_ wins. See App. |
RECIT_ | recit mcp | The only folder the MCP tools may read and write, when the host passes no --root; the working directory otherwise. See MCP. |