A wrapper for minisign that loads the secret key from 1Password.
Files
README.md

minisign-op #

A wrapper for minisign that loads the secret key from 1Password.

Requirements #

Installation #

  1. Place minisign-op somewhere in your $PATH
  2. Store your Minisign secret key in 1Password:
    • Create an item named minisign.key in your Personal vault
    • Attach your secret key file (e.g., ~/.minisign/minisign.key) to the item with the filename minisign.key
    • To use a different vault, item, or filename, set $MINISIGN_OP_KEY_REF to your secret reference (e.g., op://Work/my-key/key.sec)

Replacing minisign transparently #

To use minisign-op as a drop-in replacement for minisign:

  1. Rename or symlink the original minisign binary to minisign-orig
  2. Rename or symlink minisign-op to minisign and place it in a directory that comes before the original minisign in your $PATH

When invoked as minisign, the script delegates to minisign-orig.

Usage #

minisign-op [<minisign-option>...]
minisign-op exec <cmd> [<arg>...]

The first form delegates to minisign. If the arguments contain -R or -S flags, the secret key is passed via -s; otherwise, minisign is called without the key.

The second form executes <cmd> with $MINISIGN_OP_KEY_DATA set to the secret key data.

Environment variables #

Variable Description
MINISIGN_OP_KEY_REF 1Password reference to the secret key (default: op://Personal/minisign.key/minisign.key)
MINISIGN_OP_KEY_DATA Set by this script when using minisign-op exec