Skip to main content

1p - 1Password CLI helper

1p is a wrapper around 1Password's op CLI tool to give a more user-friendly interface to secret retrieval.

Requires Python >= 3.7.

It opens a session with 1Password and stores the session token in the system's keyring, optionally, you can run with ONEP_SECRET_BACKEND=plain to store it under ~/.cache/1p.

It requires that the configured 1Password account has a shorthand defined (when using op account add).

Installation

$ # From PyPI
$ pip install onep

$ # Development build from GitHub
$ https://github.com/apognu/1p/releases/download/tip/onep-tip-py3-none-any.whl

Usage

$ 1p --help
usage: 1p [-h] [-j] ACCOUNT COMMAND ...

positional arguments:
  ACCOUNT     shorthand of the 1Password account
  COMMAND
    signin    authenticate into a 1Password account
    vaults    list available vaults
    vault     show information about a vault
    search    search entries matching provided term
    show      display an entry
    create    create an entry
    edit      edit an entry
    delete    delete an entry
    download  download a document
    upload    upload a document
    share     get a shareable link to an item

options:
  -h, --help  show this help message and exit
  -j, --json  format output as JSON

$ 1p personal search -t social
ID                            TITLE
__________________________    GitHub
__________________________    Twitter

Item creation syntax

Item creation syntax tries to determine the type of the provided values (URLs, email addresses and phone numbers), if possible. It also provides some utility to control the way values are entered and interpreted:

  • field= will set the type as password and prompt for the value interactively
  • field=- will set the type as password and generate a random value
  • @field=value will explicitely set the type as password
  • +field=totpsecret will consider the provided value as a TOTP secret key
  • section.field=value will create a field under a named section

Release files for onep 0.6.1

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

Source distribution (sdist)

Source distribution for onep 0.6.1
File Size Uploaded
onep-0.6.1.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for onep 0.6.1
File Interpreter ABI Platform
onep-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / onep-0.6.1.tar.gz

Download URL onep-0.6.1.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0e5245a925e2f7d5e49558e20c28d84b49d52599dd55e3c0096a22c811f3dc8a
BLAKE2b-256 checksum
How to use checksums
14b628ebf2a627d01aac0ba297386812f26799029c162fbcccbf1b699d141da7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1022-azure

Release files / onep-0.6.1-py3-none-any.whl

Download URL onep-0.6.1-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69bcab2cd322dae4ad7ac3452f53681e56f2e316cef4845d3b708e1912a8e365
BLAKE2b-256 checksum
How to use checksums
473eb5028cea2560039d7a670f560a45779d34324ef8b334deac9584d87e3a39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1022-azure

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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