Skip to main content

thv config set-build-env

Set a build environment variable for protocol builds

Synopsis

Set a build environment variable that will be injected into Dockerfiles during protocol builds (npx://, uvx://, go://). This is useful for configuring custom package mirrors in corporate environments.

Environment variable names must:

  • Start with an uppercase letter
  • Contain only uppercase letters, numbers, and underscores
  • Not be a reserved system variable (PATH, HOME, etc.)

Common use cases:

  • NPM_CONFIG_REGISTRY: Custom npm registry URL
  • PIP_INDEX_URL: Custom PyPI index URL
  • UV_DEFAULT_INDEX: Custom uv package index URL
  • GOPROXY: Custom Go module proxy URL
  • GOPRIVATE: Private Go module paths

Examples: thv config set-build-env NPM_CONFIG_REGISTRY https://npm.corp.example.com thv config set-build-env PIP_INDEX_URL https://pypi.corp.example.com/simple thv config set-build-env GOPROXY https://goproxy.corp.example.com thv config set-build-env GOPRIVATE "github.com/myorg/*"

thv config set-build-env <KEY> <value> [flags]

Options

  -h, --help   help for set-build-env

Options inherited from parent commands

      --debug   Enable debug mode

SEE ALSO