{"id":18850779,"url":"https://github.com/luqmanoop/sync-dotenv-slack","last_synced_at":"2025-04-14T09:41:17.281Z","repository":{"id":37768901,"uuid":"211898500","full_name":"luqmanoop/sync-dotenv-slack","owner":"luqmanoop","description":"Keep .env in sync with teammates on Slack","archived":false,"fork":false,"pushed_at":"2023-01-07T11:10:57.000Z","size":714,"stargazers_count":51,"open_issues_count":18,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T22:32:59.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/sync-dotenv-slack","language":"TypeScript","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/luqmanoop.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}},"created_at":"2019-09-30T15:58:02.000Z","updated_at":"2024-07-29T17:04:08.000Z","dependencies_parsed_at":"2023-02-07T00:15:56.669Z","dependency_job_id":null,"html_url":"https://github.com/luqmanoop/sync-dotenv-slack","commit_stats":null,"previous_names":["luqmanoop/sync-dotenv-slack","codeshifu/sync-dotenv-slack"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanoop%2Fsync-dotenv-slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanoop%2Fsync-dotenv-slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanoop%2Fsync-dotenv-slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanoop%2Fsync-dotenv-slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luqmanoop","download_url":"https://codeload.github.com/luqmanoop/sync-dotenv-slack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248855750,"owners_count":21172638,"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-08T03:31:33.274Z","updated_at":"2025-04-14T09:41:17.243Z","avatar_url":"https://github.com/luqmanoop.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sync-dotenv-slack\n\u003e Keep .env in sync with teammates on Slack\n\n![sync-dotenv-slack-demo](https://media.giphy.com/media/Xd744GG44wZWXJzdJb/giphy.gif)\n\n![Travis (.org)](https://img.shields.io/travis/codeshifu/sync-dotenv-slack) [![Coverage Status](https://coveralls.io/repos/github/codeshifu/sync-dotenv-slack/badge.svg?branch=master)](https://coveralls.io/github/codeshifu/sync-dotenv-slack?branch=master)\n\nWhile having a `.env.example` file committed to source control might help in letting teammates know that certain environmental variables are required to get up and running with a project, getting them the values can be a pain. Even worse, alerting them when any of those values (or variables) changes can be a drag.\n\n`sync-dotenv-slack` automates the process of keeping your teammates in the loop when `.env` changes (locally) by securely notifying them on Slack.\n\n## Features\n- Automatic synchronization when env (key/value) changes\n- Securely upload env contents as a file snippet to Slack channel\n- Private/Public Slack channel support\n- Exclude/Include specific env (values) to upload\n\n## Table of contents\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Setup](#setup)\n- [Usage](#usage)\n- [Configuration](#config)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contributors](#contributors)\n\n\n## Prerequisites\n- [Slack](https://slack.com/downloads)\n\n## Installation\n\n```sh\n$ npm install -D sync-dotenv-slack\n```\n\n## Setup\n- Create a Slack app (with required permissions) for your workspace. [Follow this guide](https://gist.github.com/akhilome/6268ef912895af4224b421719e68df3c)\n- Add Slack app tokens to your project `.env`\n  ```\n  ENVBOT_SLACK_BOT_TOKEN=xoxb-******-******-******\n  ENVBOT_SLACK_USER_TOKEN=xoxp-*****-*****-*****-*****\n  ```\n\n## Usage\nTo use this tool, an `envbot` object needs to be added to your project's `package.json` like so. See the [config](#config) section for more info\n\n```js\n// package.json\n  \"scripts\": {\n    ...\n    \"sync-dotenv-slack\": \"envbot\"\n  },\n  \"envbot\": {\n    \"channel\": \"general\",\n    \"include\": [\"*\", \"!SECRET\"]\n  }\n```\nYou can then run `$ npm run sync-dotenv-slack`\n\nor\n\nAutomagically sync before every push using [husky](https://github.com/typicode/husky) or similar tool (**recommended**)\n```diff\n{\n    ...\n+   \"husky\": {\n+    \"hooks\": {\n+      \"pre-push\": \"npm run sync-dotenv-slack\"\n+     }\n+   }\n}\n```\n\n## Config\nYou can configure the `envbot` object with the following options in package.json\n\n#### channel\nType: `string`\n\nSlack channel (name) to post/upload env to.\n\n#### include\nType: `[string]`\n\nAn array of environment variable(s) to include/exclude their values when posting to Slack.\n\n\n##### Using the include option\n\n```bash\n# include all env values\n[\"*\"]\n\n# include all env values but AWS_SECRET\n[\"!AWS_SECRET\"]\n\n# ignore all env values but DB_NAME\n[\"!TOKEN\", \"DB_NAME\"] \n\n# ignore all env values but DB_NAME \u0026 DB_HOST\n[\"DB_NAME\", \"DB_HOST\"]\n```\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\nThis project is licensed under\n[MIT](https://github.com/codeshifu/sync-dotenv-slack/blob/master/LICENSE)\n\n## Contributors\n- [akhilome](https://github.com/akhilome)\n- [codeshifu](https://github.com/codeshifu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluqmanoop%2Fsync-dotenv-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluqmanoop%2Fsync-dotenv-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluqmanoop%2Fsync-dotenv-slack/lists"}