envstack logo

envstack

envstack is an environment variable composition and activation layer for tools and processes.

It is built for cases where environments are hierarchical, shared, and context-dependent, and where a flat .env file stops being enough.

export ENVPATH=studio/base:show/foo:tool/nuke/14
envstack -- nuke

Why envstack

envstack is a lightweight CLI and Python library for composing, tracing, exporting, and reproducing environment variables using a PATH-like model called ENVPATH.

Compose

Explain

Export

ENVPATH

ENVPATH defines where environment fragments are discovered and in what order they apply, similar to PATH, but for full environments.

export ENVPATH=prod/base:prod/show/foo:prod/tools/nuke14
envstack -- nuke

Later entries can layer on top of earlier ones through includes, hierarchy, and explicit precedence rules.

envstack is not

It is intentionally boring: explicit inputs, deterministic outputs, and tooling that tells you what it did.

Install

pip install envstack

Quickstart

Inspect the unresolved environment:

envstack -u

Resolve a specific variable:

envstack -r DEPLOY_ROOT

Run a command inside the active stack:

envstack -- echo {DEPLOY_ROOT}

Trace where a variable comes from:

envstack -t PATH

Learn More