Skip to main content

Local Variable Manager (lvmanager)

What does it do?

This is a simple CLI script to encrypt, store, and set environmental variables such as certs, ,keys or tokens.

usage: CLI for managing and maintaining tokens and key/certs.

optional arguments:
  -h, --help      show this help message and exit
  -add ADD        Adds a file to lcm [--name required]
  -delete DELETE  Delete a saved file [--name required]
  -setenv SETENV  Expose a saved file as an environmental variable [--name
                  required]
  -name NAME      Name to be used
  -ls             Display what currently stored
  -cleanup        Clean up exposed keys
  -e              Use encryption for values when storing or setting the
                  environment [LVMANAGER_PW is needed as an environmental
                  variable]
  -getkey         Get a new encryption key

View stored files

lvmanager -ls

Add

lvmanager -add NAME_OF_FILE.key -name project/NAME

lvmanager will automatically create projects if they are already not created. The -e flag will encrypt data and will need the environmental variable LV_MANAGER to be configured.

Note: If you save a .lvmanager file, when you setenv the contents of the file will be exposed, not a pointer to the file.

Delete

lvmanager -delete project/NAME

Export single variable

lvmanager -setenv project/NAME -name APP_TOKEN -e 

lvmanager will expose the stored value NAME as APP_TOKEN and will copy the relevant commands to the clipboard to the user to manually set. The -e flag will encrypt data and will need the environmental variable LV_MANAGER to be configured.

Export projects variables

lvmanager -setenv project/ -e

lvmanager will expose all values under project/ as the NAME they are stored as (in uppercase). The -e flag will encrypt data and will need the environmental variable LV_MANAGER to be configured.

Get key

lvmanager -getkey

The export command will be copied to the clipboard and will need to be set by the user. Don't lose this key!

How to Install

You can install lvmanager through the setup.py file:

python3 setup.py install

Pip config coming soon

Example

  1. Get and export key for encryption:
     lvmanager -getkey
    
    And now in your clipboard you should be able to expose your key:
     export LVMANAGER_PW=12345..
    
  2. Add the key test.key as token under project/ with encryption enabled:
    lvmanager -add token.lvmanager -name project/token -e
    
  3. See what lvmanager has stored:
    lvmanager -ls
    
    And we can see:
     (venv) lvmanager -ls                  
     project/
         key.key
    
  4. Expose our key and get the export command:
    lvmanager -setenv project/key -name KEY -e
    
  5. Export our environmental variable:
    export KEY=some/path/to/.exposed/project/key.key
    
  6. Delete our key from our database:
    lvmanager -delete project/key
    
  7. Clean up any un-encrypted data from the .exposed file:
    lvmanager -cleanup
    

Metadata

Release files for Local-Variable-Manager 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Local-Variable-Manager 1.0
File Size Uploaded
Local Variable Manager-1.0.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Local-Variable-Manager 1.0
File Interpreter ABI Platform
Local_Variable_Manager-1.0-py3.7.egg Legacy Egg format - - Details

Total release size: 17.9 kB

Release files / Local Variable Manager-1.0.tar.gz

Download URL Local Variable Manager-1.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c2520c301b421fb993f037cad922321c8a17c1a7431b1a99f5feca3a35895a4a
BLAKE2b-256 checksum
How to use checksums
247e3e4818d52396a8408e79f576f46eb7213b0f6a47c1a586a02e9ce5a39b88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3

Release files / Local_Variable_Manager-1.0-py3.7.egg

Download URL Local_Variable_Manager-1.0-py3.7.egg
Size 12.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
e1c6e53b3817770b0936e5c0f7fece988fc74319b0d64f952e5eef7f66d37727
BLAKE2b-256 checksum
How to use checksums
dc171c895bbb9a8b823d3feed7c5ab5970018b9c1bbc306d1f478ca14274715c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page