{"_id":"@clever.gy/gcloud-env-secrets","_rev":"3-a9ef1aaae012a8c008726855dd575ee3","name":"@clever.gy/gcloud-env-secrets","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@clever.gy/gcloud-env-secrets","version":"1.0.0","keywords":["gcloud","google-cloud","secret-manager","secrets","env","environment","cli","template","gcp","google-cloud-platform"],"author":{"url":"https://clever.gy","name":"Clevergy"},"license":"MIT","_id":"@clever.gy/gcloud-env-secrets@1.0.0","maintainers":[{"name":"juanclevergy","email":"juan.lopez@clever.gy"},{"name":"kalanda","email":"kalanda@gmail.com"}],"homepage":"https://github.com/clevergy/gcloud-env-secrets#readme","bugs":{"url":"https://github.com/clevergy/gcloud-env-secrets/issues"},"bin":{"gcloud-env-secrets":"dist/index.mjs"},"dist":{"shasum":"2aa84028942e26e7fdd865f3d43e15e294db2e86","tarball":"https://registry.npmjs.org/@clever.gy/gcloud-env-secrets/-/gcloud-env-secrets-1.0.0.tgz","fileCount":4,"integrity":"sha512-aBtXx8BV5x6VinouJjJm1f4A0sjZ2reCs5Wakbb2XSSadt41qfe8NYfioFdoS57Ci9tq9P/imuhIo3BaAAZosA==","signatures":[{"sig":"MEYCIQD89qb5wTyTdba30I11nSGM2crVJ0AoF922MnpefP9Y7AIhANZ4esiVi3j8R3LjhoLZUTefZrk7i/+1EcwkfeGs+sCd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11729},"main":"./dist/index.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"5269294a4ec1b288c88aa519454d1cdc04cfebb8","scripts":{"lint":"tsc","build":"npx tsup","start":"tsx src/index.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"kalanda","email":"kalanda@gmail.com"},"repository":{"url":"git+https://github.com/clevergy/gcloud-env-secrets.git","type":"git"},"_npmVersion":"10.9.4","description":"Utility to generate .env files from a template by retrieving and inserting secrets from Google Cloud Secret Manager","directories":{},"_nodeVersion":"22.22.0","dependencies":{"boxen":"8.0.1","chalk":"5.3.0","inquirer":"13.1.0","@google-cloud/secret-manager":"6.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"4.21.0","tsup":"8.4.0","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/gcloud-env-secrets_1.0.0_1777968390776_0.1604192978965462","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@clever.gy/gcloud-env-secrets","version":"1.0.1","keywords":["gcloud","google-cloud","secret-manager","secrets","env","environment","cli","template","gcp","google-cloud-platform"],"author":{"url":"https://clever.gy","name":"Clevergy"},"license":"MIT","_id":"@clever.gy/gcloud-env-secrets@1.0.1","maintainers":[{"name":"juanclevergy","email":"juan.lopez@clever.gy"},{"name":"kalanda","email":"kalanda@gmail.com"}],"homepage":"https://github.com/clevergy/gcloud-env-secrets#readme","bugs":{"url":"https://github.com/clevergy/gcloud-env-secrets/issues"},"bin":{"gcloud-env-secrets":"dist/index.mjs"},"dist":{"shasum":"b68d9a991def8a10f1215f92d61c5532ad85264e","tarball":"https://registry.npmjs.org/@clever.gy/gcloud-env-secrets/-/gcloud-env-secrets-1.0.1.tgz","fileCount":4,"integrity":"sha512-grUddpRaVWgVaupVdhWQSckStn3n5csKC3C3vXK01RI4zRQlnFiIWYwk5rtue9uspiRMIYwXT5VR6/o9Xjk9tw==","signatures":[{"sig":"MEUCIQDhd31q9Qb7DjsrrWpjT1rmNW/EiOkSaZp8AsW6p7vE4AIgTaxZH04+xbayw8MR17JGx6WdOcPCGh2ZraoZmiAKUA4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11733},"main":"./dist/index.mjs","type":"module","engines":{"node":">=18.0.0"},"gitHead":"b470b8c716ac90beaaf96780b9247d130dc44cb4","scripts":{"lint":"tsc","build":"npx tsup","start":"tsx src/index.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"kalanda","email":"kalanda@gmail.com"},"repository":{"url":"git+https://github.com/clevergy/gcloud-env-secrets.git","type":"git"},"_npmVersion":"10.9.4","description":"Utility to generate .env files from a template by retrieving and inserting secrets from Google Cloud Secret Manager","directories":{},"_nodeVersion":"22.22.0","dependencies":{"boxen":"8.0.1","chalk":"5.3.0","inquirer":"13.1.0","@google-cloud/secret-manager":"6.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"4.21.0","tsup":"8.4.0","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/gcloud-env-secrets_1.0.1_1777968583623_0.26673808550053413","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@clever.gy/gcloud-env-secrets","version":"1.1.0","description":"Utility to generate .env files from a template by retrieving and inserting secrets from Google Cloud Secret Manager","keywords":["gcloud","google-cloud","secret-manager","secrets","env","environment","cli","template","gcp","google-cloud-platform"],"author":{"name":"Clevergy","url":"https://clever.gy"},"license":"MIT","type":"module","main":"./dist/index.mjs","bin":{"gcloud-env-secrets":"dist/index.mjs"},"engines":{"node":">=18.0.0"},"repository":{"type":"git","url":"git+https://github.com/clevergy/gcloud-env-secrets.git"},"bugs":{"url":"https://github.com/clevergy/gcloud-env-secrets/issues"},"homepage":"https://github.com/clevergy/gcloud-env-secrets#readme","scripts":{"lint":"tsc","start":"tsx src/index.ts","build":"npx tsup","prepublishOnly":"npm run build"},"dependencies":{"@google-cloud/secret-manager":"6.2.0","boxen":"8.0.1","chalk":"5.3.0","inquirer":"13.1.0"},"devDependencies":{"tsup":"8.4.0","tsx":"4.21.0","typescript":"5.9.3"},"_id":"@clever.gy/gcloud-env-secrets@1.1.0","gitHead":"b470b8c716ac90beaaf96780b9247d130dc44cb4","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-P0XcImmmHBcp7VUvh0aSXJpTFjQo9RjY4wVqQLTHsrrXMeJQadr8xqoc7nRTqusmaf0grsB/aQ5MPAcSBBwdKQ==","shasum":"911342038dc192f1a406c4a886ffca62e909aebb","tarball":"https://registry.npmjs.org/@clever.gy/gcloud-env-secrets/-/gcloud-env-secrets-1.1.0.tgz","fileCount":4,"unpackedSize":11733,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC6J+hbPz4sbWhouSywpI4QpGYb1jmxhydSxUY3vlzV2AIgFjRjO6VGzjNz3fbXhWc9w1zV6RtHYYOJ6LfG8pmlzcI="}]},"_npmUser":{"name":"kalanda","email":"kalanda@gmail.com"},"directories":{},"maintainers":[{"name":"juanclevergy","email":"juan.lopez@clever.gy"},{"name":"kalanda","email":"kalanda@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gcloud-env-secrets_1.1.0_1782729767652_0.12255467310731327"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-05T08:06:30.603Z","modified":"2026-06-29T10:42:47.906Z","1.0.0":"2026-05-05T08:06:30.916Z","1.0.1":"2026-05-05T08:09:43.770Z","1.1.0":"2026-06-29T10:42:47.774Z"},"bugs":{"url":"https://github.com/clevergy/gcloud-env-secrets/issues"},"author":{"name":"Clevergy","url":"https://clever.gy"},"license":"MIT","homepage":"https://github.com/clevergy/gcloud-env-secrets#readme","keywords":["gcloud","google-cloud","secret-manager","secrets","env","environment","cli","template","gcp","google-cloud-platform"],"repository":{"type":"git","url":"git+https://github.com/clevergy/gcloud-env-secrets.git"},"description":"Utility to generate .env files from a template by retrieving and inserting secrets from Google Cloud Secret Manager","maintainers":[{"name":"juanclevergy","email":"juan.lopez@clever.gy"},{"name":"kalanda","email":"kalanda@gmail.com"}],"readme":"# @clever.gy/gcloud-env-secrets\n\nCLI tool to retrieve secrets from Google Cloud Secret Manager and generate `.env` files based on templates.\n\n## 📋 Description\n\n`@clever.gy/gcloud-env-secrets` is a command-line tool that generates environment files (`.env`) by replacing placeholders in a template with actual values retrieved from Google Cloud Secret Manager.\n\n## ✨ Features\n\n- 🔐 Retrieves secrets from Google Cloud Secret Manager\n- 📝 Generates `.env` files from templates with placeholders\n- ✅ Validates `gcloud` configuration before execution\n- 🛡️ Prompts for confirmation before overwriting existing files\n\n## 📦 Installation\n\n```bash\nnpm install -g @clever.gy/gcloud-env-secrets\n```\n\nOr install locally in a project:\n\n```bash\nnpm install --save-dev @clever.gy/gcloud-env-secrets\n```\n\n## 🔧 Prerequisites\n\n1. **Google Cloud SDK (gcloud)** installed and configured\n\n   - Installation guide: https://cloud.google.com/sdk/docs/install\n   - macOS (Homebrew): `brew install --cask google-cloud-sdk`\n\n2. **Authentication with Google Cloud**\n\n   ```bash\n   gcloud auth application-default login\n   ```\n\n3. **GCP project configured**\n\n   ```bash\n   gcloud config set project YOUR_GCP_PROJECT\n   ```\n\n4. **Required permissions**: Your account must have permissions to access Secret Manager in the specified project.\n\n## 🚀 Usage\n\n```bash\ngcloud-env-secrets <gcpProjectName> <envFileTemplatePath> <envFileOutputPath>\n```\n\n**Example:**\n\n```bash\ngcloud-env-secrets my-gcp-project .env.template .env\n```\n\n### Parameters\n\n- `gcpProjectName`: Google Cloud Platform project name\n- `envFileTemplatePath`: Path to the `.env` template file with placeholders\n- `envFileOutputPath`: Path where the final `.env` file will be generated\n\n## 📝 Template format\n\nCreate a template file with placeholders using the format `$$SECRET{secret-name}`:\n\n```env\nDATABASE_URL=$$SECRET{database-url}\nAPI_KEY=$$SECRET{api-key}\nJWT_SECRET=$$SECRET{jwt-secret}\n```\n\nThe tool will find all placeholders and replace them with actual values from Secret Manager.\n\n## 🛠️ Development\n\n```bash\nnpm run lint     # Lint the code\nnpm start        # Run in development mode\nnpm run build    # Build the project\n```\n\n## 🔐 Security\n\n- ⚠️ **Never** commit generated `.env` files to your repository\n- ✅ Use `.gitignore` to exclude `.env` files\n- ✅ Keep templates (`.env.template`) in the repository without sensitive values\n","readmeFilename":"README.md"}