Skip to main content

📓 The Notebook

English · فارسی

A feature-rich, encrypted, bilingual (English / Persian-Farsi) personal journal and diary application for the desktop — now with an AI assistant and MCP server for AI agent integration.

Your thoughts, your words, your keys.


🆕 What's New in v1.4.0

🤖 AI Assistant

Bring your own API key and ask questions about your journal:

  • Ask Your Journal — query your past entries in natural language
  • Auto-generated summaries — weekly or monthly digests
  • Sentiment analysis — track your emotional patterns over time
  • Auto-tagging suggestions — AI-suggested tags for new entries
  • Supports Claude (Anthropic), OpenAI (GPT), Google Gemini, and Ollama (local, private, no API key needed)
  • API keys are encrypted at rest with the same AES-GCM key as your entries

🔌 MCP Server (Model Context Protocol)

The first encrypted journal with MCP support. Any MCP-compatible AI client (Claude Desktop, OpenClaw, Hermes, Cursor, etc.) can:

  • List folders, entries, and tags
  • Read and search entries
  • Create new entries and append to existing ones
  • Get journal statistics
# Start the MCP server (from the command line)
the-notebook-mcp --password YOUR_PASS

# Or via environment variable
NOTEBOOK_PASS=YOUR_PASS the-notebook-mcp

🔒 Encrypted Attachments

File attachments are now encrypted with AES-256-GCM — the same crypto that protects your entries. Your photos, audio notes, and documents are safe at rest. (Toggleable in Settings.)

📓 Multiple Notebooks

Create separate journals for Work, Personal, Dreams — each with its own password and folder tree. Switch between them from the Data menu.

🏗️ Architecture Improvements

  • PyPI package — pip install the-notebook
  • XDG-compliant paths on Linux (~/.local/share/TheNotebook/)
  • Config migration system — automatic upgrades between versions
  • Threaded operations — no more UI freezes during re-encryption
  • Proper logging — app.log with rotation for debugging
  • Package structure — proper Python package, not flat scripts

✨ Features

Security

  • 🔐 AES-256-GCM encryption for every entry, with an additional HMAC-SHA256 integrity tag (defence-in-depth).
  • 🔑 PBKDF2 key derivation (480 000 iterations) with a per-installation random salt.
  • 🔒 Auto-lock after a configurable period of inactivity; keys are zeroed from memory on lock.
  • 🛡️ Exponential backoff on failed unlock attempts (non-blocking).
  • 🔗 Optional OS keyring integration.
  • 🔄 Safe password change — setting, changing, or removing the password re-encrypts every entry and every history snapshot in place.
  • 🔒 Encrypted attachments — files attached to entries are encrypted with the same AES-GCM key as the entries themselves.

AI Assistant (NEW in v1.4.0)

  • 🤖 Ask Your Journal — natural-language Q&A about your past entries.
  • 📅 Auto-generated summaries — weekly or monthly digests.
  • 💭 Sentiment analysis — track your emotional patterns.
  • 🏷️ Auto-tagging suggestions — AI-suggested tags for new entries.
  • 🔑 Bring your own API key — supports Claude, OpenAI, Gemini, Ollama.
  • 🔒 API keys encrypted at rest with your journal password.
  • 🤖 No vendor lock-in — switch providers anytime.

MCP Server (NEW in v1.4.0)

  • 🔌 Expose your journal to any MCP-compatible AI client.
  • 📖 Read tools: list folders, entries, tags; search; read; statistics.
  • ✏️ Write tools: create entries, append to entries.
  • 🔒 Requires the journal to be unlocked (password-gated).
  • 🖥️ Runs as a standalone process via the-notebook-mcp.

Writing

  • 📝 Rich-text editor with bold / italic / underline / strikethrough, bullet and numbered lists.
  • 🖼️ Drag-and-drop images directly into entries.
  • 🎙️ Audio notes — record voice memos inline (optional).
  • 📎 File attachments (now encrypted!) of any type.
  • 🌐 Three editor views: WYSIWYG, HTML source, Markdown preview.
  • 🔄 Auto-save every 30 seconds.
  • 🔤 Optional spell check.

Organization

  • 📁 Folders and dated entries.
  • 🏷️ Tags, ⭐ favorites, 😊 mood tracking.
  • 🗑️ Soft-delete trash with restore.
  • 📜 Version history with one-click restore.
  • 📓 Multiple notebooks — separate journals with separate passwords.
  • 🗓️ Dual calendars: Gregorian and a custom Jalali (Persian) calendar.
  • 🎉 Holiday / event labels for both Iranian and US calendars.
  • 🔍 Full-text search via an inverted index.
  • ⌨️ Command palette (Ctrl+Shift+P).
  • 🔎 Quick search bar (Ctrl+F).

Insights & sync

  • 📊 Statistics: activity graph, tag cloud, per-folder breakdown, mood chart.
  • 💭 Daily writing prompts (20 each in English and Persian).
  • 📆 "On This Day" memories.
  • 🔄 Folder sync via Markdown.
  • 💾 Backup & restore to/from zip.
  • 📤 Batch export to HTML or Markdown.

