# \[ANN\] Announcing ConfigEnv.jl - your secrets manager

**URL:** https://discourse.julialang.org/t/ann-announcing-configenv-jl-your-secrets-manager/59737
**Category:** Package Announcements
**Tags:** announcement, environment
**Created:** [April 21, 2021, 1:33pm UTC](https://discourse.julialang.org/t/ann-announcing-configenv-jl-your-secrets-manager/59737 "2021-04-21T13:33:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)
#### Post date: [April 21, 2021, 1:33pm UTC](https://discourse.julialang.org/t/ann-announcing-configenv-jl-your-secrets-manager/59737/1 "2021-04-21T13:33:12Z")

</div>

I am pleased to announce [ConfigEnv.jl](https://github.com/Arkoniak/ConfigEnv.jl), an environment configuration package that loads environment variables from a `.env` file into [`ENV`](https://docs.julialang.org/en/latest/manual/environment-variables/). This package was inspired by [python-dotenv](https://github.com/theskumar/python-dotenv) library and [the Twelve-Factor App](https://12factor.net/config) methodology.

Its intended usage is when you have some secrets like database passwords, which shouldn’t leak into public space, and at the same time, you want to have simple and flexible management of such secrets. Another usage possibility is when some library uses environmental variables for configuration and you want to configure them without editing your `.bashrc` or Windows environment.

It comes with the following features

- load data from configuration files to ENV in overwriting and non-overwriting mode;
- read data from `String` and `IO` objects;
- merge data from different configuration files;
- template variables with an arbitrary templating depth and introspection tools for discovering unresolved templates and circular dependencies.

Together these features provide a foundation of a very flexible manager, which can be used in a most simple scenario, when you just want to populate `ENV` with your password, to the possibility of switching your remote servers from production to test mode without changing a single line of code or building complicated hierarchical environments.

As an example, this is how you can use this package to simplify sending messages in `Telegram`.

First of all, prepare `.env` file

```julia
# .env
TELEGRAM_BOT_TOKEN = <YOUR TELEGRAM BOT TOKEN>
TELEGRAM_BOT_CHAT_ID = <YOUR TELEGRAM CHAT ID>

```

and now you can use `dotenv` function to automatically set up `Telegram` client.

```julia
using Telegram, Telegram.API
using ConfigEnv

dotenv()

# uses ENV["TELEGRAM_BOT_TOKEN"] and ENV["TELEGRAM_BOT_CHAT_ID"] internally
sendMessage(text = "Hello, world!")

```

More complicated examples of the usage can be found in [Examples](https://arkoniak.github.io/ConfigEnv.jl/dev/scenarios/) section of the documentation.

---

<div class="post-metadata">

### Author: ![TheCedarPrince](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thecedarprince/32/17323_2.png) [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)
#### Post date: [April 21, 2021, 3:17pm UTC](https://discourse.julialang.org/t/ann-announcing-configenv-jl-your-secrets-manager/59737/2 "2021-04-21T15:17:30Z")

</div>

Yes!!! This is what I have been searching for! Thanks @Skoffer ! Looking forward to trying it out more!

---

<div class="post-metadata">

### Author: ![merlin](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@merlin](https://discourse.julialang.org/u/merlin)
#### Post date: [April 20, 2023, 10:53pm UTC](https://discourse.julialang.org/t/ann-announcing-configenv-jl-your-secrets-manager/59737/3 "2023-04-20T22:53:43Z")

</div>

This is really useful, in the same way I use python-dotenv for poetry managed python packages.
