All Projects → lukechilds → Chest

lukechilds / Chest

Licence: mit
Bash glue to encrypt and hide files

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Chest

Masterpassword
Project moved to https://gitlab.com/spectre.app
Stars: ✭ 1,122 (+812.2%)
Mutual labels:  cli, cryptography, password-manager
Pol
pol /pɵl/ is a modern command line password manager with deniable encryption
Stars: ✭ 25 (-79.67%)
Mutual labels:  cli, cryptography, password-manager
Swifty
🔑 Free Offline Password Manager
Stars: ✭ 496 (+303.25%)
Mutual labels:  cryptography, encryption, password-manager
Gitpass
Open Source Your Password (Mismanagement)!
Stars: ✭ 113 (-8.13%)
Mutual labels:  cryptography, encryption, password-manager
Yq
Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
Stars: ✭ 1,688 (+1272.36%)
Mutual labels:  cli, command-line
Word Wrap
Wrap words to a specified length.
Stars: ✭ 107 (-13.01%)
Mutual labels:  cli, command-line
Spectre.cli
An extremely opinionated command-line parser.
Stars: ✭ 121 (-1.63%)
Mutual labels:  cli, command-line
Py7zr
7zip in python3 with ZStandard, PPMd, LZMA2, LZMA1, Delta, BCJ, BZip2, and Deflate compressions, and AES encryption.
Stars: ✭ 110 (-10.57%)
Mutual labels:  cli, encryption
Awesome Cli
A curated list of awesome resources for building immersive CLI experiences.
Stars: ✭ 104 (-15.45%)
Mutual labels:  cli, command-line
Httpcat
httpcat is a simple utility for constructing raw HTTP requests on the command line.
Stars: ✭ 109 (-11.38%)
Mutual labels:  cli, command-line
Nodejs Cli Apps Best Practices
The largest Node.js CLI Apps best practices list ✨
Stars: ✭ 2,144 (+1643.09%)
Mutual labels:  cli, command-line
Simple Console
Add an elegant command-line interface to any page
Stars: ✭ 107 (-13.01%)
Mutual labels:  cli, command-line
Clikt
Multiplatform command line interface parsing for Kotlin
Stars: ✭ 1,658 (+1247.97%)
Mutual labels:  cli, command-line
Gest
👨‍💻 A sensible GraphQL testing tool - test your GraphQL schema locally and in the cloud
Stars: ✭ 109 (-11.38%)
Mutual labels:  cli, command-line
Cryfs
Cryptographic filesystem for the cloud
Stars: ✭ 1,560 (+1168.29%)
Mutual labels:  cryptography, encryption
Pwd.sh
GPG symmetric password manager
Stars: ✭ 1,468 (+1093.5%)
Mutual labels:  encryption, password-manager
1pass
A caching wrapper for the 1Passworld CLI
Stars: ✭ 117 (-4.88%)
Mutual labels:  cli, password-manager
Open Crypto
🔑 Hashing (BCrypt, SHA2, HMAC), encryption (AES), public-key (RSA), and random data generation.
Stars: ✭ 115 (-6.5%)
Mutual labels:  cryptography, encryption
Cum
comic updater, mangafied
Stars: ✭ 117 (-4.88%)
Mutual labels:  cli, command-line
Easycrypt
Android cryptography library with SecureRandom patches.
Stars: ✭ 102 (-17.07%)
Mutual labels:  cryptography, encryption

Chest Build Status

Bash glue to encrypt and hide files

Chest allows you to encrypt any file/folder and move it to a hidden directory on your machine. When needed you can retrieve it from the chest into the current working directory.

Chest makes use of password based AES256 encryption with a strong key derivation function provided by gpg to make sure your data is secure.

Your chest can easily by synced between machines via any third party cloud storage providers such as Dropbox or Google Drive etc.

Why

I wanted something that was:

  • Highly secure to store stuff like Bitcoin private keys
  • Easily accessible from the CLI (quickly encrypt/decrypt)
  • Can handle directories or files
  • Sync-able between machines
  • Usable interactively or scriptable
  • Password based (keys are in my brain, not on my machine)
  • Keeps me completely in control of my data
  • Allows me to choose whether to store locally or replicate to the cloud/VPS etc
  • Simple and easy to understand source code
  • No crazy dependencies

Chest ticks all those boxes. It's under 300 lines of fairly simple Bash, and about 90% of that are just CLI helper methods. The core encryption logic is easily understandable and is only a handful of lines.

It's basically a shell script wrapper around tar | gpg so you don't have to hand type commands like:

# Encrypt secret-folder
tar -cvzf - "secret-folder" | gpg -c --cipher-algo AES256 > "secret-folder.tar.gz.gpg"

# Decrypt secret-folder
gpg -d "secret-folder.tar.gz.gpg" | tar -xvzf -

Usage

$ chest -h
chest 0.4.0

Usage: chest -e [folder|file]
       chest -d [key]

  -h            Help. Display this message and quit.
  -e            Encrypt data and send to chest.
  -d            Decrypt data from chest.
  -z            Compress (zip) data before sending to chest.
  -r            Remove original data after sending to chest.
  -l            List items in chest.
  -k [key]      Set key to save/retrieve.
  -p [password] Set password. (omit to be prompted)

Options

CHEST_DIR

The directory all of your encrypted data will be stored in.

Defaults to ~/.chest.

export CHEST_DIR="$HOME/.chest"

CHEST_CLEAR_PASSWORD_CACHE

By default, gpg will cache passwords for as long as the gpg agent is running. This means you don't need to keep re-entering the same password to decrypt the same file. This is useful for certain use cases but for storing highly sensitive data is probably not what you want. By default we reload the gpg agent each time you enter a password to ensure they aren't cached.

You can diable this by setting CHEST_CLEAR_PASSWORD_CACHE to false.

Defaults to true.

export CHEST_CLEAR_PASSWORD_CACHE="true"

Tips

Cloud Backup/Sync

As long as you're using strong passwords, it's safe to replicate your Chest to the cloud. Everything will be encrypted before it leaves your machine and the keys are safely stored in your brain.

To re-iterate, you must use a sufficiently random password for cloud backup to be safe. If you don't fully understand this, do not replicate your chest to third-party cloud providers.

For example to set this up with Dropbox, you could either do:

ln -s ~/Dropbox/chest ~/.chest

or

export CHEST_DIR="$HOME/Dropbox/chest"

Now your encrypted files will be safely replicated around the world on Dropbox's servers to prevent against data loss.

You can also do this across multiple machines to keep your Chest in sync between them.

Installation

macOS

brew install lukechilds/tap/chest

Linux

Just clone this repo and either copy/symlink chest to your PATH or run the script directly with ./chest. Requires gpg to be installed.

Windows

¯\_(ツ)_/¯

License

MIT © Luke Childs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].