# Environment variables
BuildBox uses several environment variables to work. These variables are kept up-to-date by local environment mechanism, and are influenced by active target settings.
WARNING
Do not write BuildBox environment variables directly, use BuildBox API for that. This is the same for standard environment variables managed by BuildBox.
BuildBox environment variables can be used anywhere, for example for scripting tests, packages distribution.
# BuildBox specific variables
It is possible to list only BuildBox environment variables and their values by running:
bbx env
Here is a partial list of these variables and their meaning:
BB_TARGET: active target nameBB_PROJECT_DIR: active project base directoryBB_PROJECT_PROFILE_DIR: active project profile directory (.bbx/)BB_PROJECT_SRC_DIR: active project sources directoryBB_TARGET_DIR: active target base directoryBB_TARGET_SRC_DIR: active target sources directoryBB_TARGET_BUILD_DIR: active target build directoryBB_LAST_TARGET: previous active target nameBB_TARGET_VAR_*: target specific variableBB_TOOLS_DIR: tools local clones directoryBB_CACHE_DIR: BuildBox cacheBB_TRASH_KEEP_DAYS: minimum days to keep data in BuildBox trashBB_BUILD_JOBS: concurrent build jobs numberBB_BINDIR: BuildBox public and internal executables pathsBB_DIR: BuildBox sources directoryBB_WORKDIR: project profile directory path (.bbx/), bind-mounted at the same path on both host and containerBB_LAUNCHER_ID: PID of the host-sidebbxlauncher process; used to locate the named pipes for thebb_host_sendmechanismBB_PREBUILT_USERNAME: pre-built target release user name for remote serverBB_PREBUILT_SERVER: pre-built target server addressBB_PREBUILT_PATH: pre-built target remote pathBB_PREBUILT_ONLY_TAGGED: pre-built target 1 to restrict pre-built target generation only to tagged projects, else 0BB_LOCAL_ENV_LAST_*: used for local environment cache computation
There are also the following variables, not listed by bbx env:
CPUCPU_FAMILYCPU_DESCRIPTION(do not rely on its value to condition code flow as it is a human-readable string subject to change)CPUDEFCHOST
# Standard variables managed by BuildBox
Moreover, BuildBox local environment mechanism keeps up-to-date the following environment variables:
PATHLD_LIBRARY_PATHPKG_CONFIG_PATHACLOCAL_PATHXDG_DATA_DIRSCFLAGSLDFLAGSTMPDIR, a temporary directory under the project profile directory