{"id":19385762,"url":"https://github.com/truefoundry/secretsfoundry","last_synced_at":"2025-04-23T22:32:04.998Z","repository":{"id":42658179,"uuid":"412104760","full_name":"truefoundry/secretsfoundry","owner":"truefoundry","description":"SecretsFoundry is a package to automatically fetch your environment variables from different sources and secret managers. It makes configuration across environments seamless.","archived":false,"fork":false,"pushed_at":"2024-06-18T05:35:00.000Z","size":1064,"stargazers_count":13,"open_issues_count":5,"forks_count":2,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-12T05:45:46.841Z","etag":null,"topics":["aws","hacktoberfest","parameter-store","secrets-management","typescript","vault"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/truefoundry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-09-30T14:47:54.000Z","updated_at":"2024-07-26T17:45:11.000Z","dependencies_parsed_at":"2024-06-12T15:54:24.547Z","dependency_job_id":null,"html_url":"https://github.com/truefoundry/secretsfoundry","commit_stats":{"total_commits":222,"total_committers":18,"mean_commits":"12.333333333333334","dds":0.7387387387387387,"last_synced_commit":"2e95f904b7607af8800b99d339c2745294b4c9d4"},"previous_names":["innoavator/secretsfoundry"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truefoundry%2Fsecretsfoundry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truefoundry%2Fsecretsfoundry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truefoundry%2Fsecretsfoundry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/truefoundry%2Fsecretsfoundry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/truefoundry","download_url":"https://codeload.github.com/truefoundry/secretsfoundry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250527148,"owners_count":21445313,"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","hacktoberfest","parameter-store","secrets-management","typescript","vault"],"created_at":"2024-11-10T10:02:58.014Z","updated_at":"2025-04-23T22:32:04.605Z","avatar_url":"https://github.com/truefoundry.png","language":"TypeScript","readme":"# Secretsfoundry\n\n[![npm](https://img.shields.io/npm/v/secretsfoundry?style=flat-square)](https://www.npmjs.com/package/secretsfoundry)\n[![GitHub](https://img.shields.io/github/license/innoavator/secretsfoundry?style=flat-square)](https://github.com/innoavator/secretsfoundry/blob/main/LICENSE.txt) [![Docs](https://img.shields.io/badge/docs-up%20to%20date-blue)](https://abhichoudhary06.gitbook.io/secretsfoundry/) ![Build status](https://img.shields.io/github/workflow/status/innoavator/secretsfoundry/Release?event=push\u0026label=Release?style=flat-square)\n\nSecretsFoundry is a package to automatically fetch your environment variables\nfrom different sources and secret managers. You can write the path to secret key in .env and\nSecretsFoundry will automatically fetch it for you. It parses the `.env` or `.env.*` files\nto automatically extract the values and provide them as environment variables to your\napplication.\n\nYou can refer to our [docs](https://abhichoudhary06.gitbook.io/secretsfoundry/) for more information.\n\n## Prerequisites\n\n`npm install npm@latest -g`\n\n## Getting Started\n\n- `npm install secretsfoundry --save`\n\n- Create a `.env` file in your repository\n\n```js\nSIMPLE = \"simple\"\n\n// Use the environment variables described earlier\nVARIABLE = ${SIMPLE}\n```\n\n\u003e secretsfoundry run\n\nThe output should be:\n\n```\nSIMPLE = \"simple\"\nVARIABLE = \"simple\"\n```\n\nNow lets add a parameter to AWS Parameter Store using:\n\n\u003e aws ssm put-parameter --name /staging/example/server/GOOGLE_API_KEY --value google_api_key --type \"String\"\n\nAdd the variable to .env:\n\n```js\nSIMPLE = \"simple\"\n\n// Use the environment variables described earlier\nVARIABLE = ${SIMPLE}\n\n// Use variable defined in aws parameter store\nGOOGLE_API_KEY = ${aws-ssm:/staging/example/server/GOOGLE_API_KEY}\n\n```\n\n\u003e secretsfoundry run\n\nThe output should be:\n\n```\nSIMPLE = \"simple\"\nVARIABLE = \"simple\"\nGOOGLE_API_KEY = google_api_key\n```\n\nYou can similarily store your variables in AWS S3, AWS Secrets Manager and Hashicorp Vault.\nTo use them as environment variables, you can simple use:\n\n```js\n\nSIMPLE = \"simple\"\n\n// Use the environment variables described earlier\nVARIABLE = ${SIMPLE}\n\n// Use variable defined in aws secrets manager\nAWS_SECRETS_SECRET = ${aws-secrets:/path/to/secret}\n\n// Use value from S3\nAWS_S3_VALUE = ${aws-s3:bucket/key}\n\n// Use value from Hashicorp vault\nVAULT_VALUE = ${vault:/path/to/secret}\n\n```\n\n- If you were earlier running your application using `node app.js`, use:\n\n`secretsfoundry run --script \"node app.js\"`\n\n`app.js` can now access all the variables using process.env\n\n### File Formats\n\n- You can read variables from a specific file (.env/JSON/YAML) using the `input` flag. If `--script` or `--command` is not provided, the result is printed to the `stdout` in the same format as the input.\n\n`secretsfoundry run --input unresolved.json`\n\n- If you need the output to be a different format than the input file, you can specify the format using `--output`\n\n`secretsfoundry run --input unresolved.json --output yaml`\n\nCurrently, `json`, `yaml` and `env` formats are supported\n  \n### Sources\n\nSecretsFoundry currently provides support for the following sources:\n\n1. AWS Parameter Store\n2. AWS Secrets Manager\n3. Hashicorp Vault\n4. AWS S3\n\nWe will soon be extending support for GCP Secrets Engine and Azure Key Vault. If you need support\nfor other sources, reach out to us for support or send a PR.\n\n## Format in env files\n\n```js\nSIMPLE = \"simple\"\n\n// Use the environment variables described earlier\nVARIABLE = ${SIMPLE}\n\n// Use variable defined in aws parameter store\n// Args: region, decrypt\n// To use with args, ${aws-ssm(region=us-east-1):/path/to/variable}\nAWS_SSM_VARIABLE = ${aws-ssm:/path/to/variable}\n\n// Use variable defined in aws secrets manager\n// Args: region\n// To use with args, ${aws-secrets(region=us-east-1):/path/to/variable}\nAWS_SECRETS_SECRET = ${aws-secrets:/path/to/secret}\n\n// Use value from S3\n// args: region\n// To use with args, ${aws-s3(region=us-east-1):bucket/key}\nAWS_S3_VALUE = ${aws-s3:bucket/key}\n\n// Use value from Hashicorp vault\nVAULT_VALUE = ${vault:/path/to/secret}\n```\n\n## Advanced Usage:\n\nRefer to our [docs](https://github.com/innoavator/secretsfoundry) to see how to customise loaders with arguments and integrate with docker.\n\n# Contributing\n\nWe love our contributors! Please read our [Contributing Document](CONTRIBUTING.md) to learn how you can start working on the Framework yourself.\n\n# License\n\nDistributed under the [MIT License](./LICENSE.txt). See LICENSE.txt for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruefoundry%2Fsecretsfoundry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftruefoundry%2Fsecretsfoundry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruefoundry%2Fsecretsfoundry/lists"}