63 lines
2.2 KiB
Org Mode
63 lines
2.2 KiB
Org Mode
|
#+title: password-gen
|
|||
|
#+author: Lucien Cartier-Tilet
|
|||
|
#+email: lucien@phundrak.com
|
|||
|
* Introduction
|
|||
|
=password-gen= is a utility package for generating passwords from within
|
|||
|
Emacs. These passwords can be either copied or directly inserted in an
|
|||
|
Emacs buffer.
|
|||
|
|
|||
|
* Motivation
|
|||
|
I often manipulate files that deal with passwords, such as dotenv
|
|||
|
files for services I either deploy to my servers or work on myself. I
|
|||
|
got really tired of always opening a terminal, remembering which
|
|||
|
command to use, copy manually its output only to insert it back in my
|
|||
|
initial Emacs buffer. So, why not directly generate it from Emacs and
|
|||
|
have it available as is?
|
|||
|
|
|||
|
* Installation
|
|||
|
** Local Installation
|
|||
|
The vanilla way of installing this package is to clone this repository
|
|||
|
somewhere on your machine and add it to your Emacs’ =load-path= as shown
|
|||
|
below.
|
|||
|
#+begin_src emacs-lisp
|
|||
|
(add-to-list 'load-path "~/path/to/your/clone/password-gen.el")
|
|||
|
#+end_src
|
|||
|
|
|||
|
Then, you can =require= this package as needed.
|
|||
|
#+begin_src emacs-lisp
|
|||
|
(require 'password-gen)
|
|||
|
#+end_src
|
|||
|
|
|||
|
** Straight + use-package
|
|||
|
This is my preferred method, as I use this combo everywhere in my
|
|||
|
configuration. This snippet below is what I use to have my package
|
|||
|
available.
|
|||
|
#+begin_src emacs-lisp
|
|||
|
(use-package password-gen
|
|||
|
:straight (password-gen :build t
|
|||
|
:type git
|
|||
|
:repo "https://labs.phundrak.com/phundrak/password-gen.el.git")
|
|||
|
:ensure t
|
|||
|
:defer t)
|
|||
|
#+end_src
|
|||
|
|
|||
|
** Other Methods
|
|||
|
I am aware other methods are available, such as a =use-package= only
|
|||
|
method (especially interesting since Emacs 29), elpaca, quelpa, or
|
|||
|
Spacemacs’ and DoomEmacs’ package managers. However, I am unsure how
|
|||
|
to install it with these methods. If you do, feel free to submit a PR
|
|||
|
with new instructions!
|
|||
|
|
|||
|
* Upcoming Changes
|
|||
|
When working on this project, I was mainly inspired by Bitwarden’s
|
|||
|
password generator. Here are some features I would like to implement
|
|||
|
in the future:
|
|||
|
- Avoid ambiguous characters (don’t generate =O= and =0= in the same
|
|||
|
password, for instance)
|
|||
|
- Have a minimum amount of special characters
|
|||
|
- Have a minimum amount of numbers
|
|||
|
|
|||
|
* License
|
|||
|
=password-gen= is available under the GNU GPL-3.0 License. You can find
|
|||
|
the full text in [[file:./LICENSE][LICENSE]].
|