Skip to content

Environment Variables

A variable Holocron owns is HOLOCRON_<NAME>. The bare <NAME> is kept as a fallback, so nothing that sets it breaks, and a variable another tool reads itself is never renamed. This page is the list, sorted into the three groups of #1864.

  • The prefix is one constant, PREFIX ("HOLOCRON"), exported from @theholocron/env-utils/lookup. holocronEnv() reads a name as HOLOCRON_<NAME> and then <NAME>; kyber’s resolveValue(names, env, { prefix: PREFIX }) does the same through the environment and then the credentials providers. See env-utils and kyber.
  • Empty values count as unset at every step, so a blank HOLOCRON_X= falls through to X.
  • The organization secrets that repo.secrets.sync writes follow the same rule (the section at the end): a workflow reads secrets.HOLOCRON_<NAME> || secrets.<NAME> and maps it onto the bare name a tool reads (CODECOV_TOKEN, VERCEL_TOKEN, wrangler’s CLOUDFLARE_API_TOKEN).
  • A bare fallback is never removed in the same change that adds the prefixed name. Removing one is a later, separate change.
  • The prefixed name is an extra way in for a name a third party reads. The bare name still works there.
  • The organization variables that repo.variables.sync writes are HOLOCRON_-named too (the table at the end). A workflow reads vars.HOLOCRON_<NAME> || vars.<NAME> and, where a tool reads the bare name itself (turbo, wrangler, sentry-cli), maps it onto that name in the step’s env, so the tool keeps working. The bare variable stays set in GitHub until the maintainer has renamed it and a later change removes the fallback (#1979).

Environments are named <org>/<repo> - <layer> (local, dev, ci, prod, preview, agent), and the config names the layer, never the Environment: see sync secrets. local is one person’s overrides of dev; a machine reads local then dev, CI reads ci, and the deployed apps and their Vercel sync read prod. An app’s preview deployment reads preview and nothing from prod. An agent’s process (HOLOCRON_ENVIRONMENT=agent) reads agent and nothing from a person’s layers, and agent, like local and dev, is never synced. There is no other fallback between layers.

A variable has one owner, and the name says where its source of truth lives (#1672). The owner is not the only reader: the CLI and a workflow may read a copy.

  • SENTINEL_<NAME> (or COMLINK_<NAME>) has its source of truth in a layer of the repository’s 1Password Environments (<org>/<repo> - prod for the deployed Sentinel and Comlink, together, told apart by the prefix; - dev for the development instance of Sentinel; see below). The app reads it there. A deployment sync sends an app only its own names: repo.secrets.deploy lists the prefix and keys (#2061). holocron doctor github-app also reads the App’s id and key from the prod layer (dev for the development instance), in memory, and a workflow reads a synced copy (below). An app never receives a copy of a CLI credential under the CLI’s name: when it needs a capability the CLI has, it gets a credential of its own, named for the app.
  • HOLOCRON_<NAME> is a value of the organization that several things read (the CLI, Sentinel, the workflows). The name is shared on purpose, because it is specific to the organization, and it is the same wherever it is read.
  • A bare name stays only where a tool reads it itself (group 2), or as the fallback behind a prefixed name (never removed in the change that adds the prefixed one).
  • A copy goes stale. Where a workflow or the CLI reads a copy (a synced Actions secret or variable), changing the value only in the app’s Environment leaves the copy as it was until the sync for that copy runs: holocron sync secrets <environment> for the Environment that feeds it. Some copies are fed by a different Environment than the app’s, so they hold a second entry that has to be changed too. The table says which is which. holocron doctor secrets shows the rule as a matrix: it reads the names (never a value) of the Environments and of the Actions secrets and variables, one column per place, and doctor secrets --name NAME says where a name is and why. A name a place holds that nothing feeds is an extra cell. The fan-out of repo.secrets.sync and repo.variables.sync is the one allowed copy, and a deliberate second entry in the table is listed in doctor.sharedVariables.
  • A token the CLI reads locally and the CI reads from the Actions Environment (the HOLOCRON_*_TOKEN names, in the dev and ci layers, and HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN, in the dev and ci layers) is declared shared on purpose in doctor.sharedVariables, listed by name. Both copies hold the same value, so rotate it in both places.

Where the variables that more than one thing reads live today:

Variable Source of truth Other readers and copies
HOLOCRON_DISCORD_BOT_TOKEN, HOLOCRON_USER_SYNC_TOKEN Organization-wide: the dev layer (CLI) The prod layer holds its own entry of each for role sync and the #prs feed; Sentinel reads them under these names. Shared on purpose and prefixed
HOLOCRON_AXIOM_ORG Organization-wide: the ci layer, synced as an Actions variable Sentinel reads it from its own Environment. It is no longer synced to Actions: the workflow that read the Actions variable, check-dispatched, was removed (#2263)
HOLOCRON_ENVIRONMENT The name is organization-wide, one convention. The value is set separately for each deployment Never one shared value: development for holocron dev and the dev layer’s instance, production in the prod layer. The bare ENVIRONMENT is the fallback
HOLOCRON_HEARTBEAT_<NAME> A heartbeat’s ping URL: the ci layer, one entry per heartbeat (<NAME> is the heartbeat’s name upper-snake-cased: check-tokens is HOLOCRON_HEARTBEAT_CHECK_TOKENS) A credential: anyone holding the URL can fake a success. holocron setup writes it to .holocron/.private/.credentials for the 1Password import when it makes the heartbeat, and never prints it. Sync it to the repository only, a repo.secrets.sync entry with scope: "repo" and keys listing the names (GitHub has no per-workflow scope, so every workflow of the repository can read it). The scheduled workflows check-tokens, doctor-tokens, sync-specs and reconcile-projects read theirs in a last step that does nothing when it is unset
SENTINEL_AXIOM_INGEST_TOKEN Sentinel: the prod layer It is no longer copied to an org Actions secret (check-dispatched, its only reader, was removed, #2263): the sync writes it to Vercel only. It is an ingest-only token, not the CLI’s HOLOCRON_AXIOM_TOKEN
SENTINEL_AXIOM_DATASET Sentinel: the prod layer It is no longer synced to an org Actions variable (check-dispatched, its only reader, was removed, #2263)
SENTINEL_DEFAULT_BRANCH Sentinel: the prod layer (main) and the preview layer (alpha) The default branch this instance serves (spec tech-sentinel-preview-instance). Every instance is installed on every repository, so each says which repositories are its own: one whose default branch is another is answered handled: false and does nothing, and an organization event (role sync) is always served. Unset, every repository is served.
SENTINEL_SENTRY_DSN Sentinel: the prod layer Error tracking (#1045): a check that fails is reported to Sentinel’s own Sentry project. Unset means no tracking. The CLI’s HOLOCRON_SENTRY_DSN and SENTRY_DSN are not read. The SENTINEL_ prefix of the repo.secrets.deploy entry already syncs it to Vercel
SENTINEL_GITHUB_APP_ID, SENTINEL_GITHUB_APP_PRIVATE_KEY Sentinel: the prod layer holocron doctor github-app reads them there. The org Actions copies of the same names (reconcile-projects) are a second entry holding the same value: the key as a secret (the ci layer, holocron sync secrets --env ci), the id as a variable (the ci layer too); change both (the old SENTINEL_APP_ID and SENTINEL_APP_PRIVATE_KEY are still read as a fallback)
SENTINEL_WEBHOOK_SECRET Sentinel: the prod layer The App’s webhook setting on GitHub holds the same value
COMLINK_SENTRY_SECRET Comlink: the prod layer The Worker’s binding is a copy, written by holocron sync secrets --env prod --cwd apps/comlink --worker comlink or, with relay.errors, by holocron setup notifications
COMLINK_<SOURCE>_WEBHOOK Not in any Environment: holocron setup notifications makes each channel’s webhook and sets its URL on the Worker as a binding Recreated by setup, so there is no stored copy to go stale
HOLOCRON_CHECKLY_TOKEN The CLI: the dev layer Sentinel does not read it
HOLOCRON_CHECKLY_DASHBOARD_KEY The CLI: the dev layer, by hand (doctor.manualSecrets) The view key of the private Checkly dashboard; holocron setup hands it over through .holocron/.private/.credentials for the 1Password import. Never synced, so CI never holds it

Read as HOLOCRON_<NAME>, then <NAME>.

Name Read by Notes
AXIOM_DATASET the CLI logger, setup, the Axiom plugin, @theholocron/observability The CLI’s dataset, holocron. Org variable is already HOLOCRON_AXIOM_DATASET. Logging
SENTRY_DSN CLI error telemetry, the sentry send-error probe Then the built-in Holocron DSN (telemetry). Telemetry
POSTHOG_PROJECT_TOKEN, POSTHOG_HOST CLI usage analytics Then the built-in ingest-only key and ingest address. Org variable HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until renamed), read by sync-github and sync-repo
CLOUDFLARE_ACCOUNT_ID the Cloudflare plugin (resolveValue) Judgement call: wrangler reads this name too, but the plugin reads it itself and never hands it on, so it is group 1. The bare name keeps working either way
VERCEL_TEAM_ID, VERCEL_PROTECTION_BYPASS_SECRET check resolved (resolveVercelCredentials) Holocron’s names. The synced org variable is HOLOCRON_VERCEL_TEAM_ID, read by check-preview
PORT holocron dev serve holocron dev sets HOLOCRON_PORT and PORT to the same number, so a stale shell value cannot override the tunnel’s port. The application it starts still reads PORT
ENVIRONMENT detectEnvironment(), environment.get(), holocron dev HOLOCRON_ENVIRONMENT, then ENVIRONMENT. holocron dev hands its application both. See ENVIRONMENT below
AXIOM_ORG Sentinel (constants.ts) HOLOCRON_AXIOM_ORG, then AXIOM_ORG. The org variable is HOLOCRON_AXIOM_ORG (bare AXIOM_ORG until renamed)
BASE_SHA, PR_TITLE, PR_BODY docs presence, docs patch validate/docs.yml sets both spellings until every caller’s CLI reads the prefixed one
GOOGLE_* (CLIENT_ID, CLIENT_SECRET, SERVICE_ACCOUNT_JSON, …) @theholocron/google-client Holocron’s own names; no Google tool reads them
IDEAS_DIR @theholocron/holocron-plugin-obsidian (resolveIdeasDir), holocron sync ideas HOLOCRON_IDEAS_DIR, then IDEAS_DIR, over the provider’s dir option, which in turn wins over vault (providers.ideas, or the deprecated ideas.dir). The path of the idea notes folder differs per machine; a leading ~ is the home folder
NPM_TOKEN publish package --initial (resolveValue); the npm plugin’s probe npm token, provider npm whoami, export tokens and doctor tokens; holocron new token npm HOLOCRON_NPM_TOKEN, then NPM_TOKEN: a stage-only granular token (npmjs.com, @theholocron scope, 2FA bypass off, short expiry). With one, --initial stages each new package with npm stage publish instead of logging in, and prints npm stage approve <id>; approving asks for 2FA, so nothing is public until a person does. The npm plugin checks it with whoami (present and valid; npm does not expose its age or permissions). Held in the agent Environment, the one layer it is declared for. See npm stage token

Group 1 names not migrated yet, and why (the only one left):

Name Read by Why it is left
RELEASE_GROUP root release.config.ts, release.yml Read raw on purpose (semantic-release loads it before a build) and by each consumer repo’s own release config; moves with the template repos

Decided: Holocron owns the name, so it moves like the others. detectEnvironment() and environment.get() read HOLOCRON_ENVIRONMENT first and then ENVIRONMENT, and ENV and NODE_ENV stay what they were (environment.get() only; detectEnvironment() ignores them). The bare name is not a third-party contract, but it is the one a deployed application, Sentinel and Comlink already have set, so it stays as a fallback and nothing that sets it breaks.

The value also picks the 1Password Environment a credentials entry reads when it names none: local reads <org/repo> - local then <org/repo> - dev, development reads - dev, ci reads - ci, production reads - prod and test and preview read none: a preview deployment gets its values from the deployment (see Credentials providers).

holocron dev sets both names for the application it runs, to one value, the way it sets PORT and HOLOCRON_PORT. A vault Environment that sets either one decides for both (HOLOCRON_ENVIRONMENT wins when it sets both), so a dev instance still logs env: "development" whichever name the application reads. A deployment sets HOLOCRON_ENVIRONMENT=production, or keeps ENVIRONMENT=production; no change is required.

The bare name is the contract. Holocron reads it the same way, and nothing here is renamed.

Name Read by Notes
GITHUB_TOKEN, GH_TOKEN sync-wiki (after HOLOCRON_READ_TOKEN), the gh CLI gh reads GH_TOKEN
NPM_TOKEN publish package (only checks that it is set); the npm plugin’s token commands The bare fallback of HOLOCRON_NPM_TOKEN (group 1). Trusted Publishing needs none
TURBO_TOKEN, TURBO_TEAM, TURBO_SCM_BASE turbo; astromech --affected (TURBO_SCM_BASE) Org variable HOLOCRON_TURBO_TEAM is mapped onto TURBO_TEAM in each job’s env
CI, NO_UPDATE_NOTIFIER isCI(), the update notifier, telemetry Conventions many tools share
GITHUB_REF_NAME, GITHUB_EVENT_NAME astromech --affected Set by GitHub Actions
GITHUB_OUTPUT upload coverage (writes uploaded=<n>) Set by GitHub Actions; nothing is written when it is unset
GITHUB_STEP_SUMMARY publish package (appends the packages not published) Set by GitHub Actions; nothing is written when it is unset
DEBUG @theholocron/env-utils key logging The debug convention
ENV environment.get(), after HOLOCRON_ENVIRONMENT and ENVIRONMENT A convention many tools set for their own reasons; only a last fallback, and detectEnvironment() ignores it
PATH, PATHEXT fs-utils findExecutable, the test harness Operating system
CODECOV_TOKEN the Codecov uploader; the vite-config codecov preset The preset reads HOLOCRON_CODECOV_UPLOAD_TOKEN first; the uploader reads this name
CRON_SECRET Sentinel’s /api/scheduled, which Vercel calls on a cron entry Vercel sends it as Authorization: Bearer <value> when the project has the variable; unset, the function answers 503
TUNNEL_TOKEN cloudflared, set by new tunnel --run and dev cloudflared reads it; never on argv
OP_SERVICE_ACCOUNT_TOKEN the 1Password plugin, through op op reads it
CLOUDFLARE_API_TOKEN the Cloudflare plugin as the vendor name; wrangler Behind HOLOCRON_CLOUDFLARE_TOKEN
SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT release.yml (sentry-cli); the Sentry plugin token sentry-cli reads these. The org variable HOLOCRON_SENTRY_ORG is mapped onto SENTRY_ORG in release
FERN_TOKEN, VERCEL_TOKEN the Fern and Vercel CLIs in workflows Each is also a vendor fallback behind HOLOCRON_FERN_TOKEN / HOLOCRON_VERCEL_TOKEN

The other provider tokens (DOPPLER_TOKEN, NETLIFY_AUTH_TOKEN, …) are vendor fallbacks behind a HOLOCRON_ name; see group 3 and the Token Reference.

Name Read by Consistency check
HOLOCRON_<FEATURE>_TOKEN (READ, ISSUES, SYNC, RELEASE, ADMIN, SECRETS, DEPLOY, USER_SYNC, ORG) the GitHub feature resolvers Consistent; no bare fallback by design (the broad GITHUB_TOKEN is not tried)
HOLOCRON_<PROVIDER>_TOKEN / _API_KEY / _SECRET_KEY and the vendor name each plugin’s auth.ts Consistent: HOLOCRON_ name, then vendor name. See Token Reference
HOLOCRON_ORG org resolution, token keyring account, telemetry Consistent
HOLOCRON_LOG_LEVEL, HOLOCRON_TELEMETRY the logger, telemetry Consistent
HOLOCRON_PREVIEW_KEY deploy --files: the pull request a preview is tagged with (<repo>-pr-<number>, set by the deploy-preview workflow); deploy cleanup-preview finds the preview by it Consistent
NO_HOLOCRON_TELEMETRY telemetry Inconsistent shape: the NO_<PREFIX>_TELEMETRY convention puts NO_ first. Kept; renaming it would break opt-outs
HOLOCRON_CACHE_DIR, HOLOCRON_OTP, HOLOCRON_NPM_ENFORCE_2FA, HOLOCRON_DRY_RUN_PREVIEW update notifier, publish package, the menu Consistent
HOLOCRON_<OPTION> the menu, for a secret: true option Consistent
HOLOCRON_SENTRY_PROBE_PROJECT, HOLOCRON_CHECKLY_PROBE_CHANNEL the sentry and checkly probes Consistent
HOLOCRON_NOTIFY_*, HOLOCRON_DISCORD_* the notifications workflow, Discord plugin Consistent
SENTINEL_* (WEBHOOK_SECRET, GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY, ROLE_SYNC_REPO, SCHEDULE_REPO (owner/repo whose workflows /api/scheduled starts; unset is off), CI_AGGREGATE (shadow or on; unset is off), AXIOM_INGEST_TOKEN, AXIOM_DATASET) Sentinel Per service, on purpose. SENTINEL_AXIOM_DATASET falls back to the bare AXIOM_DATASET, the name the CLI used to share (#1839); SENTINEL_GITHUB_APP_ID and SENTINEL_GITHUB_APP_PRIVATE_KEY fall back to the bare GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY, because GitHub reserves the GITHUB_ prefix for its own secrets
COMLINK_* (SENTRY_SECRET, SENTRY_WEBHOOK) Comlink Worker bindings Per service, on purpose

repo.secrets.sync (the ci layer of the 1Password Environments, <org>/<repo> - ci) writes these names, each readable only by the repositories its entry lists (repos, visibility selected; #2062): holocron and .github for the tokens the frozen workflows read, holocron alone for HOLOCRON_CLOUDFLARE_TOKEN, HOLOCRON_CODECOV_UPLOAD_TOKEN, HOLOCRON_SENTRY_RELEASE_TOKEN, HOLOCRON_TURBO_TOKEN and SENTINEL_GITHUB_APP_PRIVATE_KEY. Workflows read secrets.HOLOCRON_<NAME> || secrets.<NAME> and map the value onto the name the tool reads. The bare secret stays in GitHub until a later change removes the fallback (#1979), because repos still on the frozen workflows in theholocron/.github read it. HOLOCRON_LIGHTHOUSE_TOKEN is not synced: the test-perf reusable workflow reads it (as LHCI_GITHUB_APP_TOKEN for lhci autorun), so a repo that runs Lighthouse stores it at repo scope. The Sentinel App’s pair follows the same order with a different prefix: vars.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_APP_ID for the id, which is public and so a variable (the secret is the fallback until it is deleted), and the secret pair for the key, so the org secrets carry the names the deployed Sentinel and doctor github-app use (#1672). The old SENTINEL_APP_ID and SENTINEL_APP_PRIVATE_KEY stay until a later change removes them.

Secret Used as Mapped onto
HOLOCRON_AXIOM_TOKEN sync-github, sync-repo read by the CLI under that name
HOLOCRON_CLOUDFLARE_TOKEN the Pages deploy and cleanup in preview CLOUDFLARE_API_TOKEN (wrangler)
HOLOCRON_CODECOV_UPLOAD_TOKEN measure:bundle CODECOV_TOKEN (the uploader)
HOLOCRON_FERN_TOKEN publish-wiki FERN_TOKEN (the Fern CLI)
SENTINEL_GITHUB_APP_PRIVATE_KEY reconcile-projects (the App token) private-key of that action
HOLOCRON_SENTRY_RELEASE_TOKEN release (the Sentry release step) SENTRY_AUTH_TOKEN (sentry-cli)
HOLOCRON_TURBO_TOKEN every job that runs turbo TURBO_TOKEN (turbo); the Holocron project’s cache
HOLOCRON_VERCEL_TOKEN release, deploy-preview, ci.check-preview, Sentinel deploy VERCEL_TOKEN (the Vercel CLI)
HOLOCRON_VERCEL_PROTECTION_BYPASS_SECRET ci.check-preview read by check resolved

HOLOCRON_TURBO_TOKEN is a Vercel token for the Holocron project’s remote cache. Another organization sets up its own token and team; nothing in the workflows assumes this one. The team is the HOLOCRON_TURBO_TEAM variable, read as before.

repo.variables.sync keeps these names in 1Password and GitHub. Workflows read vars.HOLOCRON_<NAME> || vars.<NAME> (the bare name is the fallback until the variable is renamed) and map the value onto the name a tool reads.

Variable Used as Decision
HOLOCRON_AXIOM_DATASET HOLOCRON_AXIOM_DATASET in sync-github, sync-repo Already prefixed
HOLOCRON_POSTHOG_PROJECT_TOKEN HOLOCRON_POSTHOG_PROJECT_TOKEN in sync-github, sync-repo Renamed (was POSTHOG_PROJECT_TOKEN)
HOLOCRON_VERCEL_TEAM_ID HOLOCRON_VERCEL_TEAM_ID and VERCEL_TEAM_ID in check-preview and the Vercel plugin Renamed (was VERCEL_TEAM_ID). The plugin reads it when teamId is not in the config, from the environment or a credentials provider (1Password)
HOLOCRON_CLOUDFLARE_ACCOUNT_ID accountId of the wrangler action; CLOUDFLARE_ACCOUNT_ID in a shell step Renamed; mapped onto the name wrangler reads
HOLOCRON_CLOUDFLARE_PAGES_PROJECT the Pages project name in preview Renamed (was CLOUDFLARE_PAGES_PROJECT)
HOLOCRON_TURBO_TEAM TURBO_TEAM in each job’s env Renamed; mapped onto the name turbo reads
HOLOCRON_SENTRY_DSN The CLI’s telemetry reads it first, then SENTRY_DSN, then its built-in DSN A variable, not a secret: a DSN is built to be embedded in client code
HOLOCRON_SENTRY_ORG SENTRY_ORG in release Renamed; mapped onto the name sentry-cli reads
HOLOCRON_AXIOM_ORG Sentinel reads the prefixed name, then the bare one Renamed (was AXIOM_ORG)
SENTINEL_AXIOM_DATASET Sentinel’s dataset Stays as it is (Sentinel’s convention)
SENTINEL_GITHUB_APP_ID app-id of create-github-app-token in reconcile-projects A variable, not a secret: the id is public; read before the old secret

cli/cli/src/env-prefix-guard scans every non-test TypeScript file in the workspace and fails the CLI’s unit tests when source reads a bare variable that is not owned by a prefix (HOLOCRON_, SENTINEL_, COMLINK_), not in the allowlist and not read through the prefix helper. The helper is holocronEnv(), withEnvPrefix(), a variable declared from one, or resolveValue(names, env, { prefix }). A bare name is also accepted when the same file reads its HOLOCRON_ spelling, which is the explicit pair the Axiom plugin and the logger package write out. It looks at .get("NAME") on an environment, env.NAME, env["NAME"], process.env, and the names given to firstEnv and resolveValue; a name built at run time is not looked at, and noProcessEnv still bans process.env in the plugins and kyber.

The allowlist is env-allowlist.ts, in two parts: the group 2 names a third party reads itself, and the group 1 names whose move is deferred (RELEASE_GROUP only, the table above). Add a name to the first only when a third party reads it itself. A name Holocron chooses never goes in either.