{"id":21586746,"url":"https://github.com/behringer24/envproc","last_synced_at":"2026-05-05T08:38:19.321Z","repository":{"id":150135641,"uuid":"250654779","full_name":"behringer24/envproc","owner":"behringer24","description":"Easy environment variable preprocessor for configuration files","archived":false,"fork":false,"pushed_at":"2020-03-28T15:11:03.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T09:17:09.777Z","etag":null,"topics":["config-management","configuration","configuration-files","docker","environment-variables","linux","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/behringer24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-27T21:45:40.000Z","updated_at":"2020-03-28T15:59:55.000Z","dependencies_parsed_at":"2023-04-07T04:54:33.961Z","dependency_job_id":null,"html_url":"https://github.com/behringer24/envproc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/behringer24/envproc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behringer24%2Fenvproc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behringer24%2Fenvproc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behringer24%2Fenvproc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behringer24%2Fenvproc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/behringer24","download_url":"https://codeload.github.com/behringer24/envproc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behringer24%2Fenvproc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266241044,"owners_count":23898063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config-management","configuration","configuration-files","docker","environment-variables","linux","python"],"created_at":"2024-11-24T15:14:33.098Z","updated_at":"2026-05-05T08:38:14.263Z","avatar_url":"https://github.com/behringer24.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# envproc\nEasy environment variable preprocessor for configuration files\n\n## Why\nWhen building docker containers you usually rely on environment variables as a source for configuration setting and exposing single settings to the user of the ready made containers. Unfortunately not all softwares allow the substitution of environment variables in their config files.\n\nHere envproc comes in handy. Ultra lightweight (apart from needing python 2.7 to run) and easy to use while setting up your containers during build or even on startup time.\n\n## Installation\n\n### Dependencies\nenvproc is written in python and tested with python 2.7 so you will nee a configured python interpreter\n\n### Get the file\nDownload envproc from github or clone the entire repository. Only the `envproc` file is needed. You might need to add the extension `.py` on windows based systems to the downloaded file. \n\n```\nwget https://raw.githubusercontent.com/behringer24/envproc/master/envproc\n```\n\n## Usage\n\n### Getting help\nCall `envproc -h` or `envproc --help` to get the standard commandline help\n\n``` /bin/bash\nusage: envproc [-h] [-c CHAR] [-f] [-v] [infile] [outfile]\n\nPreprocess configuration files and fille with environment variables.\n\npositional arguments:\n  infile                the input file to preprocess. Or use pipe for stdin\n  outfile               the output file to write the parsed result to. Or use\n                        pipe for stdout\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c CHAR, --char CHAR  character that is used as an variable indicator\n  -f, --force           do not stop execution if environment variable is not\n                        found\n  -v, --version         show program's version number and exit\n```\n\n### Adding variables to config files\nBefore you can parse your configuration files you need to add markers that can be replaced by envproc.\n\n```\n[...]\nvariable_name = ${env:ENVNAME}\n[...]\n```\n\nIn this example the placeholder `${env:ENVNAME}` will be replaced with the value of the environment variable `ENVNAME`. If the variable is not set, envproc will stop execution and display an error.\n\nSo if you would like to put the value of the common `PATH` variable into your configuration file you would write:\n```\n[...]\napp_path_var = ${env:PATH}\n[...]\n```\n\n### Parsing your config files\nenvproc can be used in different ways, with the simple use of input- and output file or with streams/pipes stdin and stdout.\n\n#### Simple filenames for in and out\n```\nenvproc your_config_template.conf your_config.conf\n```\n\nThis will read `your_config_template.conf` as an input file template and write the processed results to `your_config.conf`.\n\n#### Using pipes for in and out\n```\nenvproc \u003c your_config_template.conf \u003e your_config.conf\n```\n\n### Changing the prefix character\nAs default envproc uses `$` as the prefix character in the pattern it searches your configs for, like `${env:PATH}`. In some cases you might want to change it to another character. For this you can use the `--char` or `-c` option.\n\n```\nenvproc -c% infile.conf outfile.conf\n```\n\nThis changes the pattern it looks for to `%{env:PATH}`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehringer24%2Fenvproc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbehringer24%2Fenvproc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehringer24%2Fenvproc/lists"}