Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

nilium/1p

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

1p

1Password fuzzy-finder utility script.

Install

Download or clone the 1p script into your PATH.

In addition, the following software is required for 1p to function normally:

With the exception of op, all of this software can be installed using xbps-install:

# xbps-install jq fzf fex xclip

Optionally, you can use xsel instead of xclip (it's the last resort in the to_clipboard functon), but it's not recommended.

Usage

Prior to using 1p, you must sign in to at least one account using op signin.

Usage: 1p [-h|--help] [-1] [-b|-p|-c|-u|-o|-U|-j] [ACCOUNT] [QUERY...]

Searches a 1Password account (or all known accounts) for an item and
formats the item's username, password, and OTP (optional).

If -1 is passed, 1p will return as soon as it's found a match instead of
presenting an interactive fzf window. This must be the first argument.

In addition, you can pass a format specifier before the account name. By
default, the formatter is -H (clipboard).

FORMATS
-H      Print the username (and OTP, if possible) and copy the password
        to the clipboard using pbcopy.
-u      Username.
-p      Password.
-o      OTP.
-c      Username:password (colon-separated).
-b      Basic authentication. Used in HTTP authentication.
-U      1Password item UUID.
-j      1Password item JSON.