Documentation
/ Reference
Configuration
Packages that have settings read them from the environment, or from a .env file beside them, and
ship a .env.example listing the keys they actually need. Names below are the environment variable
names; the package's config.py is the authority. Three packages have no config.py:
hive-dbparse and hive-apispec have no settings, and
hive-ingest reads only its Jev key.
Names that mention a vendor
Several variables are named after the specific tools Hive was first built against rather than after the role they fill:
| Variable | Actually means |
|---|---|
BIFROST_BASE, BIFROST_API_KEY |
any OpenAI-compatible model gateway |
DOCLING_BASE, DOCLING_API_KEY, PREFER_DOCLING |
the document converter service |
QWEN_BASE, QWEN_API_KEY, QWEN_MODEL |
the vision model endpoint |
None of these require the named product. Any OpenAI-compatible endpoint satisfies the first and third; the second wants a converter speaking the same HTTP contract.
The names are kept for the same reason as the OKF_ prefixes below: renaming an environment
variable does not fail loudly, it starts the service with a default instead. Renaming them is
tracked work and belongs with a major version, not a documentation pass.
The model defaults are likewise recommendations rather than requirements, and name models that must
exist on your gateway, under the id that gateway uses: OpenRouter, the address the .env.example
files sample, namespaces ids by provider (deepseek/deepseek-v4-flash). Set them explicitly -
against a reachable gateway a wrong id comes back as an unknown model, so the error names the model
rather than the setting.
A note on OKF_ prefixes
Two setting names (OKF_DATA_DIR, OKF_DEFAULT_OWNER) still carry an OKF_ prefix from before
the format and the system had separate names. They configure Hive, not the OKF format, so the
prefix is now misleading.
They are kept anyway. Renaming an environment variable silently changes behaviour on every existing deployment at the moment it is redeployed, and the failure is a service that starts cleanly with default settings rather than an error. That is not a trade worth making for tidiness. They are flagged where they appear.
hive-serve
| Variable | Default | Notes |
|---|---|---|
CONCEPTS_DIR |
empty | required. Corpus concept cards; the server refuses to start unless it names a directory. No default since 0.7.0 - see below |
CLIENTS_DIR |
empty | client-scoped cards and records. Leave empty to disable client memory and client records entirely; never a startup refusal |
RECORDS_DIR |
empty | shared records, one folder for each product, for find_records and get_record. Empty means no shared records. A value that is not a directory, or holds no record in a product folder, refuses at startup. The records of a client are under CLIENTS_DIR and need no setting |
EVAL_DIR |
empty | labelled eval sets, used by run_eval and python -m hiveserve.calibrate. No default: they ship with a corpus |
LEDGER_DSN |
empty | required by the default full tool profile, and not read under retrieval. Postgres for the objective and memory ledger. The only state not in git |
OKF_DATA_DIR |
./.data |
non-ledger scratch, including run_eval reports |
HOST |
127.0.0.1 |
loopback by default, deliberately |
PORT |
8000 |
|
TRANSPORT |
stdio |
stdio for direct MCP clients, or HTTP via serve --http |
TOOL_PROFILE |
full |
which MCP tools exist. full is all seventeen, including the ledger and memory tools that write. retrieval is the seven read-only retrieval tools, with no ledger connection and no LEDGER_DSN. Anything else, empty included, refuses at startup. Not an authentication setting: see tool profiles |
IDENTITY_HEADER |
x-forwarded-email |
the trusted header. Trusted, not verified |
OKF_DEFAULT_OWNER |
local-operator |
ledger owner when no identity header is present |
MAX_CARDS |
8 |
bundle size cap for resolve (REST, MCP and run_eval) |
MAX_CHARS |
40000 |
bundle character cap, and the page size of get_record |
RESOLVE_DEPTH |
1 |
how far run_eval follows related; REST POST /resolve and MCP resolve default depth to 1 per call |
BIFROST_BASE |
empty | model gateway, evaluation only. The serving path never uses it |
BIFROST_API_KEY |
empty | as above |
SELECT_MODEL |
deepseek/deepseek-v4-flash |
evaluation harness only. Provider id, not a gateway alias |
ANSWER_MODEL |
deepseek/deepseek-v4-pro |
evaluation harness only |
JUDGE_MODEL |
deepseek/deepseek-v4-pro |
evaluation harness only |
BIFROST_TIMEOUT_S |
300 |
|
BIFROST_TEMPERATURE |
empty | sampling temperature for the chat calls. Empty sends 0, as the engine always did. omit (any case) sends no temperature field: set it for a model that rejects the field, such as claude-sonnet-5-5 and claude-opus-5-5, whose endpoint answers HTTP 400 "temperature is deprecated for this model". A number sends that number. Anything else is refused, naming the setting. Evaluation harness only |
TYPESAFE_API_KEY |
empty | the entire on/off switch for the optional semantic layer. Empty means keyless, LLM-free, byte-for-byte as without it; setting it turns the layer on. See semantic layer |
SYSTEMONE_MODEL |
jev-1.13.0 |
the System One model id, an opaque identifier passed through to the service as model - versioned ids and aliases both work exactly as the service accepts them. jev-1.13.0 is the built-in calibration posture, not a retrieval-quality claim (see semantic layer); any other id needs SYSTEMONE_CALIBRATED_MODELS before its judgments may influence decisions |
FACET_TAXONOMY_PATH |
empty | closed facet taxonomy (YAML) the query is routed against. Empty drops the facet-bucket arm of the candidate union |
SYSTEMONE_QUERY_DENYLIST |
empty | comma-separated client identifiers redacted from a query before it is egressed. The owner id and client selector are never sent, and client-scoped card text is refused structurally; this only guards free-text client names in the query |
SYSTEMONE_TIMEOUT_S |
30 |
per-call timeout |
SYSTEMONE_KEYWORD_LIMIT |
40 |
width of the union's keyword arm |
SYSTEMONE_MAX_CANDIDATES |
60 |
hard cap on the candidate union sent to the model |
SYSTEMONE_BATCH_MAX_BYTES |
64000 |
upper bound on one relevance request, in bytes of its body as sent (UTF-8 JSON). A query's candidates are judged in one request when they fit (typically), otherwise in as few bounded requests as needed - never one request per candidate. Under 1024 is refused at startup. See one request per read |
SYSTEMONE_RELEVANCE_FLOOR / SYSTEMONE_SUFFICIENCY_FLOOR / SYSTEMONE_CONFIDENCE_FLOOR |
0.5 / 0.5 / 0.6 |
calibratable judgment thresholds - conservative placeholders. Calibrate on held-out in-domain data before relying on the layer; python -m hiveserve.calibrate measures the relevance floor |
SYSTEMONE_CACHE_TTL_S |
300 |
query-time judgment cache TTL |
SYSTEMONE_BREAKER_THRESHOLD / SYSTEMONE_BREAKER_COOLDOWN_S |
5 / 30 |
circuit breaker: consecutive failures before it opens, cool-down before a probe re-closes it |
SYSTEMONE_CALIBRATED_MODELS |
empty | comma-separated model ids for which the operator declares the configured thresholds calibrated on held-out in-domain data. jev-1.13.0 is always postured; any other id must be listed here or the layer serves the labelled deterministic fallback / abstains |
The semantic-layer settings above take effect only once TYPESAFE_API_KEY is set; every one of
them is off or inert otherwise. See semantic layer
for what they do.
Every SYSTEMONE_* name above, except SYSTEMONE_CALIBRATED_MODELS and
SYSTEMONE_BATCH_MAX_BYTES, which never had one, keeps its documented JEV_* predecessor (JEV_MODEL,
JEV_TIMEOUT_S, JEV_KEYWORD_LIMIT, JEV_MAX_CANDIDATES, JEV_RELEVANCE_FLOOR, JEV_SUFFICIENCY_FLOOR,
JEV_CONFIDENCE_FLOOR, JEV_CACHE_TTL_S, JEV_BREAKER_THRESHOLD, JEV_BREAKER_COOLDOWN_S,
JEV_QUERY_DENYLIST) as a legacy alias, so existing deployments read unchanged; the new name
wins when both are set.
For IDENTITY_HEADER's ledger-owner role and the mandatory proxy for wider exposure, see
the serving trust boundary.
CONCEPTS_DIR has no default
Breaking in 0.7.0.
CONCEPTS_DIRandCLIENTS_DIRused to default to../../conceptsand../../clients. A deployment that relied on either must now set it explicitly, preferably to an absolute path.hiveserve serverefuses to start withoutCONCEPTS_DIRand names it.
CLIENTS_DIRdoes not refuse, by design, so an upgrade is silent there: a deployment whose../../clientshappened to resolve onto a real tree now has client memory off, answers client questions from shared cards alone, and logs nothing about it. SetCLIENTS_DIRexplicitly to keep client memory.
Those defaults were resolved against the working directory of the process, not against where
hive-serve is installed. Two identically configured deployments started from two different
directories therefore served two different corpora, or one corpus and one refusal, with nothing in
the logs to distinguish them.
Worse, the default made the refusal unreachable. The startup check is "set, and a directory" - it
is not "is this the corpus you meant" - so it cannot catch ../../concepts happening to resolve
onto something: a stale corpus, a half-synced clone, another deployment's tree. An arbitrary
markdown file two levels up was reproducibly served as a concept card by a server whose operator
had set nothing at all. That answers confidently and wrongly, which is the one failure mode this
system exists to avoid, and it is worse than the refusal an empty setting gives you.
CLIENTS_DIR loses its default for the same reason, but its empty value means something different:
client memory is legitimately optional, so empty is off rather than the working directory, and
it is never a startup refusal. CLIENTS_DIR= is what .env.example ships and what a deployment
with no client memory should send.
hive-gen
Model stages deprecated. Taxonomy, assignment and distillation are deprecated; see what is deprecated and what stays.
CARD_CORPUS_ROOT,SLICE_AREA,ATOMIC_SOURCE, theR2_*settings,TAXONOMY_MODEL,DISTILL_MODELandMAX_CHARSserve only those stages, and remain for existing consumers.
| Variable | Default | Notes |
|---|---|---|
CARD_CORPUS_ROOT |
empty | required. The card corpus working tree: taxonomies, drafts/, .pipeline/. Not hive-prep's CORPUS_ROOT |
ATOMIC_SOURCE |
local |
document reader for python -m hivegen.run: local or explicit r2. Empty or other values refuse. Existing R2 configurations must add ATOMIC_SOURCE=r2 |
ATOMIC_DIR |
empty | required with ATOMIC_SOURCE=local. Atomic markdown from hive-prep; unset, empty or invalid paths refuse before profile lookup or remote access. Ignored with ATOMIC_SOURCE=r2; never a fallback selector |
SLICE_AREA |
empty | which functional area to generate |
R2_ENDPOINT |
empty | required with ATOMIC_SOURCE=r2. No default, and an empty one is not usable: botocore raises ValueError: Invalid endpoint: as the client is built, several frames down, naming no setting |
R2_ACCESS_KEY_ID |
empty | |
R2_SECRET_ACCESS_KEY |
empty | |
R2_BUCKET |
empty | required with ATOMIC_SOURCE=r2. No default: a bucket that is not yours lists nothing, which reads exactly like a bucket with nothing in it |
R2_PREFIX |
empty | required with ATOMIC_SOURCE=r2. A bucket holds more than one dataset, so an empty prefix is not "everything I wanted", it is "everything anyone put there" |
BIFROST_BASE |
required | model gateway |
BIFROST_API_KEY |
required | |
TAXONOMY_MODEL |
minimax/minimax-m3 |
gate 1 (deprecated), the concept list |
ASSIGN_MODEL |
deepseek/deepseek-v4-flash |
document to concept assignment (deprecated), and the re-topic and regime classification passes |
DISTILL_MODEL |
minimax/minimax-m3 |
gate 2 (deprecated), the card bodies |
CONFLICT_MODEL |
minimax/minimax-m3 |
the memory-conflict judge behind hivegen-memory-conflict-score and hivegen-pr-conflict-gate. A value the gateway does not serve blocks every candidate pair: scoring fails safe, so an unanswered request scores 1.0 and the gate posts state: failure on a verdict nothing measured. Read from the environment (not .env) alongside BIFROST_BASE, BIFROST_API_KEY and BIFROST_TEMPERATURE (with a fixed 120s timeout rather than BIFROST_TIMEOUT_S), so it is absent from .env.example |
MAX_CHARS |
24000 |
source characters per distillation call |
BIFROST_TIMEOUT_S |
300 |
|
BIFROST_TEMPERATURE |
empty | sampling temperature for the chat calls. Empty sends 0, as the engine always did. omit (any case) sends no temperature field: set it for a model that rejects the field, such as claude-sonnet-5-5 and claude-opus-5-5, whose endpoint answers HTTP 400 "temperature is deprecated for this model". A number sends that number. Anything else is refused, naming the setting. Also read from the environment by hivegen-memory-conflict-score and hivegen-pr-conflict-gate, with the same rules |
TYPESAFE_API_KEY |
empty | with FACET_TAXONOMY_PATH, gates the optional hivegen-facet-pass (System One). Read via a separate FacetPassSettings, so the pass needs no BIFROST_*. Both empty by default, leaving the pass off |
FACET_TAXONOMY_PATH |
empty | closed facet taxonomy (YAML) each card is classified against. Both this and a key are required for the pass to run; either empty leaves it off and the generation pipeline unchanged |
SYSTEMONE_MODEL |
jev-1.13.0 |
the System One model id for the facet pass, an opaque identifier passed through as-is. Pin the version. The validated default always has a posture; any other id must be declared via SYSTEMONE_CALIBRATED_MODELS after calibration or the pass stamps nothing |
SYSTEMONE_TIMEOUT_S |
30 |
per-call timeout |
SYSTEMONE_CONFIDENCE_FLOOR |
0.6 |
Choice confidence to stamp a facet; below it the dimension is left unlabelled, never guessed |
SYSTEMONE_CALIBRATED_MODELS |
empty | model ids declared to have the configured thresholds calibrated; the validated default (jev-1.13.0) is always postured. Any other id without a declaration leaves the facet pass OFF |
CORPUS_PROFILE |
empty | path to the corpus profile, the domain vocabulary that ships with a corpus. Empty means look for corpus-profile.yaml in the working directory, then beside ATOMIC_DIR (local mode only for the document generation run) |
CARD_BASE_URL |
/card |
the base a card id resolves under, in the resource field. Read by both card-writing commands, hivegen-conformance-pass (concept cards) and hivegen-memory-from-issue (client memory cards). A path, not a host, and deliberately so - see below. Read from the environment by the scripts, not through config.py |
ISSUE_AUTHOR |
empty | read from the environment by hivegen-memory-from-issue to populate submitted_by on a memory card parsed from an issue body; not through config.py |
The JEV_* names (JEV_MODEL, JEV_TIMEOUT_S, JEV_CONFIDENCE_FLOOR) remain accepted as
legacy aliases for the facet pass.
CARD_BASE_URL defaults to a path because a card outlives a hostname. A corpus that writes
cards with an absolute URI has to rewrite every one of them when its deployment moves domains.
Set it only where a deployment genuinely needs absolute URIs, and expect to rewrite them the next
time it moves.
The functional-area map (areas, subareas) and re-topic vocabulary (guide_topics,
retopic_bucket) are corpus profile configuration, not engine source. Start from
corpus-profile.example.yaml, keep the adapted file with
your corpus and select it with CORPUS_PROFILE. See slicing for the fields
and profile discovery rules.
hive-prep
| Variable | Default | Notes |
|---|---|---|
CORPUS_ROOT |
empty | corpus-profile lookup hint only, and read from the environment, so it must be exported. The raw tree comes from the curation plan or the command argument. Not hive-gen's CARD_CORPUS_ROOT |
CORPUS_PROFILE |
empty | the same profile file hive-gen reads, for the folder-name product aliases and the vocabulary validate-plan checks a plan against. Read from the environment, so it must be exported. Empty means look for corpus-profile.yaml in the working directory, then under CORPUS_ROOT and beside it |
WORK_DIR |
./hive-work |
scratch space |
ATOMIC_DIR |
./hive-work/atomic |
legacy setting, no longer used by stamp; pass --atomic explicitly. transform writes under WORK_DIR/atomic; hive-gen uses its own ATOMIC_DIR to read that output |
DOCLING_BASE |
empty | document converter endpoint |
DOCLING_API_KEY |
empty | |
DOCLING_TIMEOUT_S |
300 |
|
DOCLING_CA_BUNDLE |
empty | for a converter behind a private CA |
PREFER_DOCLING |
true |
falls back to local conversion when unavailable |
QWEN_BASE |
empty | vision model, for pages with no extractable text |
QWEN_API_KEY |
empty | |
QWEN_MODEL |
qwen3.8-27b |
|
QWEN_TIMEOUT_S |
600 |
|
QWEN_TEMPERATURE |
empty | sampling temperature for the vision calls. Empty sends 0.0, as before. omit (any case) sends no temperature field: set it for a model that rejects the field, such as claude-sonnet-5-5 and claude-opus-5-5, whose endpoint answers HTTP 400 "temperature is deprecated for this model". A number sends that number. Anything else is refused, naming the setting. |
VISION_MIN_CHARS |
100 |
below this, a page is treated as needing vision |
LO_JOBS |
8 |
local converter concurrency |
STRIP_BOILERPLATE |
true |
|
STRIP_PRODUCT |
default |
which rule set in stripper_rules/. Vendor sets are opt-in and corpus-side |
hive-author
Deprecated.
hive-author(vf-hive-author) is deprecated and planned for removal in a later release; see the deprecation notice. New setups should omit it: the only supported write route is the Hive App connector, where reviewers approve what assistants file. These settings are for existing consumers.
| Variable | Default | Notes |
|---|---|---|
FORGE_KIND |
empty | required. github or forgejo. No default and never inferred from FORGE_API: the two APIs disagree on the labels field, so guessing wrong fails the submission rather than the startup |
FORGE_API |
empty | required. The forge's API base, deployment-specific. No default, deliberately not a public one: a default pointing anywhere reachable lets a misconfigured deployment file submissions somewhere real |
FORGE_REPO |
empty | required. The corpus repository submissions are filed against. No default: a wrong-but-plausible one files issues into someone else's repository |
FORGE_TOKEN |
empty | the credential. Scope it to opening issues on that one repository. Set this or FORGE_TOKEN_FILE, never both |
FORGE_TOKEN_FILE |
empty | a file holding the credential, re-read on every submission. For a token that expires faster than this process lives, such as a GitHub App installation token at one hour |
HOST |
127.0.0.1 |
|
PORT |
8000 |
|
IDENTITY_HEADER |
cf-access-authenticated-user-email |
same trust model as hive-serve: trusted, not verified |
OKF_DEFAULT_OWNER |
local-operator |
FORGE_KIND, FORGE_API, FORGE_REPO and a credential are all checked at startup, and the
service refuses to start naming what is missing.
Keep this service's credential narrow: it needs to open issues on the corpus repository and
nothing else. It cannot push, merge, or open a pull request, and that is the point of it being a
separate service from hive-serve.
hive-app
These settings come from the environment or a local .env. See how to run Hive
for the sign-in and database setup.
| Variable | Default | Notes |
|---|---|---|
HIVE_APP_DATABASE_DSN |
required | Postgres DSN. Use the unprivileged runtime role for serve and send-digests. Use the owner for init-db and restore, and a separate role authorized to read every row for backup. |
HIVE_APP_PUBLIC_ORIGIN |
required | Public HTTPS origin, without a path or query. Hive constructs the callback URL from this value, not the incoming Host header. |
HIVE_APP_OIDC_ISSUER |
required | The HTTPS issuer as it appears in OIDC discovery, including its path, if any. |
HIVE_APP_OIDC_CLIENT_ID |
required | Confidential web client ID. |
HIVE_APP_OIDC_CLIENT_SECRET |
required | Confidential web client secret. |
HIVE_APP_OIDC_GROUP_CLAIM |
groups |
Claim in the verified ID token. Missing means no groups. |
HIVE_APP_ADMIN_GROUP |
required | Exact provider group allowed to add projects in Settings. It does not bypass card access rules. |
HIVE_APP_SESSION_SECRET |
required | At least 32 characters. Generate a random value and share it across replicas of the same installation. |
HIVE_APP_SESSION_SECONDS |
3600 |
Lifetime of a session, from 300 to 86400 seconds. |
HIVE_APP_CONNECTOR_PROXY_SECRET |
Unset | Enables /mcp behind the authenticated proxy. At least 32 characters. |
HIVE_APP_CONNECTOR_ENCRYPTION_KEY |
Unset | Enables Hive OAuth for /mcp. A Fernet key shared by the installation's replicas. |
HIVE_APP_CONNECTOR_CLIENT_METADATA_IDS |
[] |
JSON array of exact, trusted HTTPS client metadata document URLs. Does not grant access. |
HIVE_APP_PUBLICATION_OUTBOX |
Unset | Absolute directory for outbox publication. Mutually exclusive with HIVE_APP_PUBLICATION_REPOSITORY. |
HIVE_APP_PUBLICATION_REPOSITORY |
Unset | Private GitHub corpus repository (owner/repo) for pull-request publication. Requires HIVE_APP_PUBLICATION_TOKEN; mutually exclusive with HIVE_APP_PUBLICATION_OUTBOX. |
HIVE_APP_PUBLICATION_TOKEN |
Unset | Repository-scoped GitHub token with contents and pull-request write access. Paired with HIVE_APP_PUBLICATION_REPOSITORY. |
HIVE_APP_LEGACY_PROJECT_SLUGS |
[] |
JSON array of project slugs that legacy connector errors may disclose. Does not grant access. |
HIVE_APP_LEGACY_CORRECTION_PROJECTS |
{} |
JSON object mapping legacy correction product slugs to the Notes projects that receive their drafts. |
HIVE_APP_SMTP_HOST |
Unset | SMTP server hostname. If unset, digest delivery is off. |
HIVE_APP_SMTP_PORT |
Required with host | Relay port, typically 587 for STARTTLS or 465 for implicit TLS. |
HIVE_APP_SMTP_TLS |
starttls |
starttls or implicit. Both require TLS and verify the relay certificate before authentication. |
HIVE_APP_SMTP_USERNAME |
Required with host | Send-only relay account name. |
HIVE_APP_SMTP_PASSWORD |
Required with host | Relay password. Keep it in a secret, not in version control. |
HIVE_APP_SMTP_FROM |
Required with host | One sender address authorized by the relay. |
HIVE_APP_DIGEST_TIMEZONE |
Required with host | IANA time zone for the default 08:00 sending hour, such as Europe/London. |
HIVE_APP_BACKUP_DIR |
Unset | Absolute directory where backup writes encrypted snapshots and the web app checks their age. If unset, Overview shows no backup alarm. |
HIVE_APP_BACKUP_KEY |
Required by backup and restore |
Dedicated Fernet key from the installation's secret store. Never put it in the backup directory or give it to the web service. See backup and restore. |
hive-zendesk
Deprecated. These settings remain for existing consumers. See the deprecation and replacement workflow.
| Variable | Default | Notes |
|---|---|---|
CONNECTOR_BASE |
empty | required. Validated at startup rather than on first request |
CORPUS_PROFILE |
empty | the same profile file hive-gen reads, for its linking section: the default product, the per-product markers, and the extra stopwords. Read from the environment, so it must be exported. Empty means look for corpus-profile.yaml in the working directory |
CONNECTOR_API_KEY |
empty | |
BIFROST_BASE |
empty | model gateway |
BIFROST_API_KEY |
empty | |
DISTILL_MODEL |
empty | required, refused at startup unless --model is passed. No default on purpose: an environment that fails to load .env would otherwise distil a whole run with an unintended model, silently, and the cards carry no record of which one wrote them |
RERANK_MODEL |
minimax/minimax-m3 |
linking is measured separately from distilling |
DISTILL_MAX_TOKENS |
4000 |
must cover reasoning and the answer for a reasoning model. At 2000 it spends the budget thinking and returns nothing |
BIFROST_TIMEOUT_S |
300 |
|
BIFROST_TEMPERATURE |
empty | sampling temperature for the chat calls. Empty sends 0, as the engine always did. omit (any case) sends no temperature field: set it for a model that rejects the field, such as claude-sonnet-5-5 and claude-opus-5-5, whose endpoint answers HTTP 400 "temperature is deprecated for this model". A number sends that number. Anything else is refused, naming the setting. |
CONNECTOR_PAGE_CAP |
3000 |
the source's own ceiling |
CAP_WARN_RATIO |
0.95 |
cap fraction for truncation refusal |
RESHAPE_WORKERS |
6 |
rebuild concurrency |
RESHAPE_BATCH_SIZE |
5 |
cards per model call in rebuild |
R2_ENDPOINT |
empty | required by rebuild, refused at startup. No default, and an empty one is not usable: botocore raises ValueError: Invalid endpoint: as the client is built, several frames down, naming no setting |
R2_ACCESS_KEY_ID |
empty | |
R2_SECRET_ACCESS_KEY |
empty | |
R2_BUCKET |
empty | required by rebuild, refused at startup. No default: a bucket that is not yours lists nothing, which reads exactly like a bucket with nothing staged in it |
hive-dbparse
No environment configuration, and no config.py or .env.example. Everything is command-line: see
the option table.
hive-apispec
No settings, and no config.py or .env.example. Everything is command-line: see
how to run it. It refuses an empty --src, --out or --plugin.
hive-ingest
No config.py and no .env.example. Everything but the Jev key is command-line: see
how to run it. --jobs-dir names the job store. If you omit it, the tool
uses $XDG_STATE_HOME/hive-ingest/jobs, or ~/.local/state/hive-ingest/jobs. It refuses an
empty value. scan refuses an empty folder path.
| Variable | Default | |
|---|---|---|
HIVE_INGEST_TYPESAFE_API_KEY |
unset | Hive's own Jev key. If it is unset, the pass entry named by HIVE_INGEST_PASS_ENTRY is read. TYPESAFE_API_KEY is not read. See the key. |
HIVE_INGEST_PASS_ENTRY |
hive/typesafe-jev |
pass entry read when HIVE_INGEST_TYPESAFE_API_KEY is unset. Set this if your password store uses another path. |
XDG_STATE_HOME |
unset | If set and absolute, the default --jobs-dir is $XDG_STATE_HOME/hive-ingest/jobs instead of ~/.local/state/hive-ingest/jobs. |
SSL_CERT_FILE |
unset | Optional private CA bundle honoured by Python's TLS context when connecting to --docling-url. |
--docling-url names a docling-serve. It is empty by default, and empty means that no server gets
a file: the optional local Docling converts. A value that is not an http or https URL is
refused. --docling-api-key-file names a file that holds the API key of that server. A file that
cannot be read, or that is empty, is refused. See Docling. hive-ingest
does not read hive-prep's DOCLING_BASE.
Settings that have no default on purpose
CONNECTOR_BASE, FORGE_API, FORGE_REPO, FORGE_KIND, LEDGER_DSN, EVAL_DIR,
CARD_CORPUS_ROOT, CONCEPTS_DIR, CLIENTS_DIR, RECORDS_DIR, R2_ENDPOINT,
R2_BUCKET, R2_PREFIX, hive-zendesk's DISTILL_MODEL and the gateway addresses are empty by
default and validated at startup or at the point of use.
CONCEPTS_DIR and CLIENTS_DIR joined that list in 0.7.0, and were its weakest link until then:
both carried a relative default that a working directory could make real. See
CONCEPTS_DIR has no default.
A default that points somewhere plausible does not save you configuration. It moves the failure from startup, where it is obvious, to first use, where it appears as a connection error against a host you have never heard of. Empty and validated is louder and cheaper.
The R2 settings joined that list on 2026-09-03, from the audit of what the published wheels would
contain. R2_BUCKET in hive-zendesk and R2_PREFIX in hive-gen named a real private bucket and a
real prefix inside it, which was a disclosure to everyone who installed the package as well as the
usual silent fallback. Object storage makes the silent version worse than a filesystem does: a
listing against a bucket you cannot see returns an empty list, not an error. R2_ENDPOINT was
already empty but unchecked, and it is refused alongside them for the other half of the rule: an
empty endpoint_url reaches botocore and raises ValueError: Invalid endpoint: as the client is
built, which is loud but names no setting, so the operator is told a URL is malformed rather than
which of theirs is unset. It never reaches AWS - botocore falls back to an AWS endpoint only when
endpoint_url is None, and these settings are strings that default to empty.
Where the corpus is
CORPUS_ROOT, CARD_CORPUS_ROOT, CONCEPTS_DIR, CLIENTS_DIR, RECORDS_DIR and EVAL_DIR all
name parts of the corpus, which has been a separate repository from the engine since 2026-08-11. Nothing about where it sits on disk
follows from where this code is installed, so every one of them is configuration and none of them is
derived.
They were derived once, by walking up the directory tree from the source file. That arithmetic used
to land inside the same tree and now lands in the engine repository, which contains no cards, no
taxonomies and no eval sets. It failed silently in every case: a glob over a directory that is not
there yields nothing and raises nothing, so hive-gen re-proposed a taxonomy it already had and
run_eval scored an absent corpus zero and printed the result.
So the tools that read the corpus check first and refuse with a message naming the setting, rather than proceeding over nothing. The check is "set, and a directory", never "looks like a corpus": a corpus that has not been generated yet legitimately holds almost nothing.
Unset counts as wrong, and is the easier one to miss. Path("") is Path("."), which exists, so an
empty setting that reaches pathlib resolves to the working directory rather than failing - an
empty CONCEPTS_DIR used to build the served catalogue out of whatever markdown happened to sit
beside the process. So hiveserve serve refuses at startup, alongside its LEDGER_DSN refusal, and
an empty answer is never allowed to become a wrong one.
CLIENTS_DIR is the deliberate exception, because omitting it disables client memory and that is a
supported deployment. It is never a startup refusal. For client memory, empty is coerced to "off"
once, in hiveserve/resolver.py, so every door agrees; hivegen/records.py applies the same rule
to client records. run_eval refuses only when the eval set it was
handed actually has rows that exercise client memory, and otherwise reports a dead path rather than
degrading quietly - whenever CLIENTS_DIR names a path at all. Empty or unset has no path to name,
so it is client memory off and is never reported. See
hive-serve for what the eval does with it.
An emptiness check counts what the consumer counts. run_eval asks load_index rather than
counting *.md, because index.md, log.md and the <product>/db/ tier are not cards: a corpus
holding only those passes a file count and still scores zero on every question.
Directory arithmetic from __file__ is still correct for a package finding its own files. It is
never correct for finding another repository's.
CORPUS_ROOT and CARD_CORPUS_ROOT are two different trees and are deliberately named apart.
CORPUS_ROOT is hive-prep's input, the raw documents going in; CARD_CORPUS_ROOT is hive-gen's
output, the card corpus coming out and the tree hive-serve then serves. A single name would have
been read by both, and the process environment outranks a per-package .env, so an operator running
the build guide stages back to back would have exported one value
for both. The check here is "set, and a directory" by design, so the raw document tree would have
passed hive-gen's guard and the taxonomy lookup would have gone missing all over again.