@zauberware/1pw-env-sync

1.0.1 • Public • Published

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 devDependencies
npm 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

Dependencies (6)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @zauberware/1pw-env-sync

    Weekly Downloads

    2

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    19.7 kB

    Total Files

    13

    Last publish

    Collaborators

    • marcus.franzen
    • zauberware_owner
    • philippsiegmund
    • simonfranzen
    • chrkahl
    • floriancrusius