An encrypted, colorful terminal journal
Project description
PyJournal
A colorful, encrypted, password-protected terminal journal written in Python.
Features
- End-to-end encryption — entries are encrypted with a random master key using Fernet (AES-128-CBC). The master key is never stored in plaintext.
- Password-derived security — your password unlocks the master key via PBKDF2-SHA256 (480,000 iterations). No password = no access.
- Recovery code — a one-time 160-bit recovery code is generated at setup. If you forget your password, use it to recover access without losing any entries.
- Rich terminal UI — colored panels, styled menus, and visual separators powered by Rich.
- Change password — re-wraps the master key with your new password. Journal entries are untouched.
- Delete entries — password-confirmed deletion of individual entries.
- Entry counter — tracks total number of journal entries.
Security model
password ──► PBKDF2-SHA256 ──► wrapping key ──► decrypts ──► MASTER KEY
│
recovery code ──► PBKDF2-SHA256 ──► wrapping key ──► also decrypts ┘
│
encrypts entries
What is stored in ~/.pyjournal/.env:
| Key | Purpose | Secret? |
|---|---|---|
SALT |
KDF salt for password path | No |
RECOVERY_SALT |
KDF salt for recovery path | No |
TOKEN |
bcrypt hash for fast login | No |
ENCRYPTED_MASTER |
master key wrapped with password-derived key | Not without your password |
RECOVERY_MASTER |
master key wrapped with recovery-code-derived key | Not without your recovery code |
The encryption key is never stored on disk. An attacker with access to your files cannot decrypt your entries without your password or recovery code.
Requirements
- Python 3.10+
- See
requirements.txtfor dependencies
Installation
Development
# Clone and set up a virtual environment
git clone https://github.com/your-username/pyjournal.git
cd pyjournal
python -m venv my_venv
source my_venv/bin/activate # macOS/Linux
my_venv\Scripts\activate # Windows
pip install -r requirements.txt
python journal.py
Via pipx (recommended for end users)
pipx install pyjournal
pyjournal
Usage
pyjournal # launch the journal
pyjournal --reset-password # recover access using your recovery code
On first launch you will be asked to create a password. Your recovery code is displayed once — write it down and store it somewhere safe.
Menu options
| Option | Action |
|---|---|
| 1 | New log entry |
| 2 | Read previous logs |
| 3 | Exit |
| 4 | Show all options |
| 5 | Change password |
| 6 | Change display name |
| 7 | Delete an entry |
Forgot your password?
pyjournal --reset-password
Enter your recovery code when prompted. You will be able to set a new password and all existing journal entries will be preserved.
If you have lost both your password and your recovery code, your entries cannot be recovered. This is by design.
Data location
All data is stored in ~/.pyjournal/:
| File | Contents |
|---|---|
.env |
Salts, token, and encrypted master key blobs |
something.txt |
Encrypted journal entries |
saves.txt |
Entry count |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyjournaling-1.0.0.tar.gz.
File metadata
- Download URL: pyjournaling-1.0.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2818d23e2847754b04b32ba73fbda58392dc706e01ae05d0ef45d2c78b8014a0
|
|
| MD5 |
0d00d637b59f4d6ac0b71cbfd999dfc0
|
|
| BLAKE2b-256 |
4e6f19824446bcc41e66e3674c79f905f4ef2150ac26f6e98293e0b7501da679
|
File details
Details for the file pyjournaling-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyjournaling-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b80d764e4e7ac34eae91aa9b312e016c8a6e2590ad3f6b53028ee961ed040ac9
|
|
| MD5 |
9c88efc832aed6e9abe92f1b6f9e4563
|
|
| BLAKE2b-256 |
b112bb0c0342e6c2d6ac2a8bbcba187c70d598380908511f1ee857651d563abe
|