encrypt
v2.0.1Encrypt files, generate hashes, and manage keys for secure storage. Use when encrypting files, generating hashes, managing keys.
Installation
Encrypt
A sysops toolkit for scanning, monitoring, reporting, alerting, tracking top processes, checking usage, verifying system state, applying fixes, cleaning up, backing up, restoring, logging, benchmarking, and comparing — all from the command line.
Commands
| Command | Description |
|---|---|
encrypt scan <input> |
Scan for security issues — log scan targets and findings |
encrypt monitor <input> |
Monitor encryption status or system events — record monitoring data |
encrypt report <input> |
Generate security/encryption reports — save report specifications |
encrypt alert <input> |
Set or log security alerts — track alert conditions and triggers |
encrypt top <input> |
Track top processes or resource consumers — log top entries |
encrypt usage <input> |
Check resource or encryption usage — record usage metrics |
encrypt check <input> |
Check system or encryption state — log check results |
encrypt fix <input> |
Apply fixes to encryption or security issues — record fix operations |
encrypt cleanup <input> |
Clean up old keys, certs, or temp files — log cleanup actions |
encrypt backup <input> |
Backup encryption keys or config — track backup operations |
encrypt restore <input> |
Restore from backup — log restore operations |
encrypt log <input> |
Log arbitrary security events — record custom log entries |
encrypt benchmark <input> |
Benchmark encryption performance — save benchmark results |
encrypt compare <input> |
Compare encryption configs or performance — track comparisons |
encrypt stats |
Show summary statistics across all command categories |
encrypt export json|csv|txt |
Export all logged data in JSON, CSV, or plain text format |
encrypt search <term> |
Search across all log entries for a keyword |
encrypt recent |
Show the 20 most recent activity entries |
encrypt status |
Health check — version, data directory, entry count, disk usage, last activity |
encrypt help |
Show available commands and usage |
encrypt version |
Show version (v2.0.0) |
Each domain command (scan, monitor, report, etc.) works in two modes: - Without arguments: displays the 20 most recent entries from that category - With arguments: logs a new timestamped entry and shows the running total
Data Storage
All data is stored locally in ~/.local/share/encrypt/. Each command writes to its own log file (e.g., scan.log, monitor.log, backup.log) and a shared history.log tracks all activity with timestamps. No cloud sync, no external API calls — everything stays on your machine.
Requirements
- Bash 4+ (uses
set -euo pipefail) - Standard Unix utilities:
date,wc,du,grep,head,tail,basename - No external dependencies or API keys required
When to Use
- Security scanning and monitoring — Use
scanto log security scan results,monitorto track ongoing encryption status, andalertto record security events that need attention - Key and certificate lifecycle management — Use
backupandrestoreto track key backup/restore operations,cleanupto log removal of expired certs or old keys, andcheckto verify current state - Encryption performance benchmarking — Use
benchmarkto log encryption speed tests,compareto track performance across different algorithms or configurations, andreportto summarize findings - Incident response and auditing — Use
logto record custom security events,reportto build incident summaries, andsearchto quickly find relevant entries across all categories - System maintenance and compliance — Use
fixto track remediation actions,usageto monitor resource consumption,topto identify heavy consumers, andexportto generate audit-ready data
Examples
# Scan for encryption issues
encrypt scan "TLS certificates on prod servers — 3 expiring within 30 days"
# Monitor encryption status
encrypt monitor "AES-256 encryption active on all database volumes"
# Set a security alert
encrypt alert "Certificate for api.example.com expires 2025-04-15"
# Backup encryption keys
encrypt backup "GPG keyring exported to /secure/backup/2025-03-18.tar.gz"
# Benchmark encryption performance
encrypt benchmark "AES-256-GCM: 1.2 GB/s encrypt, 1.4 GB/s decrypt on Xeon E5"
# Compare configurations
encrypt compare "ChaCha20 vs AES-256: ChaCha20 15% faster on ARM, AES faster on x86"
# Clean up expired certificates
encrypt cleanup "Removed 12 expired certs from /etc/ssl/archive/"
# Check current state
encrypt check "All 5 TLS endpoints valid, shortest expiry: 89 days"
# Export all data to CSV
encrypt export csv
# View statistics
encrypt stats
# Search for specific entries
encrypt search certificate
How It Works
Encrypt uses a simple append-only log architecture. Each command appends a timestamped, pipe-delimited entry (YYYY-MM-DD HH:MM|value) to its category-specific log file. The stats command aggregates line counts across all logs, search runs case-insensitive grep across all files, and export serializes everything into your chosen format (JSON, CSV, or plain text). The status command gives a quick system health overview including version, total entries, disk usage, and last activity timestamp.
Powered by BytesAgain | bytesagain.com | [email protected]