1.0.1 • Published 2 years ago
@zauberware/1pw-env-sync v1.0.1
1pw-env-sync
Simple tool to get get your teams local .env
files for development in sync
Table of Contents
Getting Started
Requirements
node: >=12.0.0
1password client: >=8.0.0
1password cli: >=2.0.0
Install
add package to your devDependenciesnpm install -D @zauberware/1pw-env-sync
Setup
Automatic setup
Run setup script which setups necessary scripts at package.json and adds the config file
npx @zauberware/1pw-env-sync init
Manual setup
Add .op.json
with
{
"vault":"example-vault-name",
"document":"example-document-name"
}
Add following lines to your scripts in package.json
file
"push-env": "npm explore @zauberware/1pw-env-sync -- npm run push --env=$PWD",
"pull-env": "npm explore @zauberware/1pw-env-sync -- npm run pull --env=$PWD",
Scripts
Implemented | Script | description |
---|---|---|
X | push-env | diffs local .env and pushes if you want |
X | pull-env | diffs example-document-name and pulls if you want |
[] | create-env | creates example-document-name document in example-vault-name |
[] | force-push-env | !!Warning force pushes your local .env |