pmv

command module
v1.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 1 Imported by: 0

README

PMV

PMV is a tiny utility for working with the 1password CLI.

Commands

env

Generates a set of environment export variables from a 1password tag.

  1. Login to 1password, eg eval $(op signin gitlab)
  2. Create an item in 1password and configure it with a unique tag. Note that slashes (/) in tags will be shown hierarchically in the 1password UI, which can be useful for categorization.
  3. Each field with a env: prefix will be emitted as an export. For example env:GITLAB_TOKEN=xyz will generate export GITLAB_TOKEN=xyz.
  4. Use eval $(pmv env Tag) to export the environment variables into the current shell.

Usage:

$ # Before using pmv, log using 1password client
$ eval $(op signin gitlab)
$ # Sample usage of `pmv env`
$ pmv env ProductName/Env:Test
export SECRET=abc
export OTHER_SECRET=xyz
$ # More useful usage, exports variables to shell
$ eval $(pmv env ProductName/Env:Test)
$ # Secrets are now loaded into the environment
json

Generates a secrets blob in JSON

  1. Login to 1password, eg eval $(op signin gitlab)
  2. Create an item in 1password and configure it with a unique tag. Note that slashes (/) in tags will be shown hierarchically in the 1password UI, which can be useful for categorization.
  3. Each field with a json: prefix will be emitted as an export. For example json:secret=xyz will generate {"secret": "xyz"}.
  4. Use pmv env Tag > secrets.json to write the secrets to a file.

Usage:

# Before using pmv, log using 1password client
eval $(op signin gitlab)
# Sample usage of `pmv json`
pmv json ProductName/Env:Test > secrets.json

Documentation

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL