mwoods79
Envious - a simple env parser written with NimbleParsec
Last year at Jax.Ex (Jacksonville Elixir Meetup) we live mob coded the start of a dotenv parser to learn NimbleParsec. It’s been on my list of things to complete for a while. Today Claude Code helped me finish the outstanding issues.
Features
- Comments: Lines starting with
#are ignored- Export prefix: Optional
exportkeyword (shell compatibility)- Quoted values: Single and double quotes with escape sequences
- Multi-line values: Quoted values can span multiple lines
- Empty values:
KEY=produces an empty string- Digits in keys: Variable names like
DB2_HOST,API_V2_URLare supported- Escape sequences:
\n,\t,\r,\\,\",\'in quoted strings- Blank lines: Multiple blank lines and trailing whitespace are handled correctly
You can use it like this:
# config/runtime.exs
import Config
# Load environment-specific .env file if it exists
env_file = ".#{config_env()}.env"
if File.exists?(env_file) do
env_file |> File.read!() |> Envious.parse!() |> System.put_env()
end
# Do your normal 12-factor things
config :my_app,
key1: System.get_env("KEY1"),
key2: System.get_env("KEY2")
Hope you find it useful. ![]()
Most Liked
Popular in Announcing
I am pleased to announce an initial release of the Membrane Framework - an Elixir-based framework with special focus on processing multim...
New
Renders Jinja templates, either from disk or defined at runtime, with support for all native Jinja features (including extends).
It does...
New
Hi everyone, at Doofinder we have been building llm_composer for some new apps, and we thought it could be useful to share it with the co...
New
I’ve been working with Claude Code extensively and absolutely love it. However, I’ve come across the challenge of managing configuration ...
New
Here’s a preview:
Here’s the link to download:
GenServer cheatsheet
Tell me what you think!
New
WebAuthnLiveComponent WebAuthnComponents
See this post about renaming the package.
Passwordless authentication for Phoenix LiveView app...
New
Elixir Circuits is a set of libraries for interacting with hardware. We previously announced Circuits.UART, and now we’re ready to announ...
New
Hello guys,
I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
Announcing ErrorTracker, an Elixir-based built-in error tracking solution.
Features
Basic, free, built-in error tracking solution. Trac...
New
Hey folks :waving_hand:
I’ve been building a distributed key-value store in Elixir/OTP called Bedrock. It implements FoundationDB’s arch...
New
Other popular topics
Hello!
tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability.
After spen...
New
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode.
The solution seems to be, in a hyphena...
New
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this
"1000"
What is the ...
New
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
I have a User schema with a :from_id field set to type :string:
defmodule TweetBot.Repo.Migrations.CreateUsers do
use Ecto.Migration
...
New
Hello everybody,
usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New







