{"id":20770677,"url":"https://github.com/codemonauts/json2env","last_synced_at":"2026-04-24T14:33:32.270Z","repository":{"id":228159853,"uuid":"644449114","full_name":"codemonauts/json2env","owner":"codemonauts","description":"Directly load variables from AWS SecretsManager or json into environment variables","archived":false,"fork":false,"pushed_at":"2023-05-24T14:43:20.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T07:12:00.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemonauts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-05-23T14:36:01.000Z","updated_at":"2024-03-11T19:12:29.000Z","dependencies_parsed_at":"2024-03-17T11:01:36.162Z","dependency_job_id":"a41116fb-3738-47af-8dee-2e180b36dbad","html_url":"https://github.com/codemonauts/json2env","commit_stats":null,"previous_names":["codemonauts/json2env"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fjson2env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fjson2env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fjson2env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonauts%2Fjson2env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemonauts","download_url":"https://codeload.github.com/codemonauts/json2env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243104204,"owners_count":20236943,"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-11-17T12:11:21.526Z","updated_at":"2025-12-16T12:54:41.194Z","avatar_url":"https://github.com/codemonauts.png","language":"Go","readme":"# json2env\n\nIn our CI/CD pipelines we regularly had the same pattern emerge which resulted in a lot of boilerplate code.\nWe always read a secret from the AWS SecretsManager, torn it apart with jq and loaded it into environment variables to use it e.g. with sed to put them into different configuration files.\n\nThis tool can either read json from stdin, or if `-secret-id` is given, directly read key/value pairs from AWS\nSecretsManager.\n\nIt will output a list of `export KEY=value` lines to stdout so you could  just wrap\nit into an `eval $()` call in your pipeline script.\n\n## Usage\nTo directly query AWS SecretsManager use the *-secret-id* flag:\n```bash\njson2env -secret-id myAWSsecret\n```\n\nif no *-secret-id* argument is provided, the tool will expect json input via STDIN:\n\n```bash\necho '{\"username\":\"johndoe\",\"password\":\"swordfish\"}' | ./json2env             \n```\n\nThe tool will print something like this to the terminal:\n```bash\nexport username=johndoe\nexport password=swordfish\n```\n\nTo get this directly into environment variables you can wrap the call into `eval` and execute it into your current\nterminal:\n\n```bash\n$ eval $(echo '{\"username\":\"johndoe\",\"password\":\"swordfish\"}' | ./json2env -prefix 'SM_')\n$ env | grep \"SM_\"\nSM_username=johndoe\nSM_password=swordfish\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonauts%2Fjson2env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemonauts%2Fjson2env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonauts%2Fjson2env/lists"}