Skip to main content

Memorium — Your reasoning, kept.

Memorium

Your reasoning, kept. A forensic journal of every Claude Code session.

Six months from now, the commit will say what changed. Memorium shows you why: the session where the trade-off was weighed, the benchmark that settled it, the dead end you already tried.

CI License: MIT Ruff

See it in action

https://github.com/user-attachments/assets/bc92e37f-8ab9-45e2-a43d-f57990237f4b

  • Find the why. Full-text search across every session you ever ran, prebuilt at export time. Type postgres, land on the session where you chose it.
  • Keep it. Claude Code deletes sessions after 30 days. Memorium archives the raw logs the moment a session ends and restores them so claude --resume works again.
  • Make it yours. Highlight, comment, rename and regroup sessions. Your source logs are never touched.

Quick start

pipx install memorium-cli
memorium          # reads ~/.claude/projects, writes ./export, opens the browser
memorium init     # once: stop the 30-day purge and archive every session as it ends

No server, no database, no account. One Python file, standard library only, and a static site you can open anywhere, even on a plane.

Features

  • Readable transcripts. Prompts, answers, tool calls and terminal output, typeset for long-form reading.
  • Full-text search across every session, from a search index built once at export.
  • Highlights and comments in five colours, with a margin view and a per-session recap.
  • Logical organization. Rename sessions and folders, move sessions between folders.
  • A dashboard that remembers. Weekly activity and the latest sessions of every project.
  • Offline by design. Fonts are embedded in the page, nothing is fetched from the network.

How it works

~/.claude/projects belongs to Claude Code, which indexes it. Renaming a folder or moving a .jsonl file there would break claude --resume. So every rename and move in Memorium is logical only: it is recorded in a separate export/data/metadata.json and resolved at display time. The source of truth is never mutated, and every change is reversible. This is the core architectural trade-off, chosen deliberately over reorganizing files on disk.

Writing that metadata needs the browser's File System Access API, which is disabled on file:// pages. memorium serve serves the export over http://localhost, a secure context, with a plain static file server and no logic on the server side. Read-only browsing, highlights and comments work from file:// in any browser; highlights and comments are kept in the browser's local storage. Renaming and moving sessions needs memorium serve and a Chromium browser (Chrome, Edge, Brave). Design decisions are recorded in docs/adr.

Archive and restore

Claude Code silently deletes any session untouched for cleanupPeriodDays, 30 days by default. memorium init raises that setting (after backing up your settings.json) and installs a SessionEnd hook that archives every session the moment it ends.

memorium archive                      # gzip every raw session into ~/.memorium/archive, incremental
memorium restore <id-prefix>          # put one back into ~/.claude/projects, so `claude --resume` works
memorium restore <id-prefix> --force  # overwrite a session that diverged locally

restore also moves a session to another machine, or brings back one Claude Code has already purged. Set MEMORIUM_ARCHIVE_DIR to archive elsewhere.

To update, upgrade and re-run in the same output directory. Only the generated pages are rewritten; your export/data/ is never touched.

pipx upgrade memorium-cli && memorium

By the numbers

  • 2,479 lines, one file, zero dependencies: CLI, HTML generator, search index and viewer.
  • 68 sessions exported in 2 s from a real multi-month history (872 raw log files scanned).
  • 243 KB for the whole app shell, embedded fonts included.
  • CI on Python 3.8 to 3.13 on every push: Ruff lint, byte-compile and a smoke test on a fixture corpus.

Development

python export.py                    # same as the installed command
python -m unittest discover -s tests

License

MIT, see LICENSE. The embedded fonts (Fraunces, Atkinson Hyperlegible Next, JetBrains Mono) are under the SIL Open Font License, see OFL.txt.

Metadata

Release files for memorium-cli 1.0.0

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

Source distribution (sdist)

Source distribution for memorium-cli 1.0.0
File Size Uploaded
memorium_cli-1.0.0.tar.gz 152.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for memorium-cli 1.0.0
File Interpreter ABI Platform
memorium_cli-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 301.2 kB

Release files / memorium_cli-1.0.0.tar.gz

Download URL memorium_cli-1.0.0.tar.gz
Size 152.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5e4d73848e21803d80d2f4bdea7aee13d4c68e28f0b61fa6cd48402c4afe8acd
BLAKE2b-256 checksum
How to use checksums
5a1e72bf14b93bc2c8993266218af37810ad3a66d2a9ea011cc0e5ae191ceb8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.1

Release files / memorium_cli-1.0.0-py3-none-any.whl

Download URL memorium_cli-1.0.0-py3-none-any.whl
Size 149.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c847fa1e8cef55347e76105628d97948b407429d1ea0036ef8df349fe9204e34
BLAKE2b-256 checksum
How to use checksums
63759d4931f506be93ce7265df4dd94b246f99648f31d2e619a4f56b6f3f377a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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