This directory holds the shared CLI environment bootstrap.
baseenv.sh defines the common shell environment used by:
cli/bash/bin/base-wrapper- interactive shells that source it from
~/.bashrcor~/.zshrc - future Bash and Python CLIs that want a single, shared environment contract
Source it from a shell startup file or from another script:
source /path/to/base/cli/env/baseenv.shIt must be sourced rather than executed.
BASE_REPO_ROOTBASE_CLI_ROOTBASE_CLI_ENV_SCRIPTBASE_BASH_ROOTBASE_PYTHON_ROOT
These are the environment variables that Base treats as the public cross-process contract.
baseenv.sh also defines a few derived shell variables for the current shell session:
BASE_CLI_ENV_DIRBASE_BASH_BIN_DIRBASE_BASH_LIB_DIRBASE_BASH_COMMANDS_DIR
These are intentionally not exported to child processes by default. They are easy to derive from the stable roots and are mainly convenience values for sourced scripts and interactive inspection.
baseenv.sh also prepends cli/bash/bin to PATH when that directory exists, without duplicating the entry on repeated sourcing.
baseenv.sh is designed to work in both Bash and zsh.
Run the environment bootstrap test suite with:
bats cli/env/tests/baseenv.bats