New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

adonis-secrets

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonis-secrets

AdonisJS secrets manager. Store safely your credentials in your repository.

0.1.3
latest
Source
npm
Version published
Weekly downloads
21
-25%
Maintainers
0
Weekly downloads
 
Created
Source

adonis-secrets

Safely store your AdonisJS environment variables in your repositories


PRs Welcome License

adonis-secrets

🔨 Install🚀 Get started🔧 Environments

ContributeLicense

Introduction

This AdonisJS library allows you to safely store your environment variable files in your repository by bringing two commands env:encrypt and env:decrypt. It is heavily inspired by the popular framework Laravel.

🔨 Install

node ace add adonis-secrets

🚀 Get started

You can encrypt your local environment file (.env) by using the env:encrypt command. It will create a new file .env.encrypted

node ace env:encrypt

And then decrypt it using env:decrypt.

APP_KEY=myappkey node ace env:decrypt

Under the hood, your files are encrypted using the APP_KEY environment variable. When decrypting a file the variable might not be available (as it might be inside the encrypted file). When it is the case, you have to provide it manually.

🔧 Environments

You might want to store the environment variables of other environments. You can do this by simply using the NODE_ENV variable. This will encrypt/decrypt your .env.[environment] file.

NODE_ENV=staging APP_KEY=myappkey node ace env:encrypt
NODE_ENV=staging APP_KEY=myappkey node ace env:decrypt

When providing development or nothing it will default to the .env file.

⚠ For security reasons, make sure you a different key for each environment.

Contributing

I'd love for you to contribute to this project. You can request new features by creating an issue, or submit a pull request with your contribution.

Keywords

adonis

FAQs

Package last updated on 21 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts