k1pwit lets you to directly input passwords using 1Password on iTerm2, not via clipboard, just as though you do on Web browsers. What k1pwit does is merely typing passwords for you; it just works with any shells, and notably with remote sessions over SSH.
Before using k1pwit, you need to set up the following:
If you use Homebrew, this is as easy as:
brew install iterm2 1password-cli jq fzf
git clone
(or download ZIP) this repository to wherever you want e.g.~/k1pwit
.- Launch iTerm2, open Preferences (⌘ Comma), and navigate to Profiles > Keys > Key Mappings.
- Click
+
button at the bottom, and add a keyboard shortcut:- Keyboard Shortcut: (Whatever you like)
- Action: Run Coprocess
- Command: Full path to
launch
file in the k1pwit directory e.g.~/k1pwit/launch
- Save it, close Preferences and go back to shell.
- Set up a config file by running
echo "PATH=$PATH" > ~/.k1pwitrc
. - If you haven't, initialize 1Password CLI configs by running
op account add
.
That's it! Now try the keyboard shortcut you've just set up. If everything is configured properly, a small pop-up window should appear.
You can put config files in any of the following locations:
${k1pwit directory}/.k1pwitrc
~/.k1pwitrc
~/.config/k1pwit/k1pwitrc
For the available configuration options, you can find hints in lib/load-config.
- https://github.com/yardnsm/tmux-1password
- https://github.com/ravenac95/sudolikeaboss
- https://github.com/geoffeg/opiterm which heavily inspired me on k1pwit's interface design
k1pwit is licensed under The MIT License.
© 2022 Yusuke Kido.