renvy

Crates.iorenvy
lib.rsrenvy
version0.1.6
sourcesrc
created_at2022-07-16 20:28:24.974255
updated_at2023-07-01 14:12:10.992131
description.env file manager that merges defaults with custom settings
homepagehttps://renvy.benjaminsattler.net
repositoryhttps://github.com/benjaminsattler/renvy
max_upload_size
id626895
size48,686
(benjaminsattler)

documentation

README

renvy

This crate provides easy-to-use tool for managing settings files that are based on templates (e.g. .env and .env.dist files).

This crate assumes that the files it manages are key=value pairs which it understands. It will add keys to the settings if they exist in the template file and optionally it'll remove keys from the settings file if they are absent from the template file.

Installation

❯ cargo install renvy

This will install the binary renvy in your cargo installation root (default ~/.cargo/bin).

Usage

Invoke renvy with these arguments

renvy [OPTIONS] <SETTINGS> <DEFAULTS>

ARGS:
    <SETTINGS>
    <DEFAULTS>

OPTIONS:
    -c, --cleanup
    -h, --help       Print help information
    -V, --version    Print version information

A typical invocation would look like this:

❯ renvy -c .env .env.dist

This will ensure that all keys in .env.dist exist in .env by adding all missing keys to .env. Since the -c flag is given it will also remove all keys from .env that are not present in .env.dist.

API

This binary is based on the library librenvy. librenvy enables developers to use the same functionality in their applications. For more information about librenvy install it with cargo install librenvy or head over to https://renvy.benjaminsattler.net.

License: MIT

Commit count: 25

cargo fmt