Reference·Environment variablesIndex

Environment variables

Every environment variable the nodecode binary and the installers read, by purpose.

.mdllms.txt

A variable applies to the one process that reads it. For lasting settings use Config.

Home

VariableMeaning
NODECODE_HOMEThe home: the folder that holds config, store and cells. Default ~/.nodecode/.

The binary picks the home in this order.

  1. -p NAME or --profile NAME on the command line.
  2. NODECODE_HOME.
  3. The profile named in ~/.nodecode/active-profile.
  4. ~/.nodecode/.

The binary sets NODECODE_HOME for every child process it starts.

Model

VariableMeaningDefault
NODECODE_PROVIDERProvider id. Outranks general.default_model.openai-completions
NODECODE_MODELModel id. Outranks general.default_model.The build's model
NODECODE_ENDPOINTFull endpoint URL. Outranks every base_url.None
NODECODE_API_KEYAPI key. Outranks providers.<id>.api_key. A leading ! runs a shell command.None
NODECODE_REASONING_EFFORToff, minimal, low, medium, high, xhigh or max.None
NODECODE_TEMPERATURESampling temperature, a number.Not sent
NODECODE_TOP_PNucleus sampling bound, a number.Not sent
NODECODE_MAX_TOKENSOutput token limit, an integer.Not sent
NODECODE_TOOL_CHOICEauto, none or required.Not sent
NODECODE_CONTEXT_TOKENSContext window in tokens, an integer. Outranks every other source.None
NODECODE_MODELS_CATALOGPath of the models.dev catalog cache.~/.cache/nodecode/models.dev/api.json

See Models and providers.

Provider keys

Read after the config and auth.json, in this order.

VariableUsed for
<ID>_API_KEYThe provider with that id. The id is uppercased, - becomes _.
OPENAI_API_KEYAny provider on openai-completions or openai-responses.
ANTHROPIC_API_KEYAny provider on anthropic.
GOOGLE_API_KEYAny provider on google.
ANTHROPIC_AUTH_TOKENThe provider id anthropic only.

Gateway

The gateway is the local server shells attach to.

VariableMeaning
NODECODE_GATEWAY_OPERATOR_TOKENThe operator token. Read first.
NODECODE_OPERATOR_TOKENThe operator token. Read second.

Both outrank the operator-token file and gateway.operator_token.

Updates and cell indexes

VariableMeaningDefault
NODECODE_BASE_URLThe release host.The host the build was installed from, else https://preview.nodecode.ai/dl
NODECODE_HUB_INDEXAddress of Nodecode's cell index.https://preview.nodecode.ai/dl/cells/index.json
NODECODE_COMMUNITY_INDEXAddress of the community cell index.https://nodecode.ai/cells/community.json

Diagnostics and switches

VariableMeaning
NODECODE_PHASE_LOGA file path. Nodecode appends one timed line per boot phase.
NODECODE_QA0, off, never or false stops every send of the qa cell.
NODECODE_HANDOVERInternal. Set by a profile switch for the next process.

Named by config

Some config keys hold the name of a variable. Nodecode reads the secret from that variable.

Config keySection
bot_token_envchannels.discord
token_envchannels.telegram, prs
api_key_envtranscription, speech

System variables

VariableUsed for
XDG_CACHE_HOMEThe cache root. Default ~/.cache/.
LOCALAPPDATAWindows: the cache root.
XDG_CONFIG_HOMELinux: where the gateway's systemd unit is written.
XDG_CONFIG_HOME, XDG_CACHE_HOME, XDG_DATA_HOME, PATH, HOMECopied into the background gateway's unit.
TMPDIRWhere an --ephemeral store is created.
TERM, COLORTERM, WT_SESSION, TERM_PROGRAMColour depth detection. TERM=dumb gives no colour.
NO_COLORAny value limits the shell to 16 colours.
TMUXWraps clipboard sequences for tmux. TERM=screen... does the same for screen.
WAYLAND_DISPLAY, DISPLAYLinux: a link opens with xdg-open only when one is set.
NOTIFY_SOCKETLinux: readiness messages to systemd.
JOURNAL_STREAMTells Nodecode its logs go to the journal.
USERThe layer folder's name when git has no user.name. Windows: USERNAME.
ProgramFiles, LOCALAPPDATAWindows: where to look for Git's sh.exe.

Installer only

install.sh, for Linux and macOS:

VariableMeaningDefault
NODECODE_VERSIONInstall this version.The version the channel names
NODECODE_CHANNELThe release channel to read.stable
NODECODE_BASE_URLFetch from this host.https://preview.nodecode.ai/dl
NODECODE_HOMEThe install folder.~/.local/share/nodecode
NODECODE_STAGEfull, stage or link.full

install.ps1, for Windows:

VariableMeaningDefault
NODECODE_VERSIONInstall this version.The version the channel names
NODECODE_CHANNELThe release channel to read.stable
NODECODE_BASE_URLFetch from this host.https://preview.nodecode.ai/dl
NODECODE_INSTALL_DIRThe install folder.%LOCALAPPDATA%\Programs\nodecode
NODECODE_STAGEfull, stage or link.full
NODECODE_NO_MODIFY_PATHAny value leaves the user PATH alone.Unset
NODECODE_STAGEDoes
fullDownloads, lays out the version and points current at it.
stageLays out the version. current does not move.
linkPoints current at a version already laid out. No download.

See Install and Updates.

Esc

    Loading the index…

    ↑↓ moveEnter openEsc close