1password.el: Integrating 1Password with Emacs and auth-source

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:

  1. M-x 1password-get-password NAME: This interactive function retrieves the password of an item with the given NAME (e.g., “github”) from your 1Password vault.

  2. 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 the api_key associated with your “github” account.

  3. 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.


To get started with using the 1password.el module, you need:

  1. Emacs 25.1 or later
  2. op command line tool, which can be found at 1Password command line tool


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
  (message "Enabling 1password ...")
comments powered by Disqus