Skip to content

icapps/op-env

Repository files navigation

op-env

op-env is a project that uses the 1password cli (op) to convert a secure note in a 1password vault to a local .env file with plain text secrets (for development purposes) and a .env.secrets file with references to 1password entries which you can use in ci.

Contents

Usage cli

op-env

Usage: op-env [options] [command]

Options:
  -h, --help      display help for command

Commands:
  get [options]
  set [options]
  help [command]  display help for command

get

Usage: op-env set [options]

Options:
  -v, --vault <vault>       Vault to create the item in
  -f, --env-file <envFile>  Path to the env file
  -t, --title <title>       Title of the item
  -h, --help                display help for command

set

Usage: op-env get [options]

Options:
  -n, --name <name>                Name of the item
  -e, --environment <environment>  Environment to create the item in this will result in .env.<environment> and .env.secrets.<environment>
  -h, --help

Usage npm

When trying to run the commands using npm run you will have to pass the params for example:

npm run op-env -- -n name -e dev

Development

# Run in development mode
npm run dev

Production

# Create a production build
npm run build

# Run the production build
npm run start

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

ISC

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •