Loading...
Loading...
Compare original and translation side by side
env:pullenv:pushenv:encryptenv:decryptenv:pullenv:pushenv:encryptenv:decryptwhich sops && which age-keygenbrew install sops agewhich sops && which age-keygenbrew install sops agechalkdevDependenciesbun add -d chalkdevDependencieschalkbun 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.yamltest -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 .tmpmkdir -p secrets .tmp.gitignore.tmp/secrets/secrets/.gitignoreundefined.gitignore.tmp/secrets/secrets/.gitignoreundefined
Create `secrets/.gitkeep` if the directory is empty.
如果目录为空,创建`secrets/.gitkeep`。.sops.yaml.sops.yaml.sops.yamlundefined.sops.yamlundefined
Prompt the user to replace `AGE_PUBLIC_KEY_HERE` with the public key displayed in pre-flight step 3. If the public key was just generated, offer to substitute it automatically.
提示用户将`AGE_PUBLIC_KEY_HERE`替换为前置检查第3步中展示的公钥。如果公钥是刚生成的,可提供自动替换功能。scripts/scripts/| Source (skill) | Target (project) |
|---|---|
| |
| |
| |
scripts/libs/scripts/scripts/| 来源(skill) | 目标(项目) |
|---|---|
| |
| |
| |
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"
}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/.gitignorewhich 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 |
| 命令 | 功能 |
|---|---|
| 导出.env文件为JSON包,然后通过SOPS加密 |
| SOPS解密包,然后写入.env文件 |
| 加密 |
| 解密 |
| 导出.env文件到 |
| 将 |