--- id: dump-env version: "1.7.0" license: MIT license_treatment: permissive maintenance: active --- # dump-env — A utility tool to create .env files License: permissive · Maintenance: active · Downloads: 95.1K/mo ## What it is and what it does dump-env is a command-line tool that generates .env files by reading an .env.template file and overlaying environment variables that match one or more specified prefixes. It has no external dependencies and runs as a pure Python utility. The tool is designed to simplify CI/CD workflows—particularly Docker image builds—where secrets and configuration need to be injected from CI provider environment variables without manual encryption/decryption logic. The typical workflow is: define a template with default or placeholder values, set prefixed environment variables in your CI system (e.g., SECRET_ENV_DATABASE_URL), and run dump-env to merge them. The tool can enforce strict validation (fail if required variables are missing), support multiple prefixes, and optionally disable value quoting for compatibility with linters like dotenv-linter. Use it for: - Generate .env files in Docker builds by reading CI secrets prefixed with a convention like SECRET_ENV_. - Enforce that all required environment variables are present before deploying, using the --strict flag. - Merge multiple sources of configuration: a template for defaults and environment-specific overrides from CI. - Create .env files in GitLab CI, GitHub Actions, or Travis CI without custom shell scripting. - Validate that template variables are defined in the environment before exporting to .env. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates .env files by merging an .env.template with environment variables matching specified prefixes, with optional strict validation and source filtering. Yes. dump-env is a lightweight, actively maintained utility with zero dependencies, a permissive license, and a clear single purpose: simplifying .env generation in CI/CD pipelines. Install it if you manage environment configuration across Docker builds or CI systems and want to avoid shell scripting or manual secret handling. ## Install pip install dump-env uv add dump-env poetry add dump-env ## Installing dump-env Before you install: Low friction: pure Python wheel with zero runtime dependencies. Actively maintained as of 2026-04-20, last commit 2026-08-10, and marked Production/Stable. License in practice: MIT license (permissive) — you may use, modify, and distribute freely with minimal restrictions. Quickstart: $ pip install dump-env $ dump-env --template=.env.template --prefix='SECRET_ENV_' > .env Or in Python: from dump_env import dump_env # Command-line tool; no direct Python API documented Requires Python 3.10 or later (supports 3.10, 3.11, 3.12, 3.13, 3.14). Verify before relying: - Whether a programmatic Python API exists beyond the CLI tool documented in the excerpt. - Performance characteristics when processing very large template files or many prefixed variables. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 95.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags .env file generation, environment variable templating, dotenv template tool, CI/CD secrets management, env file from template, prefix-based env vars, docker env file creation, ci-cd, secrets-management, dotenv [View on SkillFed](https://skillfed.io/packages/dump-env) · [View on PyPI](https://pypi.org/project/dump-env/)