{"id":18099625,"url":"https://github.com/atomaka/psenv","last_synced_at":"2026-02-27T21:34:37.521Z","repository":{"id":46549659,"uuid":"126400223","full_name":"atomaka/psenv","owner":"atomaka","description":"Shim to load environment variables from AWS Systems Manager Parameter Store into ENV.","archived":false,"fork":false,"pushed_at":"2023-01-19T23:35:49.000Z","size":105,"stargazers_count":4,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-12T12:15:30.248Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/atomaka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-22T22:03:43.000Z","updated_at":"2022-11-22T04:18:46.000Z","dependencies_parsed_at":"2023-02-11T22:31:47.593Z","dependency_job_id":null,"html_url":"https://github.com/atomaka/psenv","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/atomaka/psenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomaka%2Fpsenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomaka%2Fpsenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomaka%2Fpsenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomaka%2Fpsenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomaka","download_url":"https://codeload.github.com/atomaka/psenv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomaka%2Fpsenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29504689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: 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":["hacktoberfest"],"created_at":"2024-10-31T21:10:16.434Z","updated_at":"2026-02-27T21:34:37.506Z","avatar_url":"https://github.com/atomaka.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Psenv\n\nShim to load environment variables from [AWS Systems Manager Parameter Store](https://aws.amazon.com/systems-manager/features/#Parameter_Store) into ENV.\n\nPsenv currently heavily borrows from [Dotenv](https://github.com/bkeepers/dotenv), mainly because I use it in roughly every project so it made sense for the APIs to match.\n\n## Installation\n\n### Rails\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'psenv-rails'\n```\n\nAnd then execute:\n\n    $ bundle\n\nSet the `PARAMETER_STORE_PATH` environment variable with the AWS Parameter\nStore path that you wish to load.\n\n#### Spring preloader\n\nThe Spring preloader does not detect environment variable changes as\napplication changes.  This means that when using Spring, new or changed\nenvironment variables from AWS SSM Parameter Store will not become available\nimmediately.  This also applies to any change to `PARAMETER_STORE_PATH`.\n\nThere are two work-arounds.  You can force Spring to restart by killing it with\n`bundle exec spring stop`.\n\nAlternatively, you can update your Spring configuration to reload variables\nusing Psenv after the process forks. To do this, add the following configuration\nto `config/spring.rb`:\n\n```\nSpring.after_fork do\n  Psenv.load\nend\n```\n\n### Plain Ruby\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'psenv'\n```\n\nAnd then execute:\n\n    $ bundle\n\nSet the `PARAMETER_STORE_PATH` environment variable with the AWS Parameter\nStore path that you wish to load.\n\nFinally, trigger the loading:\n\n```ruby\nrequire 'psenv'\nPsenv.load\n```\n\n## Usage\n\n* Create a variable in parameter store using the AWS console or the CLI\n\n```\naws ssm put-parameter \\\n\t--name /psenv/test/API_KEY \\\n\t--value \"api_key_value\" \\\n\t--type String\n```\n\n* Ensure your application has at least the following IAM permissions\n\t* `ssm:GetParametersByPath` on resource `arn:aws:ssm:::parameter/psenv/test/*`\n* Set the `PARAMETER_STORE_PATH` environment variable to `/psenv/test/`\n\nThis example will set the `API_KEY` to `api_key_value` and make it available to\nyour application.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/atomaka/psenv.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomaka%2Fpsenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomaka%2Fpsenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomaka%2Fpsenv/lists"}