A command line file encrypter and decrypter.
This program started as a clone of ansible-vault. Support for additional ciphers and a different binary only file format was added for flexibility.
This project has only been tested with go1.14+. To compile just run go get -u github.com/gesquive/krypt
and the executable should be built for you automatically in your $GOPATH
. This project uses go mods, so you might need to set GO111MODULE=on
in order for go get
to complete properly.
Optionally you can run make install
to build and copy the executable to /usr/local/bin/
with correct permissions.
Alternately, you can download the latest release for your platform from github.
Once you have an executable, make sure to copy it somewhere on your path like /usr/local/bin
or C:/Program Files/
.
If on a *nix/mac system, make sure to run chmod +x /path/to/krypt
.
This app is also avalable from this homebrew tap. Just install the tap and then the app will be available.
$ brew tap gesquive/tap
$ brew install krypt
The application looks for variables in the following order:
- command line flag
- environment variable
- config file variable
- default
So any variable specified on the command line would override values set in the environment or config file.
The application looks for a configuration file at the following locations in order:
./config.yml
~/.config/krypt/config.yml
/etc/krypt/config.yml
Optionally, instead of using a config file you can specify config entries as environment variables. Use the prefix "KRYPT_" in front of the uppercased variable name. For example, the config variable password-file
would be the environment variable KRYPT_PASSWORD_FILE
.
Encrypt or Decrypt files using different ciphers
Usage:
krypt [flags] command
Available Commands:
create Create a new encrypted text file
edit Decrypt, edit and encrypt an encrypted file
help Help about any command
list List the available cipher methods
reseal Change the password/cipher on encrypted file(s)
seal Seal unencrypted file(s)
unseal Unseal encrypted file(s)
view Decrypt and view the contents of a sealed file without editing
Flags:
-c, --config string Path to a specific config file (default "./config.yml")
-v, --version Show the version info and exit
Optionally, a hidden debug flag is available in case you need additional output.
Hidden Flags:
-D, --debug Include debug statements in log output
This documentation can be found at github.com/gesquive/krypt
This package is made available under an MIT-style license. See LICENSE.
PRs are always welcome!