NeoPass — A Password Manager in Command Line

Thomas Simmer
2 min readMar 20, 2024

--

Recently, I discovered nushell, a new type of shell written in Rust. It has significantly enhanced my experience with the Terminal. Results are easy to read, filter, and sort, while error messages are well articulated. The syntax is also remarkably easy to remember. I highly recommend giving it a try.

Look at how a simple ls command becomes beautifully formatted:

The first time I saw this table, I was impressed and wondered, “Wow, how did they do that?” The crate tabled is responsible for this functionality.

This inspired me to create a password management tool that could be displayed directly in the command line using a similar table format.

The features I envisioned for this tool were:

  • Storing an unlimited number of passwords securely.
  • Encrypting and decrypting passwords using a master password.
  • Easily adding, deleting, and modifying entries.
  • Copying passwords to the clipboard for convenient pasting.

I utilized the crate cocoon to encrypt and decrypt the file containing passwords. It significantly simplified my task by providing high-level functions that precisely met my requirements. For a basic understanding, here is what it essentially does:

To enable an interactive window allowing users to insert, modify, or delete entries and set a password in their clipboard, I found the crate dialoguer extremely helpful. It provides almost all the necessary functionalities for soliciting user inputs, including the ability to select between multiple items. I did need to create my own “select” function to listen to additional events, such as pressing the ‘a’ key to add a new entry or ‘d’ to delete one. However, this was a straightforward task, and I would like to express my gratitude to the developers of this library!

The result can be found here: NeoPass, but let me provide you with a preview:

I hope this tool proves useful to some of you, or perhaps even inspires you for your own projects.

Feel free to try it out, create issues, and contribute!

Cheers,

Thomas.

--

--