- ๐ซ You can find me on Mastodon
dcreemer / 1pass Goto Github PK
View Code? Open in Web Editor NEWA caching wrapper for the 1Password CLI
License: GNU General Public License v3.0
A caching wrapper for the 1Password CLI
License: GNU General Public License v3.0
Would be nice that instead of directly copying passwords with fzf
, there was a way to invoke 1pass
to display the details (overview) of the login/note/etc in the fzf preview pane.
Rationale
1pass
is list of fields available on the item and the associated password (or note content). The latter is dangerous to be displayed due to over-the-sholder eavesdropping, and the former is not very usable if we need to distinguish between users or URLs of the items.op
directly for that, but if 1pass
already provides a caching layer, I'd prefer to use it. Also, I like having a single interface authenticating me.Hi!
So I wanted iterm integration like sudolikeaboss did. This was quite easy, but ran into a few little issues(which I worked around).
1pass doesn't accept STDIN for the name of the item to fetch, which makes fzf
and friends integration more annoying.
it doesn't search default paths, like /usr/local/bin
or /usr/bin
This is how I worked around the issues:
create file /usr/local/bin/1piterm
#!/bin/sh
PATH=/usr/local/bin:/usr/bin
item=`/usr/local/bin/1pass | /usr/local/bin/choose`
/usr/local/bin/1pass -p $item
in iTerm2, go to preferences, then keys
, add a new key open-apple+/ to run coprocess
and run /usr/local/bin/1piterm
This uses the choose app instead of fzf
, but you can replace choose with fzf without harm.
This then lets you get passwords into commands from iTerm2 by pressing the openapple+/ key searching for the name in the GUI that pops up and hitting enter.
Anyways, thanks for the awesome 1pass! made doing this very easy!
I wanted to switch to 1pass
instead of op
in order to gain speed as the core CLI tool is incredibly slow. As 1pass
caches all the entries, I expected it to work instantly. But unfortunately, it doesn't.
A normal 1pass -p Google
query takes ~2 seconds.
What can be the cause of this? Maybe it's the gpg
keys decryption? Any ideas? ๐
The title for 1pass on GitHub has a typo. It says: "A caching wrapper for the 1Passworld CLI". I believe that it should say '1Password CLI".
I followed the instructions, created a _master.gpg
and _secret.gpg
files, but when I try:
> 1pass -rv
I got:
checking for op
checking for jq
checking for /usr/local/Cellar/gnupg/2.3.1_1/bin/gpg
checking for expect
signing in to my.1password.com <hiding email>
gpg: _master.gpg: skipped: No public key
gpg: [stdin]: encryption failed: No public key
And I have a gpg key created:
> gpg --list-public-keys
/Users/leonnardo.rabello/.gnupg/pubring.kbx
-------------------------------------------
pub rsa2048 2021-06-18 [SC]
D0040C15366FE9698F36D645032984594CD300AF
uid [ultimate] Leonnardo Rabello <hiding email>
sub rsa2048 2021-06-18 [E]
What am I missing?
thank you for making this. very useful.
I changed it to xclip -i
and it works for me.
$ xclip -version
xclip version 0.12
Copyright (C) 2001-2008 Kim Saunders et al.
Distributed under the terms of the GNU GPL
$ xclip -c
xclip: -c: No such file or directory
I have TFA enabled for my 1password account. Unfortunately, 1pass
can't handle this and instead of letting me input the token, the TFA prompt instantly returns and fails.
signing in to xxx.1password.com [email protected]
Enter your six-digit authentication code: [LOG] 2019/03/17 12:53:25 (ERROR) Incorrect One-Time Password length. Expected 6.
1pass failed to signin to xxx.1password.com
It'd be great if TFA support could be added.
1password-cli v2 is not compatible with v1, and both will be supported for a while. I have upgraded 1pass
to warn about v2.0, but we still need to add code to support v2.
results should be easy to copy to the clipboard
Hey,
is it be possible to use 1pass without the option to locally cache any entries and without storing the 1pasword account master password?
I am no security expert but I don't feel very confident in storing my master password in a local file.
I have more than one vault where passwords in different vaults may have the same name. It'd be nice to have the option to show the vault after or before the item name like
Vault : Item
Item : Vault
Or something of the sort
Hi,
It should be xclip -selection clipboard selection instead of xclip -i.
With xclip -i nothing gets copied to the clipboard if you are using Linux.
By the way, great wrapper!
Nicolas
in fact it's almost non-existent.
Atm the 1pass
command fails to start due to xclip
missing, even if comparable wl-copy
command is more commonly used on Wayland (wl-roots) based systems that aren't running X11.
I will provide a PR to address this.
Currently 1pass only manages credentials for a single account. Add support for multiple accounts, preferably not forcing the user to remember which one to use.
Hey there. I'm a developer evangelist at 1Password. We've noticed your project and would love to include it on our Developer Portal on the Dev Community spotlight.
Would you be up for submitting a PR?
First, thanks for contributing this amazing tool!
And now the bug ๐
I have a secure note in 1pass and when querying the fields for the item I get the following error:
line 511: get_fields_003: command not found
Looking at the source code, I can see that the function does not exist.
Perhaps only login items are supported?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.