Skip to content

kurechon/op-env-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@kurechon/op-env-sync

CLI tool to sync .env files with 1Password

Installation

pnpm add -g @kurechon/op-env-sync

Usage

Push .env file to 1Password

op-env-sync push

Pull .env file from 1Password

op-env-sync pull

Options

# Specify vault (default: "Private")
op-env-sync push --vault MyVault

# Specify item suffix
op-env-sync push --suffix ".local"

# Generate .env.example.generated file with keys only
op-env-sync push --example
op-env-sync pull --example

Prerequisites

  • 1Password CLI installed
  • Signed in to 1Password CLI
    eval $(op signin)

Item Format in 1Password

The .env file will be stored in 1Password with the following format:

  • Item Type: Secure Note
  • Item Name: [current-directory-name].local .env
    • With suffix option: [current-directory-name] .env<suffix>
  • Field Name: env

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors