{"id":26610551,"url":"https://github.com/oxplot/starenv","last_synced_at":"2025-04-10T00:05:12.342Z","repository":{"id":57627613,"uuid":"403534263","full_name":"oxplot/starenv","owner":"oxplot","description":"starenv allows populating environmental variables from variety of sources, such as AWS Parameter Store, GPG encrypted files and more, with extreme ease.","archived":false,"fork":false,"pushed_at":"2023-07-01T03:03:13.000Z","size":31,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T00:05:04.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/oxplot/starenv","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxplot.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":"2021-09-06T07:55:49.000Z","updated_at":"2022-11-25T11:29:42.000Z","dependencies_parsed_at":"2023-02-18T22:25:15.448Z","dependency_job_id":null,"html_url":"https://github.com/oxplot/starenv","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxplot%2Fstarenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxplot%2Fstarenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxplot%2Fstarenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxplot%2Fstarenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxplot","download_url":"https://codeload.github.com/oxplot/starenv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131320,"owners_count":21052819,"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":"2025-03-24T01:48:36.268Z","updated_at":"2025-04-10T00:05:12.319Z","avatar_url":"https://github.com/oxplot.png","language":"Go","readme":"# Starenv\n\n[![Go\nReference](https://pkg.go.dev/badge/github.com/oxplot/starenv.svg)](https://pkg.go.dev/github.com/oxplot/starenv)\n\n**starenv** (`*env`) allows populating environmental variables from\nvariety of sources, such as AWS Parameter Store, GPG encrypted files\nand more, with extreme ease.\n\nFor the impatient, import the `autoload` package and you're set:\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"os\"\n\n  _ \"github.com/oxplot/starenv/autoload\"\n)\n\nfunc main() {\n  fmt.Printf(\"GITHUB_TOKEN=%s\\n\", os.Getenv(\"GITHUB_TOKEN\"))\n}\n```\n\nand set the value of the environmental variable to load from Parameter\nStore:\n\n```sh\n$ export GITHUB_TOKEN=*ssm:/github_token\n$ go run main.go\nGITHUB_TOKEN=abcdef-1235143-abcdef-123-abcdef-12314\n```\n\nor from a GPG encrypted file:\n\n```sh\n$ export GITHUB_TOKEN=*gpg*file:github_token.gpg\n$ go run main.go\nGITHUB_TOKEN=abcdef-1235143-abcdef-123-abcdef-12314\n```\n\nwhy not ditch the file and embed its content:\n\n```sh\n$ export GITHUB_TOKEN=*gpg*b64:eNeO7D2rBrBOOcW6TuETyHdyPEOaAfdgaTzgOTSvROI=\n$ go run main.go\nGITHUB_TOKEN=abcdef-1235143-abcdef-123-abcdef-12314\n```\n\nand thanks to the amazing [godotenv](https://github.com/joho/godotenv)\nwhich is run as part of starenv's `autoload` package, you can even do:\n\n```sh\n$ echo 'GITHUB_TOKEN=*keyring:awesome_app/github_token' \u003e .env\n$ go run main.go\nGITHUB_TOKEN=abcdef-1235143-abcdef-123-abcdef-12314\n```\n\nFor a full list, see [the\ndocs](https://pkg.go.dev/github.com/oxplot/starenv/derefer#NewDefault).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxplot%2Fstarenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxplot%2Fstarenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxplot%2Fstarenv/lists"}