{"id":17078776,"url":"https://github.com/thesabbir/envan","last_synced_at":"2025-04-12T20:43:58.000Z","repository":{"id":186506171,"uuid":"674505697","full_name":"thesabbir/envan","owner":"thesabbir","description":"envan helps you sync env files from AWS SSM","archived":false,"fork":false,"pushed_at":"2023-08-06T13:06:58.000Z","size":79,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-24T11:56:21.409Z","etag":null,"topics":["aws-parameter-store","cli","environment","environment-variables","monorepo","nodejs","pnpm","turborepo"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/envan","language":"JavaScript","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/thesabbir.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,"governance":null}},"created_at":"2023-08-04T05:40:04.000Z","updated_at":"2023-10-17T14:46:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6831900-40c9-4e4c-8903-b8c86e61aa18","html_url":"https://github.com/thesabbir/envan","commit_stats":null,"previous_names":["thesabbir/envan"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesabbir%2Fenvan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesabbir%2Fenvan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesabbir%2Fenvan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesabbir%2Fenvan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesabbir","download_url":"https://codeload.github.com/thesabbir/envan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631686,"owners_count":21136555,"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":["aws-parameter-store","cli","environment","environment-variables","monorepo","nodejs","pnpm","turborepo"],"created_at":"2024-10-14T12:23:23.023Z","updated_at":"2025-04-12T20:43:57.967Z","avatar_url":"https://github.com/thesabbir.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# envan\n\nenvan helps you sync env files from AWS SSM. Allows you to share your environment variables in a simple way when you have a team.\n\n- [Features](#features)\n- [Installation](#installation)\n- [Prerequisites](#prerequisites)\n- [Usage](#usage)\n  - [Usage as CLI](#usage-as-cli)\n  - [Usage as package](#usage-as-package)\n  - [CI/CD](#cicd)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- Store and sync environment variables from AWS SSM Parameter Store.\n- Works with mono repo. (Currently, it only supports pnpm package managers for mono repo)\n- Works with CI/CD pipelines.\n- Works with AWS profiles.\n- Works with workspace mode.\n- Generate .env.example files.\n\n## Installation\n\n```bash\nnpm i envan\n```\n\n```bash\nyarn add envan\n```\n\n```bash\npnpm add envan\n```\n\nYou can always run commands as cli tool or a npm or npx script inside a project. Add `-g` if you want to use envan globally.\n\n## Prerequisites\n\n- AWS credentials configured\n  - Using [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n  - Or setup environment variables\n    - AWS_ACCESS_KEY_ID\n    - AWS_SECRET_ACCESS_KEY\n    - AWS_REGION\n- AWS SSM Parameters created\n- AWS SSM Parameters must be in the following format:\n  ```\n  /\u003cenvironment\u003e/\u003cservice\u003e/\u003ckey\u003e\n  ```\n- Add fields in package.json\n\nExample:\n\n```json\n{\n  \"envan\": {\n    \"ssmPaths\": {\n      \"dev\": \"/dev/\u003cservice-name\u003e\",\n      \"prod\": \"/prod/\u003cservice-name\u003e\"\n    }\n  }\n}\n```\n\n## Usage\n\n## Usage as CLI\n\n```bash\nUsage: envan [options] [command]\n\nSync .env files from AWS SSM Parameter Store\n\nOptions:\n  -v, --version    output the current version\n  -h, --help       display help for command\n\nCommands:\n  pull [options]   envan helps you sync env files from AWS SSM\n  clean [options]  clean .env files\n  help [command]   display help for command\n\n\nExamples:\n--------\nPull dev .env files from Parameter Store:\n  $ envan pull\nPull prod params with AWS profile:\n  $ envan pull -e prod -p my-profile\nPull with AWS profile and force overwrite:\n  $ envan pull -e dev -p my-profile -f\nPull with specified aws profile and force overwrite in workspace mode:\n  $ envan pull -e dev -p my-profile -f -w\nPull .env and generate .env.example in workspace mode:\n  $ envan pull -e dev -w -eg\nClean .env files:\n  $ envan clean\nClean .env and  .env.example files:\n  $ envan clean -eg\nClean .env and  .env.example files in workspace:\n  $ envan clean -w -eg\n```\n\n## Usage as package\n\nLoad .env files to process.env:\n\n```js\nconst { loadEnv } = require(\"envan\");\n\nloadEnv();\n```\n\n## CI/CD\n\nYou can use envan in your CI/CD pipeline to sync env files from AWS SSM Parameter Store. Configure AWS credentials in your CI/CD pipeline. And then you can use envan to sync env files.\n\nHere is an example Github Actions Step:\n\n```yaml\n    - name: Get .env files\n        run: pnpm envan pull -e dev\n        env:\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n          AWS_REGION: ${{ secrets.AWS_REGION }}\n\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesabbir%2Fenvan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesabbir%2Fenvan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesabbir%2Fenvan/lists"}