https://github.com/rainingcomputers/locksey
Personal CLI utility tool to easily encrypt and decrypt files in a directory
https://github.com/rainingcomputers/locksey
Last synced: about 1 year ago
JSON representation
Personal CLI utility tool to easily encrypt and decrypt files in a directory
- Host: GitHub
- URL: https://github.com/rainingcomputers/locksey
- Owner: RainingComputers
- License: mit
- Created: 2022-06-21T19:32:31.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-18T10:41:59.000Z (almost 4 years ago)
- Last Synced: 2025-02-14T00:14:10.952Z (over 1 year ago)
- Language: Python
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔒 locksey 🔒
Personal CLI utility tool to easily encrypt and decrypt files in a directory. Can be used to
encrypt secrets in a repo, MFA recovery codes, password text files, your journal/diary entries or any text file with personal or confidential information.
## How does it work?
- If you want a file in a directory to work with locksey, you name the file with ending with `.unlocked.*` extension.
When you run `locksey lock `, it will recursively find all `.unlocked.*` files, encrypt them and rename them to `.locked.*`.
- Similarly when you run `locksey unlock `, it will recursively find all `.locked.*` files, decrypt them and rename them to `.unlocked.*`.
- You can also tell locksey to store the password in you home folder so you don't have to type it again.
- Files are encrypted as described in [this](https://stackoverflow.com/a/55147077/5516481) stackoverflow post.
## Install
```
python3 -m pip install locksey
```
## Usage
```
python3 -m locksey [-h] action [password]
```
*Actions*
| Name | Description |
|-----------|-----------------------------------------------------------------------------------------------------------|
| lock | Recursively go through the directory encrypt and rename files matching glob `./**/*.unlocked.*` |
| unlock | Recursively go through the directory and decrypt and rename files matching glob `./**/*.locked.*` |
| setpasswd | Store password for current directory in home folder (`~/.locksey`), base64 encoded so you don't have to provide it again |
| rmpasswd | Remove stored password for current directory |
### Changing password
For changing the password in you current directory, run
1. `unlock`
2. `rmpasswd` if needed
3. `lock` with new password
4. `setpasswd` with new password if needed