{"id":13805085,"url":"https://github.com/grottopress/envy","last_synced_at":"2025-09-06T16:34:38.249Z","repository":{"id":53080061,"uuid":"234762197","full_name":"GrottoPress/envy","owner":"GrottoPress","description":"Load environment variables from YAML","archived":false,"fork":false,"pushed_at":"2024-06-21T21:08:00.000Z","size":33,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T17:11:21.490Z","etag":null,"topics":["configuration","crystal","dotenv","environment","yaml"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/GrottoPress.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-18T16:23:22.000Z","updated_at":"2024-09-12T18:30:42.000Z","dependencies_parsed_at":"2024-05-02T19:54:19.254Z","dependency_job_id":"d94363ce-7b1f-4ef4-b849-e51c3d4b913b","html_url":"https://github.com/GrottoPress/envy","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrottoPress%2Fenvy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrottoPress%2Fenvy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrottoPress%2Fenvy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrottoPress%2Fenvy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrottoPress","download_url":"https://codeload.github.com/GrottoPress/envy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254003494,"owners_count":21997896,"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":["configuration","crystal","dotenv","environment","yaml"],"created_at":"2024-08-04T01:00:57.341Z","updated_at":"2025-05-13T18:33:12.454Z","avatar_url":"https://github.com/GrottoPress.png","language":"Crystal","funding_links":[],"categories":["Configuration"],"sub_categories":[],"readme":"# Envy\n\n**Envy** loads and sets environment variables from YAML. It supports all YAML data types, including arrays and hashes.\n\n*Envy* uses the YAML key mapping of a value as the environment variable name. For example, the following YAML configuration...\n\n```yaml\n---\napp:\n  database:\n    host: localhost\n    port: 4321\n  server:\n    hosts:\n      - localhost\n      - grottopress.localhost\n    port: 8080\n  webhooks:\n    - url: \"https://example.com\"\n      token: \"a1b2c2\"\n    - url: \"https://myapp.net\"\n      token: \"d4e5f6\"\n```\n\n...sets environment variables as follows:\n\n```crystal\nENV[\"APP_DATABASE_HOST\"] = \"localhost\"\nENV[\"APP_DATABASE_PORT\"] = \"4321\"\n\nENV[\"APP_SERVER_HOSTS_0\"] = \"localhost\"\nENV[\"APP_SERVER_HOSTS_1\"] = \"grottopress.localhost\"\nENV[\"APP_SERVER_PORT\"] = \"8080\"\n\nENV[\"APP_WEBHOOKS_0_URL\"] = \"https://example.com\"\nENV[\"APP_WEBHOOKS_0_TOKEN\"] = \"a1b2c2\"\nENV[\"APP_WEBHOOKS_1_URL\"] = \"https://myapp.net\"\nENV[\"APP_WEBHOOKS_1_TOKEN\"] = \"d4e5f6\"\n```\n\nIt sets file permission (`0600` by default) for all config files.\n\n*Envy* supports loading a file from a supplied list of files in decreasing order of priority; the first readable file is loaded.\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     envy:\n       github: GrottoPress/envy\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n- Load the first readable file from a supplied list of files. Optionally set files permissions. This does *not* overwrite existing environment variables:\n\n    ```crystal\n    require \"envy\"\n\n    Envy.from_file \".env.yml\", \".env.dev.yml\", perm: 0o400\n    ```\n\n - Load the first readable file from a supplied list of files. Optionally set files permissions. This *overwrites* existing environment variables:\n\n    ```crystal\n    require \"envy\"\n\n    Envy.from_file! \".env.yml\", \".env.dev.yml\", perm: 0o400\n    ```\n\n## Contributing\n\n1. [Fork it](https://github.com/GrottoPress/envy/fork)\n1. Switch to the `master` branch: `git checkout master`\n1. Create your feature branch: `git checkout -b my-new-feature`\n1. Make your changes, updating changelog and documentation as appropriate.\n1. Commit your changes: `git commit`\n1. Push to the branch: `git push origin my-new-feature`\n1. Submit a new *Pull Request* against the `GrottoPress:master` branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrottopress%2Fenvy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrottopress%2Fenvy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrottopress%2Fenvy/lists"}