#env-var #shell-environment #directory #load #config-directory #replace

app degenverate

Loads environment variables from an environment.d directory

4 releases

0.2.2 Mar 4, 2024
0.2.1 Feb 4, 2024
0.2.0 Apr 30, 2023
0.1.0 Apr 29, 2023

#91 in Configuration

Download history 16/week @ 2024-02-19 11/week @ 2024-02-26 154/week @ 2024-03-04 7/week @ 2024-03-11 54/week @ 2024-04-01

66 downloads per month

MIT license

10KB
155 lines

degenverate

A tool to load environment variables from an environment.d directory into your shell.

degenverate is inspired by the 30-systemd-environment-d-generator program included with systemd, although it is not a drop-in replacement. The dotenvy crate is used for parsing environment files.

Installation

Latest release:

cargo install degenverate

Development version:

cargo install --git https://git.sr.ht/~arm32x/degenverate

Usage

  1. Create an environment.d directory in $XDG_CONFIG_HOME (which defaults to ~/.config). Files in this directory will be loaded in alphabetical order, regardless of extension.
  2. Add eval "$(degenverate --format=export)" to your shell's initialization script (.zshenv or similar).

Dependencies

~1–11MB
~96K SLoC