sync-dotenv

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2019 License: MIT Imports: 10 Imported by: 0

README

sync-dotenv

Release Build Status Coverage Status Go Report Card

Keep your .env.example in sync with changes to your .env file.

Installation

macOS (homebrew)
brew install atrox/tap/sync-dotenv
Windows (scoop)
scoop bucket add sync-dotenv https://github.com/atrox/scoop-bucket
scoop install sync-dotenv
Linux (deb/rpm)

Download the .deb or .rpm from the releases page and install with dpkg -i and rpm -i respectively.

Manually

Download the pre-compiled binaries from the releases page and copy to the desired location.

Usage

sync-dotenv, by default, looks for a .env file in your working directory and synchronizes those keys with your .env.example file. Values will not be synchronized but existing ones in your example file will be kept.

If your files have different names, you can use the flags --env .secrets and --example .secrets.example.

If the flag --watch is provided, sync-dotenv will watch for changes in your working directory and automatically updates your example file.

CLI

sync-dotenv helps you to keep your .env.example in sync with your .env file

Usage:
  sync-dotenv [flags]

Flags:
      --base string      base path for all paths (default ".")
      --env string       path to your env file (default ".env")
      --example string   path to your example env file (default ".env.example")
  -h, --help             help for sync-dotenv
  -v, --verbose          enable verbose messages
      --version          version for sync-dotenv
  -w, --watch            watch for file changes and update the example file automatically

Jetbrains IDE

You can automatically call sync-dotenv via File Watchers. Enable the plugin, import the following XML and your .env.example now automatically updates if you change your .env file.

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL