Skip to main content

op-hello

Read a 1Password secret so the desktop app can raise Windows Hello. Store op://Vault/Item/field in the environment. Resolve it when the program starts.

export API_TOKEN=op://Private/Service/credential
op-hello resolve "$API_TOKEN"

Install the published package, or use this checkout for local development:

uv add op-hello
uv add --editable ../op-hello

Install the optional SDK extra to use service-account authentication:

uv add "op-hello[sdk]"

The public Python API is suitable for application adapters and plugins. It tries OP_SERVICE_ACCOUNT_TOKEN with the optional 1Password SDK, then the platform CLI/helper: native Windows uses PowerShell and op.exe, WSL delegates to Windows PowerShell and the desktop integration, and macOS/Linux use native op read. A process-local cache avoids repeating reads; Windows also keeps a DPAPI-protected cache for the configured TTL. clear_cache() clears the current process cache; the Windows cache expires according to OP_HELLO_CACHE_TTL. OP_HELLO_ACCOUNT or the existing OP_ACCOUNT selects an account.

Python projects that already use this checkout:

import os

from op_hello import clear_cache, read, resolve

token = resolve(os.environ["API_TOKEN"])

Two fields:

op-hello read op://Private/Service/client-id op://Private/Service/password

Stdout is one secret per line and nothing else.

Why this exists

1Password's secret-reference docs stop at op read. These are the parts that take the time:

  1. Turn on Settings → Developer → Integrate with 1Password CLI in the desktop app.
  2. From WSL, call Windows op.exe (C:\Program Files\1Password CLI\op.exe). A Linux op session does not raise Windows Hello.
  3. Start that process with its working directory on C:\Windows. cmd.exe exits when the working directory is a WSL UNC path.
  4. If AutoHotkey is running, suspend it for the read. Its keyboard hook hides the Hello prompt. windows/ahk-pause.ps1 does that, and it is skipped when AutoHotkey is not installed.
  5. Use op read. op item get returns an OTP seed instead of the current code.
  6. Cache the value for 15 minutes with DPAPI, for the current Windows user, in %LOCALAPPDATA%\op-hello\. The first read of a field can still prompt. A repeat within 15 minutes does not. Set OP_HELLO_CACHE_TTL to the number of minutes.
  7. A router or DNS failure looks like RequestDelegatedSession. That is the network. The error text says so, and it does not include the secret or the op:// reference.

Layout

Piece Role
bin/op-hello The program other languages call
windows/op-read.ps1 Windows Hello, DPAPI cache, optional AutoHotkey pause
src/op_hello/ resolve() and read() for Python

PowerShell is the Windows implementation because Hello, DPAPI, and AutoHotkey are Windows APIs. A Go or Rust binary would still shell out to op.exe and reimplement those calls. On macOS and Linux, op-hello calls op read and the system biometric prompt is the 1Password app's own. The installed CLI and Python library share this same platform helper.

Use it from another language

Put bin on PATH and run op-hello read. Exit 0 and one line per secret means success. Anything else is on stderr.

The installed op-hello command and Python library both use the same platform helper. OP_HELLO_BIN overrides the helper path for deployments that provide their own adapter.

Limits

One command accepts up to eight references. The desktop app has to be unlocked, and someone has to be present for the first prompt. The call fails after OP_HELLO_TIMEOUT seconds (default 120) if nobody approves it.

CLI aliases and releases

op-hello is the descriptive command for reading secrets. oph is its short alias and also provides project version and release commands:

oph version
oph version release patch

The release command uses Verkit to bump the project version, commit the bump, create the matching tag, and push the branch and tag. Use --no-push to create the release commit and tag locally for review. PyPI publishing runs through the repository's GitHub Actions trusted publishing workflow after the tag is pushed.

Metadata

Release files for op-hello 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for op-hello 0.2.4
File Size Uploaded Provenance Actions
op_hello-0.2.4.tar.gz 16.1 kB With provenance Details for op_hello-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for op-hello 0.2.4
File Interpreter ABI Platform Actions
op_hello-0.2.4-py3-none-any.whl Python 3 none any Details for op_hello-0.2.4-py3-none-any.whl

Total release size: 28.4 kB

Release files / op_hello-0.2.4.tar.gz

Download URL op_hello-0.2.4.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
04573fbee4b91a99a98a7ea213822d7491d843fea52040b3807808f05e00e353
BLAKE2b-256 checksum
How to use checksums
3438a386f3db5c73be389437a58642b9a7340148a63c4ace380581267d0b8788
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / op_hello-0.2.4-py3-none-any.whl

Download URL op_hello-0.2.4-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
486b26f281b42c0f58c3833d19f58b83aae0565fa04fa682c183d73c14245225
BLAKE2b-256 checksum
How to use checksums
014ff9d0d594eb2e4bb67b75acf2a8ae46129eddba45290a8c2b5c4d8338c366
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for op-hello 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for op_hello-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page