{"id":27947872,"url":"https://github.com/luckyframework/lucky_env","last_synced_at":"2026-02-21T11:33:14.620Z","repository":{"id":39643847,"uuid":"338694280","full_name":"luckyframework/lucky_env","owner":"luckyframework","description":"An environment variable manager","archived":false,"fork":false,"pushed_at":"2025-06-01T16:25:53.000Z","size":94,"stargazers_count":5,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-02T01:04:55.392Z","etag":null,"topics":[],"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/luckyframework.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-13T23:51:04.000Z","updated_at":"2025-06-01T16:23:26.000Z","dependencies_parsed_at":"2025-05-07T14:44:48.538Z","dependency_job_id":"bff4d181-216d-4598-993c-02991296c0a6","html_url":"https://github.com/luckyframework/lucky_env","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/luckyframework/lucky_env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckyframework%2Flucky_env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckyframework%2Flucky_env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckyframework%2Flucky_env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckyframework%2Flucky_env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luckyframework","download_url":"https://codeload.github.com/luckyframework/lucky_env/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckyframework%2Flucky_env/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29679866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T11:29:27.227Z","status":"ssl_error","status_checked_at":"2026-02-21T11:29:20.292Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-05-07T14:38:17.227Z","updated_at":"2026-02-21T11:33:14.579Z","avatar_url":"https://github.com/luckyframework.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LuckyEnv\n\nYet another environment variable manager. Read from a file like a `.env`\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n  lucky_env:\n    github: luckyframework/lucky_env\n```\n\n2. Run `shards install`\n\n## Usage\n\n### Environment variable file\n\nCreate your \"env\" file. Name it whatever you want. Most common is `.env`.\n\nThe file is created with key/value pairs separated by `=`.\n\n```text\nAPP_NAME=my_app\nLUCKY_ENV=development\nDEV_PORT=3002\nDB_NAME=${APP_NAME}_${LUCKY_ENV}\n```\n\n### Crystal code\n\n```crystal\n# This would normally go in your `src/shards.cr` file\nrequire \"lucky_env\"\n\n# Loads the \".env\" file. Raises if it is missing\nLuckyEnv.load(\".env\")\n\n# Use `load?` if the file is optional. \n# This will not raise if the file is missing\nLuckyEnv.load?(\".env\")\n\nENV[\"LUCKY_ENV\"] == \"development\" # =\u003e true\n\n# Returns whatever `ENV[\"LUCKY_ENV\"]` is set to, or `\"development\"` if not set.\nLuckyEnv.environment # =\u003e \"development\"\n\n# Environment predicates\nLuckyEnv.development? # =\u003e true\nLuckyEnv.production? # =\u003e false\nLuckyEnv.test? # =\u003e false\n```\n\n## Development\n\nInstall shards `shards install`, and start making changes.\nBe sure to run `./bin/ameba`, and the crystal formatter `crystal tool format spec src`.\n\nRead through the issues for things you can work on. If you have an idea, feel free to\nopen a new issue!\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/luckyframework/lucky_env/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Jeremy Woertink](https://github.com/jwoertink) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckyframework%2Flucky_env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluckyframework%2Flucky_env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckyframework%2Flucky_env/lists"}