Skip to content

Environment Variables

ByteMind reads environment variables in two categories: install-time (consumed by the install scripts) and runtime (consumed by the bytemind binary).

Install-Time Variables

Passed to the install script to control how the binary is downloaded.

VariableDescriptionDefault
BYTEMIND_VERSIONRelease tag to install (e.g. v0.3.0)latest
BYTEMIND_INSTALL_DIRDirectory to install the binary into~/bin
BYTEMIND_REPOGitHub repository to download from1024XEngineer/bytemind

Example:

bash
curl -fsSL https://raw.githubusercontent.com/1024XEngineer/bytemind/main/scripts/install.sh \
  | BYTEMIND_VERSION=v0.3.0 BYTEMIND_INSTALL_DIR=/usr/local/bin bash

Runtime Variables

Read by the bytemind binary at startup. All runtime variables override the corresponding config file field.

VariableOverridesDescription
BYTEMIND_API_KEYprovider.api_keyDefault API key if api_key_env is not set
BYTEMIND_APPROVAL_MODEapproval_modeOverride the approval mode (interactive or full_access; legacy away is blocked by default)
BYTEMIND_ALLOW_AWAY_FULL_ACCESSn/aTemporary migration gate: allow legacy approval_mode=away to map to full_access when set to true
BYTEMIND_SANDBOX_ENABLEDsandbox_enabledSet to true to enable sandbox mode
BYTEMIND_WRITABLE_ROOTSwritable_rootsColon-separated list of writable root paths
BYTEMIND_HOMEOverride the .bytemind/ base directory path
BYTEMIND_MAX_ITERATIONSmax_iterationsOverride the max tool-call iteration limit
BYTEMIND_LOG_LEVELLog verbosity: debug, info, warn, error

Example — fully configured via env (no config file):

bash
export OPENAI_API_KEY="sk-..."
export BYTEMIND_APPROVAL_MODE="full_access"
export BYTEMIND_SANDBOX_ENABLED="true"
export BYTEMIND_WRITABLE_ROOTS="./src:./docs"

bytemind run -prompt "Regenerate all API docs"

Provider key variables

For provider-specific key variables, set api_key_env in provider config to the env var name of your choice. The BYTEMIND_API_KEY variable is only the fallback default.

See Also

Released under the MIT License.