{"id":21857164,"url":"https://github.com/upfluence/etcdenv","last_synced_at":"2026-02-27T11:32:11.235Z","repository":{"id":25096067,"uuid":"28517097","full_name":"upfluence/etcdenv","owner":"upfluence","description":"Use your etcd keys as environment variables","archived":false,"fork":false,"pushed_at":"2019-03-27T18:13:03.000Z","size":2105,"stargazers_count":22,"open_issues_count":0,"forks_count":4,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-28T06:51:15.637Z","etag":null,"topics":["etcd","go","kind-cli","service-discovery"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/upfluence.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-26T17:42:54.000Z","updated_at":"2024-10-05T03:49:33.000Z","dependencies_parsed_at":"2022-08-23T17:51:02.838Z","dependency_job_id":null,"html_url":"https://github.com/upfluence/etcdenv","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upfluence%2Fetcdenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upfluence%2Fetcdenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upfluence%2Fetcdenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upfluence%2Fetcdenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upfluence","download_url":"https://codeload.github.com/upfluence/etcdenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248936609,"owners_count":21186062,"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":["etcd","go","kind-cli","service-discovery"],"created_at":"2024-11-28T02:25:54.783Z","updated_at":"2026-02-27T11:32:06.199Z","avatar_url":"https://github.com/upfluence.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# etcdenv\n\nEtcdenv provide a convenient way to populate environments variables from one your etcd directory\n\n## Installation\n\nEasy! You can just download the binary from the command line:\n\n* Linux\n\n```shell\ncurl -sL https://github.com/upfluence/etcdenv/releases/download/v0.0.1/etcdenv-linux-amd64-0.0.1 \u003e etcdenv\n```\n\n* OSX\n\n```shell\ncurl -sL https://github.com/upfluence/etcdenv/releases/download/v0.0.1/etcdenv-darwin-amd64-0.0.1 \u003e etcdenv\n```\n\nIf you would prefer compile the binary (assuming buildtools and Go are installed) :\n\n```shell\ngit clone git@github.com:upfluence/etcdenv.git\ncd etcdenv\ngo get github.com/tools/godep\nGOPATH=`pwd`/Godeps/_workspace go build -o etcdenv .\n```\n\n## Usage\n\n### Options\n\n| Option | Default | Description |\n| ------ | ------- | ----------- |\n| `server`, `s` | http://127.0.0.1:4001 | Location of the etcd server |\n| `namespace`, `n`| /environments/production | Etcd directory where the environment variables are fetched. You can watch multiple namespaces by using a comma-separated list (/environments/production,/environments/global) |\n| `shutdown-behaviour`, `b` | exit | Strategy to apply when the process exit, further information into the next paragraph |\n| `watched`, `w` | `\"\"` | A comma-separated list of environment variables triggering the command restart when they change |\n\n\n### Shutdown strategies\n\n* `restart`: `etcdenv` rerun the command when the wrapped process exits\n* `exit`:  The `etcdenv` process exits with the same exit status as the\n  wrapped process's\n* `keepalive`: The `etcdenv` process will stay alive and keep looking\n  for etcd changes to re-run the command\n\n### Command line\n\nThe CLI interface supports all of the options detailed above.\n\n\n#### Example\n\n*Assuming a etcd server is launched on your machine*\n\n**You can print env variables fetched from the `/` directory of your local node of etcd**\n\n```shell\n$ curl -XPOST -d \"value=bar\" http://127.0.0.1:4001/v2/keys/FOO\n$ etcdenv -n / -r false printenv\n# ... your local environment variables\nFOO=bar\n$\n```\n\n**You can also follow the changes of the directory**\n\n```shell\n$ curl -XPOST -d \"value=bar\" http://127.0.0.1:4001/v2/keys/FOO\n$ etcdenv -n / printenv \u0026\n# ... your local environment variables\nFOO=bar\n$ curl -XPOST -d \"value=buz\" http://127.0.0.1:4001/v2/keys/FOO\n2014/12/29 00:30:00 Restarted\n# ... your local environment variables\nFOO=buz\n```\n\n**To watch a set of keys only**\n\n```shell\n$ curl -XPOST -d \"value=google.com\" http://127.0.0.1:4001/v2/keys/GOOGLE_URL\n$ etcdenv -n / -w \"FOO,GOOGLE_URL\" printenv \u0026\n# ... your local environment variables\nGOOGLE_URL=google.com\n$ curl -XPOST -d \"value=foo\" http://127.0.0.1:4001/v2/keys/BAR\n# ... the running command does not restart\n$ curl -XPOST -d \"value=baz\" http://127.0.0.1:4001/v2/keys/FOO\n# ... your local environment variables\nFOO=baz\n```\n\n## Contributing\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupfluence%2Fetcdenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupfluence%2Fetcdenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupfluence%2Fetcdenv/lists"}