envchain shellenv
Injecting secrets from envchain / keychain into your shell as environment variables, in batch.
envchain-shellenv - prints export statements for your secrets in the keychain
so that you can do eval "$(envchain-shellenv)".
Use with envchain for maximum convenience.
Quick Start
# install envchain first, and add your secrets to your keychain app via envchain
# for macOS with Homebrew, run `brew install envchain'.
# see https://github.com/sorah/envchain for more details.
# install envchain-shellenv
pipx install envchain-shellenv || pip install envchain-shellenv
# creates an example config at ~/.config/envchain-shellenv/keychain.ini
envchain-shellenv --create-example-config
# edit config file with your favorite editor
vim ~/.config/envchain-shellenv/keychain.ini
# export your envchain secrets in the current shell
eval "$(envchain-shellenv)"
# optionally add this line to your shell startup file
Installation
Prerequisites
- Required:
- Optional:
-
keyringis installed by default if you installenvchain-shellenvwith pipx.To use keyring when installing with
pip, dopip install 'envchain-shellenv[keyring]'.
-
pipx
This is the recommended installation method.
$ pipx install envchain-shellenv
pip
$ pip install envchain-shellenv
Usage:
envchain-shellenv prints export statements for your secrets in the keychain,
when you need your secrets in your shell env, just do eval "$(envchain-shellenv)".
$ eesh -h # `eesh' is just an alias for `envchain-shellenv', you can use either.
usage: envchain-shellenv [-h] [-c CONFIG] [--create-example-config] [-u {envchain,keyring}] [--version]
envchain shellenv - prints export statements for your secrets in the keychain
options:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
config file (default: /Users/tscp/.config/envchain-shellenv/keychain.ini)
--create-example-config
create example config file (default: False)
-u {envchain,keyring}, --use {envchain,keyring}
What to use to extract secrets (default: envchain)
--version, -V show program's version number and exit
Created by Teddy Xinyuan Chen || Homepage: https://github.com/tddschn/envchain-shellenv
Example
Example config file
test:
TEST: TEST_SEC
MULTILINE:
aws: # the envchain namespace
AWS_SECRET_KEY:
AWS_ROOT_PW: envchain-aws-root-pw
# sets AWS_ROOT_PW env var to envchain-aws-root-pw in the aws namespace of envchain
no-item:
# this will be skipped
Develop
$ git clone https://github.com/tddschn/envchain-shellenv.git
$ cd envchain-shellenv
$ poetry install
Metadata
Release files for envchain-shellenv 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| envchain-shellenv-1.0.2.tar.gz | 6.5 kB | Without provenance | Details for envchain-shellenv-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| envchain_shellenv-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for envchain_shellenv-1.0.2-py3-none-any.whl |
Total release size: 14.3 kB
Release files / envchain-shellenv-1.0.2.tar.gz
| Download URL | envchain-shellenv-1.0.2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c169f58058234ab14553088c691c27158bc984e7a2a9a7432f31e537655e3a44
|
|
BLAKE2b-256 checksum How to use checksums |
d08c300eb7152eb3a5c445bd1c239290d6f2929f10b21c4003b636dc05172d1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.10.5 Darwin/22.1.0
|
Release files / envchain_shellenv-1.0.2-py3-none-any.whl
| Download URL | envchain_shellenv-1.0.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3096bb62e34ef3c0463a12e887436a962f9acd48e7bbdc10bab817cc1ebfb273
|
|
BLAKE2b-256 checksum How to use checksums |
853c3ce100d115be4ba7a6235575f98da80e729be512ef29f3d05654b0150d91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.10.5 Darwin/22.1.0
|
Security for envchain-shellenv 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.