{"id":18073368,"url":"https://github.com/blakewilliams/envy","last_synced_at":"2025-04-09T09:08:32.450Z","repository":{"id":1894504,"uuid":"45284120","full_name":"BlakeWilliams/envy","owner":"BlakeWilliams","description":"dotenv like easy loading of environment variables in Elixir","archived":false,"fork":false,"pushed_at":"2022-09-27T19:15:56.000Z","size":18,"stargazers_count":71,"open_issues_count":11,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T22:08:47.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlakeWilliams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-31T01:15:34.000Z","updated_at":"2024-12-29T17:11:02.000Z","dependencies_parsed_at":"2022-07-21T05:03:21.646Z","dependency_job_id":null,"html_url":"https://github.com/BlakeWilliams/envy","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlakeWilliams%2Fenvy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlakeWilliams%2Fenvy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlakeWilliams%2Fenvy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlakeWilliams%2Fenvy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlakeWilliams","download_url":"https://codeload.github.com/BlakeWilliams/envy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-31T10:06:36.703Z","updated_at":"2025-04-09T09:08:32.430Z","avatar_url":"https://github.com/BlakeWilliams.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Envy\n\nA simple Elixir library to load environment variables from `.env` and\nenvironment specific env files like `.env.dev`, `.env.test`, etc.\n\n## Installation\n\nAdd envy to your dependencies in `mix.exs`.\n\n```elixir\ndef deps do\n  [\n    {:envy, \"~\u003e 1.1.1\"},\n  ]\nend\n```\n\n## Usage\n\nTo load env files you have two options, you can use the autoloader or give the\nlibrary paths to specific files to load itself.\n\nUsing `auto_load` you can add the following to your application in `lib/my_application.ex`:\n\n```elixir\ndefmodule MyApplication do\n  use Application\n\n  def start(_type, _args) do\n    unless Mix.env == :prod do\n      Envy.auto_load\n    end\n    # Existing code\n  end\nend\n```\n\nThis will look for `.env` and the mix env specific file. For example if your\napplications `Mix.env` is `dev` then envy will attempt to load `.env.dev`\n\nYou can also specify which files to load manually using `Envy.load` which\naccepts a list of files to attempt to load.\n\n```elixir\nEnvy.load([\".env\"])\n```\n\nTo export `FOO` as `bar` you can add the following line to your env file.\n\n```\nfoo=bar\n```\n\nComments can be added with a `#`.\n\n```\nfoo=bar # comments\n```\n\nIf you need to use `#` in your values you can use double quotes.\n\n```\ntag=\"#bar\" #comments\n```\n\n## Using Envy in config\n\nIf you need environment variables set by envy in `config/` files you can load\nyour env files with `Envy.auto_load` or `Envy.load` then call\n`Envy.reload_config` to re-evaluate the config files with the correct\nenvironment variables set.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakewilliams%2Fenvy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblakewilliams%2Fenvy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakewilliams%2Fenvy/lists"}