🚀 Installation

Option 1: Download a pre-built binary (easiest)

Go to the Releases page and download the appropriate file for your platform.

Option 2: Install from PyPI

pip install the-notebook
the-notebook   # launch the app

# With AI support:
pip install the-notebook[ai]

# With everything (AI, MCP, audio, keyring, spellcheck):
pip install the-notebook[all]

# To run the MCP server:
pip install the-notebook[mcp]
the-notebook-mcp --password YOUR_PASS

Option 3: Build from source

git clone https://github.com/Bloody-Crow/The-Notebook.git
cd The-Notebook
pip install -e .
the-notebook

🤖 AI Assistant Setup

  1. Open the app → Settings → AI Assistant Settings...
  2. Choose your provider (Claude / OpenAI / Gemini / Ollama).
  3. Paste your API key (it's encrypted with your journal password).
  4. Optionally override the model name or set a custom base URL (for Ollama).
  5. Use Data → Ask Your Journal... to ask questions about your entries.
  6. Use Data → Generate Summary... for weekly/monthly digests.

Supported providers

Provider API Key Needed Model Example
Claude (Anthropic) Yes claude-sonnet-4-20250514
OpenAI (GPT) Yes gpt-4o
Google Gemini Yes gemini-1.5-pro
Ollama (local) No llama3.2

🔌 MCP Server Setup

The MCP server lets AI agents (Claude Desktop, OpenClaw, Hermes, Cursor, etc.) read and write your journal entries.

Starting the server

# If your journal has no password:
the-notebook-mcp

# If your journal is encrypted:
the-notebook-mcp --password YOUR_PASS

# Or via environment variable:
NOTEBOOK_PASS=YOUR_PASS the-notebook-mcp

Connecting from Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "the-notebook": {
      "command": "the-notebook-mcp",
      "args": ["--password", "YOUR_PASS"]
    }
  }
}

Available tools

Tool Description
list_folders List all journal folders
list_entries List entries in a folder (optionally by date)
read_entry Read the full content of an entry
search_entries Full-text search across all entries
create_entry Create a new journal entry
append_to_entry Append text to an existing entry
list_tags List all tags
get_statistics Get journal statistics

📦 For Developers

Run the test suite

pip install -e ".[dev]"
pytest tests/ -v

Package structure

the_notebook/
├── __init__.py        # Package metadata
├── __main__.py        # python -m the_notebook entry point
├── main.py            # Application entry point
├── config.py          # Paths, config, migration, logging
├── crypto.py          # AES-GCM + HMAC encryption (text + binary)
├── models.py          # File I/O, search index, re-encryption
├── i18n.py            # Translations + Persian calendar events
├── widgets.py         # RichTextEditor + PersianCalendarWidget
├── dialogs.py         # All QDialog subclasses
├── main_window.py     # JournalApp main window
├── notebooks.py       # Multi-notebook manager
├── ai.py              # AI assistant (Claude/OpenAI/Gemini/Ollama)
├── mcp_server.py      # MCP server for AI agent integration
└── workers.py         # Threading utilities

🔒 Security

See SECURITY.md for the full threat model.

Short version:

  • Entry text is encrypted with AES-256-GCM + HMAC-SHA256.
  • Attachments are encrypted with the same key (new in v1.4.0).
  • Filenames, folder names, tags, moods, favorites, and the search index are NOT encrypted.
  • AI API keys are encrypted with your journal password.

📜 License

MIT — see LICENSE.

Copyright © 2025 Bloody-Crow.

Metadata

Release files for the-notebook 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for the-notebook 1.4.1
File Size Uploaded Provenance Actions
the_notebook-1.4.1.tar.gz 79.9 kB Without provenance Details for the_notebook-1.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for the-notebook 1.4.1
File Interpreter ABI Platform Actions
the_notebook-1.4.1-py3-none-any.whl Python 3 none any Details for the_notebook-1.4.1-py3-none-any.whl

Total release size: 153.5 kB

Release files / the_notebook-1.4.1.tar.gz

Download URL the_notebook-1.4.1.tar.gz
Size 79.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bae8ecdfed1976594bacf291a763cff01b5392101e733ab5115cf4994423fe7d
BLAKE2b-256 checksum
How to use checksums
be13d2624e67fdf124b8d304f7efbb2b293155afbd15ff7629b1ce33ef9f71a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / the_notebook-1.4.1-py3-none-any.whl

Download URL the_notebook-1.4.1-py3-none-any.whl
Size 73.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb4ac3a2220cfb83f92ae0ee78dfff1f9092e3b9b95462005a7aa423dbc85434
BLAKE2b-256 checksum
How to use checksums
b2c4a8bdec4fc95c3ccd819506ffb5d24d8c535b4d0573c82a6aacbe68dc5bdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for the-notebook 1.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page