{"id":15564231,"url":"https://github.com/and3rson/convensul","last_synced_at":"2025-03-12T13:22:28.334Z","repository":{"id":66108474,"uuid":"89362637","full_name":"and3rson/convensul","owner":"and3rson","description":"Initializes environment with env vars from Consul YAML document and runs app.","archived":false,"fork":false,"pushed_at":"2017-04-26T09:01:49.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T12:13:16.681Z","etag":null,"topics":["consul","convensul","envconsul","environment","environment-variables","hashicorp","hashicorp-consul"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/and3rson.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":"2017-04-25T13:16:06.000Z","updated_at":"2017-04-25T13:26:50.000Z","dependencies_parsed_at":"2023-02-26T06:30:34.411Z","dependency_job_id":null,"html_url":"https://github.com/and3rson/convensul","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/and3rson%2Fconvensul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/and3rson%2Fconvensul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/and3rson%2Fconvensul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/and3rson%2Fconvensul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/and3rson","download_url":"https://codeload.github.com/and3rson/convensul/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243223023,"owners_count":20256388,"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":["consul","convensul","envconsul","environment","environment-variables","hashicorp","hashicorp-consul"],"created_at":"2024-10-02T16:40:16.326Z","updated_at":"2025-03-12T13:22:28.312Z","avatar_url":"https://github.com/and3rson.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Convensul\n\nA lightweight bash version of the \"envconsul\" utility.\n\n# Dependencies\n\n- Core utils (`curl`, `awk` and `cut`)\n\n# Usage\n\nImagine you have this kind of document in Consul KV storage:\n\n```yaml\n# KV: /config/app\nFOO: bar\nSPAM: eggs\n```\n\nLet's create a simple Python app that uses env variables:\n\n```python\n# application.py\nimport os\n\nprint('Foo is %s.' % os.environ['FOO'])\nprint('Spam is best served with %s.' % os.environ['SPAM'])\n```\n\nNow let's run `convensul`:\n\n```bash\n$ convensul.sh 127.0.0.1:8500 secret-acl-token /config/app python application.py\nFoo is bar.\nSpam is best server with eggs.\n```\n\nYou can also store the ACL token in the environment if you don't want to expose its value,\nfor example, if your script is used in some sort of CI, e. g. Jenkins.\n\nFor this you need to set CONVENSUL_TOKEN env var to your token value and pass `-` instead of the token:\n\n```bash\n$ export CONVENSUL_TOKEN=secret-acl-token\n$ convensul.sh 127.0.0.1:8500 - /config/app python application.py\nFoo is bar.\nSpam is best server with eggs.\n```\n\n# Why \"convensul\"?\n\nBecause \"convensul\" is a mix of \"consul\" and \"env\": \"conVENsul\".\n\nAlso it has some sort of \"convention\" word meaning.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fand3rson%2Fconvensul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fand3rson%2Fconvensul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fand3rson%2Fconvensul/lists"}