Loading...
Loading...
Use when setting up SOPS + age encryption for environment variables. Checks dependencies, creates config, copies scripts, and adds package.json commands. Triggers on: setup sops, setup env encryption, add age encryption, env:pull, env:push.
npx skill4agent add ralphcrisostomo/nuxt-development-skills nuxt-envenv:pullenv:pushenv:encryptenv:decryptwhich sops && which age-keygenbrew install sops agechalkdevDependenciesbun add -d chalktest -f ~/.config/sops/age/keys.txtmkdir -p ~/.config/sops/age
age-keygen -o ~/.config/sops/age/keys.txt.sops.yamlage-keygen -y ~/.config/sops/age/keys.txt.sops.yamlmkdir -p secrets .tmp.gitignore.tmp/secrets/secrets/.gitignore# Ignore decrypted plain JSON bundles
*.json
# But track encrypted sops files
!*.sops.json
!.gitignore
!.gitkeepsecrets/.gitkeep.sops.yaml.sops.yaml# Replace the placeholder recipients below with real age public keys (age1...)
# for your developer team and CI before encrypting secrets.
creation_rules:
- path_regex: ^(.+[\\/])?secrets[\\/].*\.sops\.json$
age: >-
AGE_PUBLIC_KEY_HEREAGE_PUBLIC_KEY_HEREscripts/scripts/| Source (skill) | Target (project) |
|---|---|
| |
| |
| |
scripts/libs/package.json{
"env:export": "bun scripts/env-variables.ts --export-json --out .tmp/env-bundle.json",
"env:apply": "bun scripts/env-variables.ts --import-json --in .tmp/env-bundle.json",
"env:apply:dry": "bun scripts/env-variables.ts --import-json --in .tmp/env-bundle.json --dry-run",
"env:decrypt": "bun scripts/sops-bundle.ts decrypt",
"env:encrypt": "bun scripts/sops-bundle.ts encrypt",
"env:pull": "bun run env:decrypt && bun run env:apply",
"env:push": "bun run env:export && bun run env:encrypt"
}which sops && which age-keygenls scripts/sops-bundle.ts scripts/env-variables.ts scripts/libs/load-env.tspackage.jsonenv:*.sops.yamlsecrets/.gitignore.tmp/.gitignore| Command | What it does |
|---|---|
| Export .env files to JSON bundle, then SOPS-encrypt |
| SOPS-decrypt the bundle, then write .env files |
| Encrypt |
| Decrypt |
| Export .env files to |
| Write |