Skip to content

Environment variables

The environment variables abx reads, the variables it forwards to the guest terminal, and the variables of the install script.

Updated

abx reads a small set of environment variables that select host state, the smolvm binary, JSON behavior and colors, and it forwards some terminal variables to the guest. Paths must be absolute: a relative value for ABX_HOME, ABX_SMOLVM or ABX_SMOLVM_STATE_DIR is rejected. The install script has its own variables, listed below.

Variables in the command reference

These five are the variables abx help --json lists under environment.

Variable Meaning
ABX_HOME Absolute directory for host state. Default ~/.abx. It holds the saved authentication configuration (config.toml) too, and boxes live under workspaces/, one directory per workspace. On Linux it must reside on local ext4. See files.
ABX_SMOLVM Absolute path to the smolvm executable. When set, it is used exclusively, with no fallback to the default locations (on Linux it must still pass the installation checks). When unset, macOS checks ~/.local/bin/smolvm, /opt/homebrew/bin/smolvm and /usr/local/bin/smolvm, and Linux checks ~/.local/bin/smolvm, /usr/local/bin/smolvm and /opt/smolvm/smolvm. PATH is never searched.
ABX_SMOLVM_STATE_DIR Absolute directory for smolvm machine state. When unset, smolvm keeps its machine database and VM cache under the account home. On Linux it must reside on local ext4.
ABX_JSON Set to 1 to report failures as the JSON error envelope even without --json, and to make run and shell fail with no-box instead of creating a missing box, as --no-create does (--create overrides it). Results on stdout are unchanged. Bare abx prints the command overview instead of opening the TUI when it is set.
NO_COLOR Disable colors on terminals. Colors are also off when TERM=dumb.

State from older releases in ~/.agent-box and ~/.config/agent-box is not read.

Other variables abx reads

These are read by the code but are not listed in the command reference.

Variable Meaning
TMPDIR Standard temporary directory, used for scratch space for Git bundles. On Linux, if it resolves to tmpfs, abx warns that bundles use memory; point TMPDIR to a disk-backed directory to avoid this.
TERM The host terminal type. abx makes sure the guest can resolve it (installing the terminfo entry when needed) and otherwise falls back to xterm-256color. TERM=dumb turns colors off.
COLORTERM, TERM_PROGRAM, TERM_PROGRAM_VERSION, TZ Forwarded to the guest terminal session when set, printable and at most 256 characters long.
LANG The guest receives C or POSIX when the host has exactly that value, and C.UTF-8 otherwise.

Related behavior:

  • The host’s ABX_HOME, ABX_SMOLVM and ABX_SMOLVM_STATE_DIR are passed on to the detached credential renewal worker, so it uses the same state and smolvm binary as the command that started it.
  • Secret provider commands run with a scrubbed environment that forwards only the fixed host variables each tool needs. See Secret providers for the exact list.
  • abx never searches PATH for smolvm, secret provider tools or login clients. It checks fixed trusted directories instead.

Install script

scripts/install.sh reads these variables. They are not read by abx itself. See installing abx.

Variable Default Meaning
ABX_VERSION the latest stable release Release to install, for example 0.3.0. A leading v is accepted.
ABX_INSTALL_DIR $HOME/.local/bin Directory that receives the abx binary. The script fails if neither this nor HOME is set.
ABX_VERIFY_ATTESTATION unset Set to 1 to also verify the archive’s GitHub build provenance with gh attestation verify. It requires the GitHub CLI (gh).
ABX_RELEASES_URL https://github.com/sandrinodm/agent-box/releases Releases base URL, for mirrors and tests. It must be an https:// or http:// URL.

The script always checks the archive against the release’s SHA256SUMS before installing anything, and checks that the downloaded binary reports abx <version>.

curl -fsSL https://raw.githubusercontent.com/sandrinodm/agent-box/main/scripts/install.sh | ABX_VERSION=0.3.0 ABX_VERIFY_ATTESTATION=1 sh

Type to search…

↑↓ navigate↵ selectEsc close