1.1.1 • Published 6 months ago
davinsecret v1.1.1
Davinsecret
Davinsecret is an NPM package that allows you to quickly generate a JWT Secret in the .env file at the root of your project.
Table of Contents
- 🌟 Features
- 📦 Installation
- 📖 Usage
- 💻 When installed globally
- 🌐 With npx
- 💾 With npm
- 🎮 Other commands
- 📄 License
- ✍🏻 Author
🌟 Features
- Secure: No display. No leak. Your secret is directly stored in your .env file. Only you can access it.
- Quickly generate a JWT Secret: Generate a JWT Secret in the .env file at the root of your project (Davinsecret creates a .env file for you at the root of your project if it does not exist).
- Customizable secret size: Choose the number of bytes you want for your secret.
- Documentation: Access the Davinsecret documentation directly in your console.
- Easy to use: Use the package with npx or npm.
📦 Installation
We recommend to install Davinsecret globally, or to use it with npx (see Usage).
npm install -g davinsecret
📖 Usage
💻 When installed globally:
davin secret <bytes>
# or, shorter
davin s <bytes>
🌐 With npx:
npx davinsecret secret <bytes>
# or, shorter
npx davinsecret s <bytes>
💾 With npm:
Note : you will need to write a dedicated script in your package.json
to use the davin
command.
"scripts": {
"davin": "davinsecret"
}
Then, you can use the following command :
npm run davin secret <bytes>
# or, shorter
npm run davin s <bytes>
bytes: The number of bytes you want to generate for your secret.
🎮 Other commands
dotenv
| dot
: Check if dotenv dependency is installed in your project. If not, guides you to install it.
doc
| d
: Open the Davinsecret's documentation in your console.
📄 License
MIT
✍🏻 Author
Louis-Antonin Lesieur