yardnsm / tmux-1password Goto Github PK
View Code? Open in Web Editor NEW:key: Access your 1Password login items within tmux!
License: MIT License
:key: Access your 1Password login items within tmux!
License: MIT License
After login it tries to clear the terminal:
https://github.com/yardnsm/tmux-1password/blob/master/scripts/main.sh#L39
I am by no means an expert on the matter but after some digging around (this was useful) it looks like the 'cl' command is the termcap command which only a GNU tput program will accept.
I think it should use the longname (which GNU tput also accepts) to have the widest compatibility.
One limitation of the 1Password CLI is that it is DAMN SLOW, as it requires an internet connection to fetch data from your vaults. Also, it uses tokens that expire after 30 minutes.
There is another project called 1pass
, which is (according to the README) a caching wrapper for the 1Password CLI.
It would be nice to add support for this wrapper, as it would improve the experience of this plugin, while preserving the support for the official op
CLI.
We could have an adapter for each CLI, and the user can configure which adapter to use.
Hello, I've installed this awesome plugin and it didn't work straight away. Needed two tweaks.
At first it was loading only items from "Logins" category, which was not very useful because I keep server passwords used in CLI in "Servers" category. This was solved with
set -g @1password-enabled-url-filter 'off'
and
set -g @1password-items-jq-filter '.[] | [select(.overview.tags | map(select(. == "server")) | length == 1)?] | map([ .overview.title, .uuid ] | join(",")) | .[]'
Then it was fetching the items correctly, but it could not get any passwords, so I had to tweak the jq filter used to get the password value and change it to ".details.sections[].fields[]|select (.n == \"password\").v"
After those two changes it works.
I may not get around to it, but I love the look and idea of this plugin, and it doesn't look too difficult to port to use lastpass instead of onepass. May even be possible to create a generic version that just needs commands plugged in!
Would you be happy with this being done?
Hey, I didn't manage to launch it with my 1password config, it seems that it crashes with session error, but I am pretty sure that I have op cli
session running through CLI.
The question is how do I debug it to provide more info?
I have looked into the source and .op_tmux_token_tmp
was empty, but situation didn't change after I filled it with a session from op cli
manually.
Maybe with a new key binding .. uppercase 'U' ?
I'm trying to get this plugin to work. I've installed it with tpm
and have checked that I've already fzf
and jq
installed. Also, I have the op
cli tool installed and configured (I use it on my shell)
But, everytime I type prefix + u
I can't see any password (only an empty list). Also, every time I use the command I need to login again.
Can anyone help me?
I'm using op
version 0.4
, while the latest version is currently 0.5.5
. When trying to initiate the plugin and after entering the master password, I'm getting:
tmux-1password: 1Password CLI signin has failed
Running $ op signin my
to troubleshoot the issue have resulted in the following error:
$ op signin my
Enter the password for user *********** at my.1password.com:
[LOG] 2019/03/13 14:14:54 (ERROR) 445: Deprecated API. Update to the latest version.
And updating op
does solve the issue.
op signin my
and checking the output.op
.It seems that entries only display when they contain a single website. Any entries without a website or multiple websites doesn't show. I can temporarily working around it by splitting out entries but 1Password will gripe about reused passwords and I'd ideally like to converge entries that should share.
Does it support KeyChain
I have a 1password entry that breaks main.sh
's get_op_item_password()
. The JQ_FILTER
is setup to check if the item's details.password field exists otherwise find a field with the password designation.
I'm not sure how I this entry got into this state, but it has a details.password field (empty string). The actual password is in one of the fields objects.
op get item "<item uuid>" | jq .details --raw-output
:
{
"fields": [
{
"designation": "username",
"id": ";opid=__0",
"name": "username",
"type": "T",
"value": "[email protected]"
},
{
"designation": "password",
"id": ";opid=__1",
"name": "password",
"type": "P",
"value": "secretpassword"
},
[...]
],
"password": "",
"passwordHistory": [
{
"time": 999999,
"value": "oldsecretpassword"
}
],
[...]
}
How should this behave?
(And is this related to the passwordHistory
field? I spot checked a few random other entries that work and the others don't have a passwordHistory.)
just started using this, it looks great! it would be nice to be able to copy passwords to clipboard or have it be send-keys
on selection instead of globally!
The idea is to have a configuration variable, for example: @1password-debug
, that when set to 'on'
, the plugin will:
Hi there. I set up this plugin. Although signin 1password account, list items doesn't appear.
Hi!
I use 1Password to store SSH and GPG keys passwords too. I'm loving the tool, but it is currently only fetching login on websites.
There is any config I should activate to fetch passwords (those items where you store only the password, without any website and login associated to it) too?
I've noticed that the plugin only uses $FZF_DEFAULT_OPTS
environment variables if it is a string.
For example, if I use the following:
export FZF_DEFAULT_OPTS="\
--ansi \
--cycle \
--layout reverse \
--height 20 \
--preview '(highlight -O ansi -l {} 2> /dev/null || bat --style=numbers --color=always {} || cat {} || tree -C {}) 2> /dev/null | head -200' \
--preview-window right:70%:noborder \
--bind='?:toggle-preview' \
--bind='tab:down'"
It shows my items in a reverse list with FZF
. But, if I change to the following:
export FZF_DEFAULT_OPTS=(
--ansi
--cycle
--layout='reverse'
--height='20'
--preview="'(highlight -O ansi -l {} 2> /dev/null || bat --style=numbers --color=always {} || cat {} || tree -C {}) 2> /dev/null | head -200'"
--preview-window='right:70%:noborder'
--bind='?:toggle-preview'
--bind='tab:down'
)
It just stop working, showing a non-reverse list ignoring my other options.
Using ()
on $FZF_DEFAULT_OPTS
should work accordingly as if it were a string.
Tmux version: 3.2
1Password CLI version: 2.12.0
Operating system: macOS Catalina 10.15.7 running with iTerm2 or Terminal
Current behavior: On every use of the plugin (prefix + u), the modal dialog pops up 1password is trying to authorize CLI access
. You must click to proceed.
Expected behavior: Requesting a password within 10 minutes of the last activity shouldn't force you to reauthorize the CLI.
For me, after opening another window or pane in tmux, reauthorization is immediately required the first time op
is used in that tab, including with the plugin. In the same shell/window/pane or a subshell, it is not required for at least 10 minutes.
The developer's guide documents that opening a new terminal will always require reauthorization, but opening a subshell will not. It is not clear how this applies to tmux, or if there is some tmux configuration issue on my side. It's not really usable like this though, since the dialog box requires a click and does not refocus on the terminal afterward, so you have to command-tab to get back.
I suspect this is because it's using a different TTY, and therefore, this might not be working correctly for anybody?
op item list
op item list
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.