New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

enveil

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

enveil

enveil is a CLI tool to help you not to worry about exposing your secrets in your .env files when you commit them to your repository

unpublished
latest
npmnpm
Version
1.3.1
Version published
Maintainers
0
Created
Source

enveil - a CLI tool to help you not to worry about exposing your secrets in your .env files when you commit them to your repository

NPM: enveil

Usage: enveil [options] <files...>

encrypt and decrypt environment variables in a file

Arguments:
  files            Files to encrypt or decrypt

Options:
  -e, --encrypt    encrypt environment variables in a file
  -d, --decrypt    decrypt environment variables in a file
  -k, --key <key>  optional: key to encrypt or decrypt environment variables, defaults to a keys stored in ~/.enveil
  -h, --help       display help for command

What it does

# original .env file
HELLO=world

# after running `enveil -e .env`
HELLO=encrypted::U2FsdGVkX1/A1PgtAOSvOKQjs5CgGX+Y2gXGahVkgHc=

# after running `enveil -d .env`
HELLO=world

How to use

Single file

# encryption
enveil -e .env

# decryption
enveil -d .env

Multiple files

# encryption
enveil -e .env .env.local ...

# decryption
envail -d .env .env.local ...

Using a key (useful for CI/CD)

# encryption
enveil -e .env -k my-secret-key

# decryption
enveil -d .env -k my-secret-key

How to easily commit your .env files without worrying about exposing your secrets

Using pre-commit hooks with lint-staged and simple-git-hooks

{
  // ... package.json
  "lint-staged": {
    ".env*": ["enveil -e"]
  },
  "simple-git-hooks": {
    "pre-commit": "bunx lint-staged --verbose && echo"
  }
}

Keywords

enveil

FAQs

Package last updated on 26 Jul 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