GithubHelp home page GithubHelp logo

noblemajo / vault Goto Github PK

View Code? Open in Web Editor NEW
30.0 2.0 0.0 107 KB

File encryption and decryption cli tool written in go.

License: MIT License

Go 100.00%
aes aes-256 encryption encryption-decryption fileencryptor fileextension password-store passwordencryptor rsa rsa-cryptography x509 cli go golang go-cli golang-cli api-tokens

vault's Introduction

Vault

CI/CD CI/CD
MIT

Vault is a small and simple CLI tool that encrypt and decrypt plain files into vault-files (.vt).

The idea behind this tool is to have a CLI utility that can quickly and easily encrypt individual files, allowing users to securely store API tokens, secrets, credentials, or any private data on their own disk.

Table of Contents

Advertising

Are you also just a normal software developer or admin with lots of API keys, encryption keys or other secrets and credentials? Or do you simply have logs or plain text files that you want to send to someone securely? Then I have exactly what you are looking for today!

Hold on tight and take a closer look at this command line interface tool because it might meet your exact needs.

Encryption

Vault uses asymmetric RSA encryption and symmetric AES-256 encryption to keep your data as secure as possible. To do this, vault uses private and public key on disk (default: ~/.ssh/id_rsa.pub) and also asks you for a password.

Currently no elliptic curve support! Just rsa.

Getting Started

Requirements

For building you need to install go. For that i can recommend the following repo:

git clone [email protected]:udhos/update-golang.git golang-updater
cd golang-updater
sudo ./update-golang.sh

Build

Clone the repo:

git clone https://github.com/NobleMajo/vault.git
cd vault

Build the vault binary from source code:

go build -o bin/vault cmd/main.go
# or npm run build

Help

Run the help command on the binary

./vault
# or npm i -g .
# and then use "vault" anywhere on the machine

Main help output:

Vault is a file encryption and decryption cli tool written in go.
For more help, visit https://github.com/NobleMajo/vault

Usage:
  vault [flags]
  vault [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  init        Create a initial encrypted vault file for default text
  lock        Locks your plain file into a vault file
  passwd      Changes the password of your vault file
  print       Prints the decrypted content of your vault file
  temp        Temporary unlocks your vault file into a plain file
  unlock      Unlocks your vault file into a plain file
  version     Prints version message

Flags:
  -h, --help      help for vault
  -b, --verbose   enable verbose mode (VAULT_VERBOSE)
  -v, --version   prints version

Use "vault [command] --help" for more information about a command.

Usage

Vault operations are sub commands defined via the first command line argument.

init

Create a new locked vault file:

vault init

OR

lock

Add some content to your vault.txt and lock it:

vim vault.txt
vault lock

unlock

Unlock the vault as plain .txt file:

vault unlock

temp

Unlock the file for 5 seconds as .txt. In this time you can open it with an editor.

vault temp

print

Print the locked content in console:

vault print

Other filename

To choose a other file then the vault.txt use the second argument without extensions: (test for test.txt and test.vt)

vault lock <filename>
vault temp <filename>
vault unlock <filename>
vault init <filename>
vault print <filename>

Development

You can use node.js to easily install and run nodemon or link the binary:

Automatic building

This installs and starts a nodemon file watcher that rebuilds the binary if the sources get changed:

npm i
npm run dev

Global binary linking

With global linking you can access your binary in every directory by using vault:

npm i -g .

Then use can use 'vault' everywhere:

cd ..
vault -h

Contributing

Contributions to Vault are welcome!
Interested users can refer to the guidelines provided in the CONTRIBUTING.md file to contribute to the project and help improve its functionality and features.

License

Vault is licensed under the MIT license, providing users with flexibility and freedom to use and modify the software according to their needs.

Disclaimer

Vault is provided without warranties.
Users are advised to review the accompanying license for more information on the terms of use and limitations of liability.

vault's People

Contributors

noblemajo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vault's Issues

Flag parsing

Custom flag parsing because the go native "flag" lib don't support shorthands or commands.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.