Environment variables
Chef reads connections and credentials from the process environment. The generated project's scripts (pnpm or npm) load .env for you. If you invoke the CLI directly, load that file with Node's --env-file option.
Source, database and API
| Variable | Used by | Purpose |
|---|---|---|
PREP_URL | init, doctor, dev, migrate, sync, status, serve | Prep base URL for this project's source identity |
PREP_API_TOKEN | Prep requests | Optional bearer token for a private Prep deployment |
DATABASE_URL | doctor, dev, migrate, sync, status, serve | PostgreSQL connection string |
CHEF_API_TOKEN | doctor, dev, serve, starter query client | Private bearer token; serve requires 16–4,096 bytes without line breaks |
POSTGRES_PASSWORD | Starter Docker Compose | Password for the optional local PostgreSQL container |
CHEF_URL | Starter query and consumer scripts | API origin; generated .env uses http://127.0.0.1:39370; query clients select /graphql |
For the public testnet Prep preview, set these lines in the generated .env:
PREP_URL=https://zeer.endpx.cloud/api/prep
PREP_API_TOKEN=
Keep the random database password and API token generated by init. For an existing PostgreSQL service, replace DATABASE_URL with that service's connection string.
Direct CLI use
From a project with Chef installed:
node --env-file=.env node_modules/@zeer-dev/chef/dist/cli.js status
node --env-file=.env node_modules/@zeer-dev/chef/dist/cli.js sync
Bare zeer / zeer-chef does not load .env automatically. init reads Prep metadata when latest is selected. An explicit numeric height and the public starter's codegen work without source or database access; a custom config can still depend on environment values while it is imported.
The configuration properties prepUrlEnv, prepTokenEnv and databaseUrlEnv select alternative variable names. Keep the same source URL and project configuration between the writer and reader; the source URL participates in project identity.
Local shielded scanning
The shielded inbox example also uses:
| Variable | Purpose |
|---|---|
ZEER_SCANNER_EXECUTABLE | Absolute local scanner executable path; required for shielded sync |
ZEER_VIEWING_KEY_FILE | Absolute protected UFVK file path; required for shielded sync |
ZEER_ACCOUNT_ID | Local account identifier read by the generated shielded config; defaults to inbox |
ZEER_KEY_FINGERPRINT | Fingerprint read by the inbox config and bound to the account identity |
ZEER_PROJECT, ZEER_BIRTHDAY_HEIGHT | Reference copies of init choices in generated .env; the generated config stores the actual project and start height as literals |
CHEF_LOCAL_URL | Optional absolute loopback HTTP /graphql override for the shielded query client |
ZEER_ACCOUNT_ID and ZEER_KEY_FINGERPRINT are read by the generated application config, not implicit CLI settings. Editing the generated ZEER_PROJECT or ZEER_BIRTHDAY_HEIGHT alone does not change its configured project or start. A custom config can choose to read them. The shielded config requires a valid fingerprint even for codegen, which loads .env but does not load the key. Its query client permits loopback HTTP only. An API reader can serve an existing projection without loading the scanner key. Keep viewing keys in the operator's environment; the public Prep API does not accept them.
Keep .env and UFVK files out of version control. Load server credentials only where the indexer or authenticated reader runs, and use local viewing-key setup for file permissions.
Operational diagnostics
Chef 0.7.0 adds a five-second sync heartbeat and fixed diagnostic actions without new environment variables. --poll-seconds controls follow's source polling; it does not configure heartbeat cadence.
Artifact identity is written during the package build. Runtime diagnostics do not accept a commit or package version from .env and do not inspect the deployment directory's current Git HEAD. Missing provenance is reported as unknown. Diagnostics omit connection strings, bearer tokens, viewing keys and receipt contents; this does not make arbitrary handler logs safe to publish. Keep application logging and saved benchmark artifacts private or redact them before sharing.