Tuckr
Tuckr copied to clipboard
[Enhancement suggestion] Encrypt will overwrite the old file without warning
1- I encrypted a file on machine A
2- Decrypted it on machine B
3- Changed it on Machine B
4- tuckr doesn't tell me that I have modified the secret file. So, I forget to push my changes.
5- Furthermore tuckr encrypt with a whole different password overwrites the file in the same group.
I feel like the UX of using secrets is not intuitive. Here's my suggestion:
- Files can be in multiple groups, but tuckr should keep track of the last group that was decrypted that produced a file.
- Add a command that checks the hash of all decrypted files with the hash from their last group.
- If the file has changed, ask if you want to update the group and encrypt these files? or decrypt the group and overwrite these files?
- Update the group? Ask for the password, check and see if the password is correct, then encrypt the files.
- If password is wrong, ask if the user would like to use the new password instead
- Decrypt the group? Ask for password, decrypt the group and overwrite the files.
- Update the group? Ask for the password, check and see if the password is correct, then encrypt the files.
This way using tuckr sync secrets I can make sure that I update my secrets before pushing all my other changes. Or undo all the changes that I just did to my secrets.
You could also use the "check for modification" logic to ask for confirmation if a decrypt otherGroup command will override a changed secret file.
I feel like the UX of using secrets is not intuitive.
Secrets are the least fleshed out part of the program tbh. I haven't worked too much on it besides doing bug fixes when people report problems with it.
There's even a breaking change planned.
The implementation is honestly very dumb rn and has no awareness about the state of the deployed secrets.
I can add the confirmation before overriding now and add the smarter tracking for secrets later, since I think that's a bit low priority right now. I'll take a look after I'm done with the change in algo and making sure I'm able to handle overlapping groups properly.