envsync
A simple command for checking if the environment and the environment example files are synced. Under the hood, the command checks if the files have the same keys.
It can be used as a library or as a bin command.
Operating system, programming language and framework agnostic
The command runs on all three main platforms (Linux, Mac, Windows), it is programming languages and frameworks agnostic.
Built on top of gotdotenv.
Installation
Library
go get github.com/claudiunicolaa/envsync
Bin Command
go get github.com/claudiunicolaa/envsync/cmd/envsync
Usage
package main
import (
"fmt"
"github.com/claudiunicolaa/envsync"
)
func main() {
_, err := envsync.EnvSync(".env", ".env.example")
if err != nil {
fmt.Println(err)
return
}
// ...
}
Bin command
Install as above and you can run it like as a bin command from your terminal.
envsync [-h] path/to/environment/example/file [path/to/environment/file]
// The above Go code can be translated into
envsync .env.example .env
Something wrong?
If you encounter some problems, please open an issue.