Skip to content

Simple CLI to pull secrets from AWS Secrets Manager and output them into .env format for AWS Secrets Manager.

License

Notifications You must be signed in to change notification settings

kanguru-ai/secrets-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@openchair-io/secrets-manager

Simple CLI to pull secrets from AWS Secrets Manager and output them into .env format for AWS Secrets Manager type: Other type of secret.

Other type of secret

Install

We recommend that you install it at the global npm level so that you can use it wherever, but obviously feel free to install it at the package level.

npm i -g @openchair-io/secrets-manager

Usage


See available options and what they do.
oc secrets --help

Fetch secrets and output to ./.env.

export AWS_ACCESS_KEY_ID=xxxx
export AWS_SECRET_ACCESS_KEY=xxx

oc secrets <aws secrets manager secret name>

This will create a .env file in the directory you run it in that looks like:

SECRET_1=xxxx
SECRET_2=xxxx

Fetch secrets and output to a different path i.e. ./.env.development.

export AWS_ACCESS_KEY_ID=xxxx
export AWS_SECRET_ACCESS_KEY=xxx

oc secrets <aws secrets manager secret name> --path .env.development

This will create an env file at ./.env.development file that looks like:

SECRET_1=xxxx
SECRET_2=xxxx

Fetch secrets and output to a different path i.e. ~/desktop/.env.development .

export AWS_ACCESS_KEY_ID=xxxx
export AWS_SECRET_ACCESS_KEY=xxx

oc secrets <aws secrets manager secret name> --path .env.development

This will create an env file at ~/desktop/.env.development file that looks like:

SECRET_1=xxxx
SECRET_2=xxxx

Fetch secrets and prepend export.

export AWS_ACCESS_KEY_ID=xxxx
export AWS_SECRET_ACCESS_KEY=xxx

oc secrets <aws secrets manager secret name> --prepend 'export '

This will create an env file at ./.env file that looks like:

export SECRET_1=xxxx
export SECRET_2=xxxx

About

Simple CLI to pull secrets from AWS Secrets Manager and output them into .env format for AWS Secrets Manager.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published