{"id":18282981,"url":"https://github.com/zentered/envsync","last_synced_at":"2025-07-22T18:33:45.577Z","repository":{"id":63761298,"uuid":"570515161","full_name":"zentered/envsync","owner":"zentered","description":"Synchronize .env files with Google Cloud Secrets Manager","archived":false,"fork":false,"pushed_at":"2025-06-09T14:58:31.000Z","size":349,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-10T11:13:20.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zentered.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-11-25T11:26:06.000Z","updated_at":"2025-06-09T14:58:08.000Z","dependencies_parsed_at":"2024-03-05T17:46:40.828Z","dependency_job_id":"00541673-8666-4543-9e95-6a6fa4b66b1f","html_url":"https://github.com/zentered/envsync","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"0f279ec9e18698f031c4db24de89d3fd9096f072"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/zentered/envsync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fenvsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fenvsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fenvsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fenvsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zentered","download_url":"https://codeload.github.com/zentered/envsync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fenvsync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265218750,"owners_count":23729528,"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":[],"created_at":"2024-11-05T13:06:53.450Z","updated_at":"2025-07-22T18:33:45.546Z","avatar_url":"https://github.com/zentered.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EnvSync\n\n\u003cp align=\"center\"\u003e\n  \u003cimg height=\"150\" src=\".github/assets/cloud-icon.jpeg\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/zentered/envsync/actions/workflows/test.yml\"\u003e\u003cimg alt=\"Unit Test status\" src=\"https://github.com/zentered/envsync/actions/workflows/test.yml/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/zentered/envsync/actions/workflows/publish.yml\"\u003e\u003cimg alt=\"Unit Test status\" src=\"https://github.com/zentered/envsync/actions/workflows/publish.yml/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://semantic-release.gitbook.io/semantic-release/\"\u003e\u003cimg alt=\"Semantic Release bagde\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://zentered.co\"\u003e\u003cimg alt=\"Semantic Release bagde\" src=\"https://img.shields.io/badge/\u003e-Zentered-lightgrey?style=flat\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n`EnvSync` is an attempt to make it easier for developers to initialize an\nenvironment or update environment variables with on a single source of truth.\n\n`EnvSync` currently works with Google Cloud Platform (Secrets Manager). It reads\nthe environment configuration from an `.env.example` file that is commonly used\nto help developers get started with a new project, fetches the values from the\nGoogle Cloud Platform (Secrets Manager) and writes them to a `.env` file.\n\nFor example, if you have the following `.env.example` file:\n\n```bash\nGCP_PROJECT=myproject-dev\nAPI_URL=http://localhost:3000\n\nAUTH0_CLIENT_SECRET=envsync//auth0-api-client-secret/latest\n```\n\nWill write the following `.env` file:\n\n```bash\nGCP_PROJECT=myproject-dev\nAPI_URL=http://localhost:3000\n\nAUTH0_CLIENT_SECRET=secret-value-from-gcp-project\n```\n\n**Important**: The first variable in the example should be `GCP_PROJECT` as\nwe're using that to determine the right project. A `keyfile.json`\n([Create and manage service account keys](https://cloud.google.com/iam/docs/creating-managing-service-account-keys))\nis required in the same folder as the `.env.example` file.\n\n### Installation \u0026 Usage\n\n```bash\n    npm install @zentered/envsync\n    # pnpm i @zentered/envsync\n    # yarn add @zentered/envsync\n```\n\n#### Two things are required to use `EnvSync`:\n\n1. An `.env.example` file (use `envsync//[variable]` to indicate a variable that\n   should be fetched from Secrets Manager). The first variable should be\n   `GCP_PROJECT` with the valid project id\n2. a `keyfile.json` from a Google Cloud Platform service account with Secrets\n   Manager API enabled, and permission to read secrets\n\n`EnvSync` is a CLI tool. You can run it with `npx envsync` or add it as a\n`script` in `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"envsync\": \"envsync\"\n  }\n}\n```\n\n#### Optional: Specifying the `.env` file:\n\nNote: this is an anti-pattern and should be avoided. Environment variables\nbelong in the environment, not in the codebase. See\n[12 factor app](https://12factor.net/config).\n\n- If you have multiple `.env` files, you can provide the filename as an\n  argument. The `.env` example file must end in `.example`\n- Usage: `npx envsync .env.development.example` will create `.env.development`\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md).\n\n## License\n\nSee [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentered%2Fenvsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzentered%2Fenvsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentered%2Fenvsync/lists"}