A small set of CLI tools for encryption, vault storage, backups, DB queries, auto-run, and QR codes.
pip install -r requirements.txt
pip install -e .ec-enc— encrypt/decrypt files (AES-256-CBC).ec-sql— SQLite REPL.ec-vault— encrypted key/value vault.ec-backup— chunked encrypted backup + restore.auto-run— run.py, compile+run.c/.cpp.ec-qrcode— generate/scan QR codes.
# encrypt
ec-enc -e input.bin -o output.enc -p <password>
# decrypt
ec-enc -d output.enc -o output.bin -p <password>ec-sql -db /path/to/file.db- Prints tables, then interactive SQL (
exitto quit).
# list keys
ec-vault list
# insert (value, file, or stdin)
ec-vault insert -p <password> -k <key> -v <value>
ec-vault insert -p <password> -k <key> -f /path/to/file
echo "secret" | ec-vault insert -p <password> -k <key>
# get (stdout or file)
ec-vault get -p <password> -k <key>
ec-vault get -p <password> -k <key> -o /path/to/output
# delete
ec-vault delete -k <key>- Default DB:
~/.ec_tools/ec_tools.db.
# backup
ec-backup -c config.json -p <password> backup
# restore
ec-backup -c config.json -p <password> unpack -o /path/to/outputMinimal config:
{
"db_path": "/path/to/index.db",
"src_path": "/path/to/source",
"zip_path": "/path/to/archives"
}Notes:
- Backs up by file hash/mtime/size; only changed files are packed.
- Files are encrypted in chunks and stored inside zipped packages.
auto-run path/to/file.py
auto-run path/to/file.cpp- C/C++: compile with
g++ -O2 -Wall -std=c++17, then run. - If
<name>.inand<name>.txtexist, it diffs output vs expected.
# generate
ec-qrcode generate -m "hello" -s 20 -o out.png
# scan
ec-qrcode scan -i in.png -o decoded.txtpython -m ec_tools_cli.one_off.migrate_db -c config.json- Migrates backup DB records to use relative zip paths.