Skip to main content

A collection of tool cli for EC.

Project description

ec-tools-cli

A small set of CLI tools for encryption, vault storage, backups, DB queries, auto-run, and QR codes.

Install

pip install -r requirements.txt
pip install -e .

Commands

  • 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.

Usage

ec-enc

# encrypt
ec-enc -e input.bin -o output.enc -p <password>

# decrypt
ec-enc -d output.enc -o output.bin -p <password>

ec-sql

ec-sql -db /path/to/file.db
  • Prints tables, then interactive SQL (exit to quit).

ec-vault

# 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.

ec-backup

# backup
ec-backup -c config.json -p <password> backup

# restore
ec-backup -c config.json -p <password> unpack -o /path/to/output

Minimal 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

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>.in and <name>.txt exist, it diffs output vs expected.

ec-qrcode

# generate
ec-qrcode generate -m "hello" -s 20 -o out.png

# scan
ec-qrcode scan -i in.png -o decoded.txt

One-off scripts

python -m ec_tools_cli.one_off.migrate_db -c config.json
  • Migrates backup DB records to use relative zip paths.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ec_tools_cli-0.1.3.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ec_tools_cli-0.1.3-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file ec_tools_cli-0.1.3.tar.gz.

File metadata

  • Download URL: ec_tools_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ec_tools_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 edc6546a2b197d4b96ce70365a20fc9fdc1cd42e35d5c4ec51c58bed9568056e
MD5 244a1f317a154468564cd2762bea9bc9
BLAKE2b-256 f654700bd3a5fd96731fc0f95bc82ddc0c6de73d945dea1b8d9355f70ba1c4e1

See more details on using hashes here.

File details

Details for the file ec_tools_cli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ec_tools_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ec_tools_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 58bfc30c02c938dc53e93b299257c9ba9f82c75d4bda238a02be6436f3f7eb57
MD5 2ba4e2db11df2efc8448755ee4c24a07
BLAKE2b-256 bfcd9da0d88a73002594bff33ce3ea8e8a86db3e4157c72dd585bb300bf1ea5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page