- =agenix.el=
[[https://melpa.org/#/agenix][file:https://melpa.org/packages/agenix-badge.svg]] [[https://stable.melpa.org/#/agenix][file:https://stable.melpa.org/packages/agenix-badge.svg]]
=agenix.el= enables editing =agenix= secrets without leaving emacs.
** Usage
=agenix.el= enables fully transparent =agenix= secrets editing. Open your =agenix= secret as any other file, make changes and save, it'll be automatically encrypted back and saved.
** Prerequisites
You need to have =age= binary in =PATH=, or set =agenix-age-program= variable to path to the executable. If you wish to use =direnv= to set that for you, see [[*Direnv Integration][integration section]]
** Installation
Package is available on [[https://melpa.org/#/agenix][Melpa]], so you can install it as usual.
+begin_src emacs-lisp
;; Option 1: plain (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-install 'agenix)
;; Option 2: use-package (use-package agenix :ensure t)
+end_src
*** Direnv Integration
If you wish to use =direnv= using =envrc= package to setup =age= binary path for you, you need to add it to =agenix-pre-mode-hook=. Note that setting =envrc-global-mode= is not enough because minor modes are run after major mode.
+begin_src emacs-lisp
;; With use-package (use-package envrc :ensure t :hook (agenix-pre-mode . envrc-mode))
;; Without use-package (add-hook 'agenix-pre-mode-hook #'envrc-mode)
+end_src
** License
Copyright (C) 2022 Tomasz Maciosowski (t4ccer)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.