@krishnawijaya/vue-secret-key-generator

Vue Secret Key Generator

Vue Secret Key Generator is a secret key generator for token or other sensitive information hashing purpose
It will add the new secret key into your VUE_APP_SECRET_KEY variable in the .env (dotenv) file.
Or you can just copy and paste the key that showed in your command line into wherever you want.

Installation

Install to your VueJs project

npm install --save @krishnawijaya/vue-secret-key-generator

Usage

  1. Move to your project directory
cd /your/project/path
  1. Configure “generate” command
    1. Open package.json file of your project
    2. Add generate command to your project
      "generate-key": "generate"
    3. So that your code in the script section looks like this
      "scripts": {
       "your": "another-script",
      "generate-key": "generate",
      "your": "others-script"
      },
    4. Then save your package.json file
  2. Generate the secret key
    • Generate with default settings:15 digits length and consist of A-Z, a-z, 0-9 without I, O alphabets

      Automatically added to your VUE_APP_SECRET_KEY variable in your .env file

      generate-key
    • Generate with your own settings:Example:
      generate-key -- --length 20 --chars "abcdefg12345" --variable "YOUR_CUSTOM_VARIABLE_NAME" --filepath "/your/custom/path"
    • Use in other file:If you want to use the new secret key outside the .env file

      You can pass the “-m” or “–manual” flag in the command

      generate-key -- --manual

      Then copy and paste the key wherever you want

Show help information

See complete usage info:

generate --help

Check my profile