hash icon indicating copy to clipboard operation
hash copied to clipboard

A terminal based password manager for everyone

Hash

Hash is a terminal based password manager for everyone. If you spend most of your time in your terminal, Hash may be a good fit in your workflow.

Watch this video to understand the functionality of Hash.

https://github.com/hrishiksh/hash/assets/52790353/0b6259c8-79b5-46f2-9ef7-7bda866ea16d

Motivation for this project

I always prefer email password based signups in websites. But managing password is a hassle for me. I have used Bitwarden password manager and it is great. But I want to access my passwords from my terminal. I don't want to click around with the mouse to get a single password. Therefore I created Hash.

Getting started

  1. Go to the GitHub release section and pick the binary for your operating system. All the binaries are statically linked. Hence, binaries are portable and don't depend on OS libraries.

  2. Rename the binary file to hash.

  3. Make sure that the downloaded binary is executable. If not, run chmod +x hash.

  4. After downloading, place the binary in your path. e.g, For Linux users, put the binary inside ~/.local/bin or ~/bin directory. For macOS, put the binary inside /usr/local/bin directory.

  5. Start using Hash by running hash in your terminal.

Tech Stack

  • This project is written in Golang.
  • The beautiful TUI (Terminal User Interface) is made using BubbleTea, Bubbles and Lipgloss.
  • Bcrypt (a hash function) is used to generate the Salt.
  • PBKDF2 (a key derivation function) is used to generate the Secret Key.
  • Nacl Secretbox is used to symmetrically encrypt the password.
  • All the password are Hex encoded before storing on the Database.
  • Sqlite is used to store the encrypted passwords.

Build this project in your machine

  1. Clone the repository
git clone https://github.com/hrishiksh/golang-oauth2-starter.git
  1. Download all the dependency
go mod download
go mod tidy
  1. Build binary
make build

**Note: ** As some part of this project uses CGO, native go cross compilation is not easy. To statically link the binary, I have used the Zig compiler. This is a tutorial on how to do so in your project.