A small, security-aware local memory store for notes, snippets, reminders, and teaching material.
This starter project is a practical fit for a Python developer and cybersecurity teacher:
- local-first storage
- encrypted data at rest with a passphrase
- simple CLI workflow
- metadata, tags, and keyword search
- clean project structure for future upgrades
- Add memory entries with title, content, and tags
- List all saved entries
- Search entries by keyword
- Read a single entry by ID
- Delete entries by ID
- Export decrypted entries to JSON
- Encrypt the on-disk database using
cryptography.Fernet
miniature-memory/
├── miniature_memory/
│ ├── __init__.py
│ ├── cli.py
│ ├── config.py
│ ├── crypto.py
│ ├── models.py
│ └── store.py
├── tests/
│ └── test_store.py
├── requirements.txt
└── README.md
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtSet a passphrase once per shell session:
export MINI_MEMORY_PASSPHRASE="change-this-now"Initialize the store:
python -m miniature_memory.cli initAdd a memory:
python -m miniature_memory.cli add \
--title "SQL Injection lesson" \
--content "Explain UNION-based injection, parameterized queries, and least privilege." \
--tags python security teachingList memories:
python -m miniature_memory.cli listSearch:
python -m miniature_memory.cli search --query injectionGet one entry:
python -m miniature_memory.cli get --id <ENTRY_ID>Delete one entry:
python -m miniature_memory.cli delete --id <ENTRY_ID>Export decrypted JSON:
python -m miniature_memory.cli export --output exported_memories.json- The encryption key is derived from your passphrase using PBKDF2.
- The encrypted database is stored locally.
- The export command writes plaintext JSON, so handle exported files carefully.
- Use a strong passphrase and keep it out of shell history in production.
- This is a teaching-friendly starter, not a hardened secret manager.
- switch storage to SQLite
- add full-text search
- add password manager integration
- add audit logging
- add embeddings or semantic retrieval
- expose as FastAPI service