Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seanghay/sync-env-example
Sync .env.example from local .env faster
https://github.com/seanghay/sync-env-example
dotenv env
Last synced: about 1 month ago
JSON representation
Sync .env.example from local .env faster
- Host: GitHub
- URL: https://github.com/seanghay/sync-env-example
- Owner: seanghay
- License: other
- Created: 2022-07-06T04:15:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-06T06:58:16.000Z (over 2 years ago)
- Last Synced: 2024-11-14T05:13:57.444Z (about 1 month ago)
- Topics: dotenv, env
- Language: JavaScript
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Sync `.env.example`
Create an `.env.example` from your local `.env` without values (just keys). It won't do anything rather than just removing values. No parsing.
It also supports file caching, so it will not process it again if no value changes.
[![test](https://github.com/seanghay/sync-env-example/actions/workflows/test.yml/badge.svg)](https://github.com/seanghay/sync-env-example/actions/workflows/test.yml)
```sh
npx sync-env-example
```Input `.env`
```env
# Comment
KEY1=abc
KEY2=abc
```Output `.env.example`
```env
# Comment
KEY1=
KEY2=
```## Advanced usage
```sh
npx sync-env-example --input .env --output .env.example --replacer MY_REPLACER
```Input `.env`
```env
# Comment
KEY1=abc
KEY2=abc
```Output `.env.example`
```env
# Comment
KEY1=MY_REPLACER
KEY2=MY_REPLACER
```### License
Apache 2.0