opz-2025.12.0 is not a library.
opz
1Password CLI wrapper for seamless secret injection into commands.
Features
- Find items by keyword search
- Run commands with secrets from 1Password items as environment variables
- Item list caching for faster repeated runs
- Fuzzy matching when exact title match is not found
Installation
Usage
Find Items
Search for 1Password items by keyword:
Example:
# Output: vjzgubnmgber7mczrkhrq6lkei Employee z.ai
Run Commands with Secrets
Run a command with secrets from a 1Password item as environment variables:
Options:
--vault <NAME>- Vault name (optional, searches all vaults if omitted)--out <PATH>- Output env file path (default:.1password)--keep- Keep the generated env file
Examples:
# Run claude with secrets from "z.ai" item
# Keep the env file for debugging
# Specify vault and keep env file
How It Works
- Fetches item list from 1Password (cached for 60 seconds)
- Finds the matching item by title (exact or fuzzy match)
- Extracts fields and converts them to environment variables
- Creates a temporary
.envfile - Runs the command via
op run --env-file=... - Cleans up the env file (unless
--keepis specified)
Requirements
- 1Password CLI (
op) installed and authenticated