{"id":20496332,"url":"https://github.com/theuves/psenv","last_synced_at":"2025-03-05T18:28:13.590Z","repository":{"id":65477253,"uuid":"331150251","full_name":"theuves/psenv","owner":"theuves","description":"A command-line tool to get parameters from AWS Systems Manager Parameter Store as environment variables.","archived":false,"fork":false,"pushed_at":"2021-02-15T16:05:30.000Z","size":35,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-01T18:59:04.550Z","etag":null,"topics":["aws","aws-cli","aws-ecs","aws-ssm","aws-ssm-parameter-store","ci-cd","cli","cloud-computing","devops","ecs","environment-variables","parameter-store","secrets","task-definition"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/theuves.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":"2021-01-20T00:46:20.000Z","updated_at":"2024-02-29T02:52:08.000Z","dependencies_parsed_at":"2023-01-25T06:35:17.838Z","dependency_job_id":null,"html_url":"https://github.com/theuves/psenv","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theuves%2Fpsenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theuves%2Fpsenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theuves%2Fpsenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theuves%2Fpsenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theuves","download_url":"https://codeload.github.com/theuves/psenv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242078558,"owners_count":20068567,"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":["aws","aws-cli","aws-ecs","aws-ssm","aws-ssm-parameter-store","ci-cd","cli","cloud-computing","devops","ecs","environment-variables","parameter-store","secrets","task-definition"],"created_at":"2024-11-15T18:06:36.740Z","updated_at":"2025-03-05T18:28:13.565Z","avatar_url":"https://github.com/theuves.png","language":"JavaScript","readme":"# `psenv`\n\n\u003e AWS SSM Parameter Store to environment variables.\n\n![NPM downloads per month](https://img.shields.io/npm/dm/psenv-cli)\n![NPM version](https://img.shields.io/npm/v/psenv-cli)\n![License](https://img.shields.io/npm/l/psenv-cli)\n\nA command-line tool to get parameters from [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) as environment variables. Useful to pass environment variables to containers in [ECS](https://aws.amazon.com/pt/ecs/?whats-new-cards.sort-by=item.additionalFields.postDateTime\u0026whats-new-cards.sort-order=desc\u0026ecs-blogs.sort-by=item.additionalFields.createdDate\u0026ecs-blogs.sort-order=desc) when you haven't an implementation in the code or when you don't want to pass the parameters to [task definition via `Secret`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-secret.html) (with `valueFrom`).\n\n## Installation\n\n- [NPM](https://www.npmjs.com/) \u0026mdash; `npm install --global psenv-cli`\n- [Yarn](https://yarnpkg.com/) \u0026mdash; `yarn global add psenv-cli`\n\n## Usage\n\nType `psenv --help`.\n\n```\nUsage: psenv \u003cPATH\u003e [OPTION]...\n\nOptions:\n    --output=FILENAME   Write to a file (e.g. --output=.env)\n    --to-upper-case     Convert the name to upper case (e.g. name to NAME)\n    --recursive         Retrieve all parameters within a hierarchy\n    --is-dotenv         Output with the format NAME=value\n    --is-cmd            Output for Windows Command Prompt (cmd.exe)\n    -h, --help          Print this message\n    -v, --version       Print the current version of psenv\n```\n\n## Example\n\nSuppose you have the following parameters in the Parameter Store:\n\n| Name             | Value         |\n|:-----------------|:--------------|\n| `/dev/NODE_ENV`  | `development` |\n| `/dev/name`      | `foo`         |\n| `/prod/NODE_ENV` | `production`  |\n| `/prod/name`     | `bar`         |\n\n```bash\n$ psenv /dev\nexport NODE_ENV='development'\nexport name='foo'\n```\n\n### `--output=FILENAME`\n\n\u003e Write to a file (e.g. `--output=.env`).\n\n```bash\n$ psenv /dev --output=.env.development\nFile is created successfully.\n\n$ cat .env.development\nNODE_ENV='development'\nname='foo'\n```\n\n### `--to-upper-case`\n\n\u003e Convert the name to upper case (e.g. `name` to `NAME`).\n\n```bash\n$ psenv /dev --to-upper-case\nexport NODE_ENV='development'\nexport NAME='foo'\n```\n\n### `--recursive`\n\n\u003e Retrieve all parameters within a hierarchy.\n\n```bash\n$ psenv / --recursive\nexport NODE_ENV='development'\nexport name='foo'\nexport NODE_ENV='production'\nexport name='bar'\n```\n\n### `--is-dotenv`\n\n\u003e Output with the format `NAME=value`.\n\n```bash\n$ psenv /dev --is-dotenv\nNODE_ENV='development'\nname='foo'\n```\n\n### `--is-cmd`\n\n\u003e Output for Windows Command Prompt (cmd.exe).\n\n```bash\n$ psenv /dev --is-cmd\nset \"NODE_ENV=development\"\nset \"name=foo\"\n```\n\n## License\n\nCopyright \u0026copy; 2021 by [Matheus Alves](https://theuves.me/).\n\nLicensed under MIT license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheuves%2Fpsenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheuves%2Fpsenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheuves%2Fpsenv/lists"}