Originally posted at https://blog.hadenes.io/post/1password.el/
In this blog post, we will discuss an Emacs package called 1password.el
that allows users to integrate 1Password directly with Emacs and Auth-Source for a seamless and efficient password management experience.
Core Functions
The 1password.el
package focuses on integrating the latest 1Password CLI version to work seamlessly with Emacs. The primary functions provided in the README of this package are as follows:
M-x 1password-get-password NAME
: This interactive function retrieves the password of an item with the givenNAME
(e.g., “github”) from your 1Password vault.M-x 1password-get-field NAME FIELD
: In addition to passwords, this function allows you to fetch any field with a given label,FIELD
, for the specified item,NAME
. For example, you can retrieve theapi_key
associated with your “github” account.M-x 1password-auth-source-enable
: This function enables the Auth-Source backend integration with 1Password. By activating this feature, Emacs will utilize 1Password when fetching passwords for other Emacs features that rely on Auth-Source.
Requirements
To get started with using the 1password.el
module, you need:
- Emacs 25.1 or later
-
op
command line tool, which can be found at 1Password command line tool
Installation
For emacs-doom:
;; in packages.el
(package! 1password
:recipe (:host github :repo "kamushadenes/1password.el" :files ("*.el")))
;; in config.el
(use-package! 1password
:demand t
:init
(message "Enabling 1password ...")
:config
(1password-auth-source-enable))
Top comments (0)