Specification
As part of the #32 issue refactoring, we need to implement secrets write command. This command is the most basic method of writing secrets.
secrets read
This command needs to read the contents of a secret in a vault. The contents will be outputted to stdout. Pretty much just the existing secrets get command. I don't think any changes need to be made to it.
The command takes the form of pk secrets read [secretPath]. The output can be redirected with pk secrets read [secretPath] > some file and piping into it shouldn't do anything. (see #242 (comment))
secrets write
This command needs to update or create the contents of a file. There will be two ways to provide the secret contents here. Coompared to current implementation, this pretty much is just secrets create but allows you to update a secret as well.
- Interactively via
stdin. so if you call secrets write secretPath you can type in you contents to the terminal and send EOF (ctrl+d) to finish writing.
- Piping data in.
In both cases the behaviour should match cat > file.
Additional context
Tasks
Implement secrets read command.
- Implement
secret write command.
create tests demonstrating behaviour for read.
- create tests demonstrating behaviour for write.
Specification
As part of the #32 issue refactoring, we need to implement
secrets writecommand. This command is the most basic method of writing secrets.secrets readThis command needs to read the contents of a secret in a vault. The contents will be outputted tostdout. Pretty much just the existingsecrets getcommand. I don't think any changes need to be made to it.The command takes the form of(see #242 (comment))pk secrets read [secretPath]. The output can be redirected withpk secrets read [secretPath] > some fileand piping into it shouldn't do anything.secrets writeThis command needs to update or create the contents of a file. There will be two ways to provide the secret contents here. Coompared to current implementation, this pretty much is just
secrets createbut allows you to update a secret as well.stdin. so if you callsecrets write secretPathyou can type in you contents to the terminal and sendEOF(ctrl+d) to finish writing.In both cases the behaviour should match
cat > file.Additional context
pk secrets *#32Tasks
Implementsecrets readcommand.secret writecommand.create tests demonstrating behaviour for read.