Skip to main content

A CICD friendly pip package for encrypting env's to be stored safely in code repositories, No more hassle in handiling env's in cloud environments

Project description

lockenv - encrypt and decrypt env files easily

A CICD friendly pip package for encrypting env's to be stored safely in code repositories. No more hassle in handiling env's in cloud environments

Use Cases:
  • Encrypting and storing env variables in repositories using a master key
  • Include as part of Pipelines to decrypt env's

Installation

Install lockenv on your system using :

pip install lockenv

Usage

lockenv -e dev -editor code
  • The command will check for 'dev.fkey' file in the current path, if found will read the key, if not it will prompt to generate a new key

  • It will automatically open the decrypted version of env in VSCode, if it is not installed, it will open Vi

  • After editing the env file save it and close the file, it will be encrypted automatically

Default command Screenshot

lockenv -d dev -editor code
  • The command will check for 'dev.fkey' and dev.env in the current path, if found will read the key and env and decrypt the file
lockenv -e production -editor code -k keyfile or key-string
  • You can also specify keys manually
  • the key can be either the keyfile name or the key as a string
lockenv -e production -editor code -f envfile
  • The env file can also be manually specified

Flags

  • -e - Specify an environment (Eg: dev, staging)
  • -d - Decrypt env
  • -k - Specify key file or key as a string
  • -f - Specify env file

Example Uses

This will open the decrypted version of dev.env file for editing

lockenv -e dev -k N_Wctg1YY7uyUmD8Cs4bq3VY6IsOHVbbeElpC-tpvE4=

This will decrypt dev.env automatically without any further inputs

  • Recommended for Pipelines
lockenv -d -e dev -k N_Wctg1YY7uyUmD8Cs4bq3VY6IsOHVbbeElpC-tpvE4=

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lockenv-1.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file lockenv-1.4-py3-none-any.whl.

File metadata

  • Download URL: lockenv-1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for lockenv-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 afc8e4c3852b780c7bc5137a1ae1398da20f6e2f85e1d02c168aeda69d177622
MD5 ee4de57c6251e8d08d95d40946141d70
BLAKE2b-256 3ae020c3049b01a2d0d918f82c25a6c34adc0606c8d5ebdd2a72c3f6e0db5bd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page