{"id":34255712,"url":"https://github.com/capralifecycle/load-secrets","last_synced_at":"2026-05-30T01:03:09.388Z","repository":{"id":266295279,"uuid":"897976971","full_name":"capralifecycle/load-secrets","owner":"capralifecycle","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-25T23:28:10.000Z","size":2090,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-05-26T01:27:22.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/capralifecycle.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-03T15:14:36.000Z","updated_at":"2026-05-25T23:27:36.000Z","dependencies_parsed_at":"2024-12-03T15:36:25.223Z","dependency_job_id":"3c04f7ee-a04f-464e-894b-273236e59121","html_url":"https://github.com/capralifecycle/load-secrets","commit_stats":null,"previous_names":["capralifecycle/load-secrets"],"tags_count":212,"template":false,"template_full_name":null,"purl":"pkg:github/capralifecycle/load-secrets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fload-secrets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fload-secrets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fload-secrets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fload-secrets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capralifecycle","download_url":"https://codeload.github.com/capralifecycle/load-secrets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capralifecycle%2Fload-secrets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33676192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-12-16T13:03:56.899Z","updated_at":"2026-05-30T01:03:09.369Z","avatar_url":"https://github.com/capralifecycle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# load-secrets\n\nLibrary for loading secrets into AWS Secrets Mananager from a configuration file.\n\n## Installation\n\n```bash\n$ bun add @liflig/load-secrets\n```\n\n## Usage\n\n### 1. Create a script for loading secrets into AWS Secrets Manager\n\nCreate a script in your project for loading project secrets into AWS Secrets Manager.\n\nExample: `load-secrets-demo-service.ts`\n\n```ts\n// 1. Import the library\nimport { loadSecrets } from \"@capraconsulting/load-secrets\";\n\n// 2. Define the secrets\nconst demoServiceApiKey: loadSecrets.Secret = {\n    name: \"demo-service-api-key\",\n    description: \"API key for the demo service\",\n    type: \"string\"\n}\n\n// 3. Assign the secrets to SecretGroups (collections of associations between secrets and accounts)\nconst secretGroups: loadSecrets.SecretGroup[] = [\n  {\n    accountId: \"123412341234\",\n    region: \"eu-west-1\",\n    description: \"dev\",\n    namePrefix: \"/dev/demo-svc/\",\n    secrets: [demoServiceApiKey]\n  },\n  {\n    accountId: \"234523452345\",\n    region: \"eu-west-1\",\n    description: \"staging\",\n    namePrefix: \"/staging/demo-svc/\",\n    secrets: [demoServiceApiKey]\n  }\n];\n\n// 4. Load the secrets into AWS Secrets Manager\nloadSecrets.loadSecretsCli({ secretGroups })\n```\n\n### 2. Assume an AWS role with the required permissions\n\nExample: `aws-vault exec team-squirrel-demo-service`\n\nSay, for example, that this command assumes AWS Account 123412341234.\n\n### 3. Run the script\n\n```bash\n$ ./load-secrets-demo-service.ts\ninfo Checking account for current credentials\ninfo If any error is given, make sure you have valid credentials active\ninfo Running for account 123412341234\n\nSelect secret to write:\n\ndev (prefix: /dev/demo-svc/)\n  (0) demo-service-api-key (not yet created)\n\nEnter index (or enter to quit): 0\n\nSecret: /dev/demo-svc/demo-service-api-key \nThe secret does not already exist and will be created\n\nEnter value (Ctrl+C to abort): test\nStoring secret value:\n  test\n\nSecret stored:\nARN: arn:aws:secretsmanager:eu-west-1:123412341234:secret:/dev/demo-svc/demo-service-api-key-UIqJ8N\nVersion: bdbf33c1-eda8-4aa1-b744-7c2006eae338\n\nSelect secret to write:\n\ndev (prefix: /dev/demo-svc/)\n  0) test-secret-delete-me (last changed 2024-12-03T13:50:44.237Z)\n\nEnter index (or enter to quit):\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapralifecycle%2Fload-secrets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapralifecycle%2Fload-secrets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapralifecycle%2Fload-secrets/lists"}