Skip to content

Add --export option to the secrets env command #145

@tegefaulkes

Description

@tegefaulkes

Specification

We want to add export behaviour to the secrets env command. This will act similar to how export key="value" in linux. Essentially it will add the secrets selected with -e vault:secretPath to be added to the current environment.

This will need to work on all of the supported platforms. So it needs to work on windows too.

Unless I'm missing any nuance it should be as simple as adding the envs with process.env[key]=value;.

We need to decide if it will work along side the other functionality or become the main function when run. For example, if we run the command with polykey secrets env -e vault1:secret1 --export some command will it run some command AND export to the current environment? OR just export? Same for the formatted outputs?

Additional context

Tasks

  • 1. Add the --export flag which will add the selected secrets to the current environment.
  • 2. Make sure to support windows and all of the platforms.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions