#env-var #shell-environment #variables #directory #load #config-directory #systemd

app degenverate

Loads environment variables from an environment.d directory

6 releases

0.2.4 Sep 2, 2024
0.2.3 Sep 2, 2024
0.2.2 Mar 4, 2024
0.2.1 Feb 4, 2024
0.1.0 Apr 29, 2023

#74 in Configuration

Download history 7/week @ 2024-07-23 4/week @ 2024-07-30 152/week @ 2024-08-27 180/week @ 2024-09-03

332 downloads per month

MIT license

11KB
163 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://codeberg.org/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–12MB
~87K SLoC