memorium-cli 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- memorium_cli-1.0.0/LICENSE +21 -0
- memorium_cli-1.0.0/OFL.txt +97 -0
- memorium_cli-1.0.0/PKG-INFO +110 -0
- memorium_cli-1.0.0/README.md +81 -0
- memorium_cli-1.0.0/export.py +2479 -0
- memorium_cli-1.0.0/memorium_cli.egg-info/PKG-INFO +110 -0
- memorium_cli-1.0.0/memorium_cli.egg-info/SOURCES.txt +11 -0
- memorium_cli-1.0.0/memorium_cli.egg-info/dependency_links.txt +1 -0
- memorium_cli-1.0.0/memorium_cli.egg-info/entry_points.txt +2 -0
- memorium_cli-1.0.0/memorium_cli.egg-info/top_level.txt +1 -0
- memorium_cli-1.0.0/pyproject.toml +47 -0
- memorium_cli-1.0.0/setup.cfg +4 -0
- memorium_cli-1.0.0/tests/test_export.py +77 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rayane Hassani
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
Fonts embedded in the HTML export generated by Memorium:
|
|
2
|
+
|
|
3
|
+
Copyright 2018 The Fraunces Project Authors (https://github.com/undercasetype/Fraunces)
|
|
4
|
+
Copyright 2020-2024 The Atkinson Hyperlegible Next Project Authors (https://github.com/googlefonts/atkinson-hyperlegible-next)
|
|
5
|
+
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
|
6
|
+
|
|
7
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
8
|
+
This license is copied below, and is also available with a FAQ at:
|
|
9
|
+
http://scripts.sil.org/OFL
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
-----------------------------------------------------------
|
|
13
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
14
|
+
-----------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
PREAMBLE
|
|
17
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
18
|
+
development of collaborative font projects, to support the font creation
|
|
19
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
20
|
+
open framework in which fonts may be shared and improved in partnership
|
|
21
|
+
with others.
|
|
22
|
+
|
|
23
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
24
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
25
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
26
|
+
redistributed and/or sold with any software provided that any reserved
|
|
27
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
28
|
+
however, cannot be released under any other type of license. The
|
|
29
|
+
requirement for fonts to remain under this license does not apply
|
|
30
|
+
to any document created using the fonts or their derivatives.
|
|
31
|
+
|
|
32
|
+
DEFINITIONS
|
|
33
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
34
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
35
|
+
include source files, build scripts and documentation.
|
|
36
|
+
|
|
37
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
38
|
+
copyright statement(s).
|
|
39
|
+
|
|
40
|
+
"Original Version" refers to the collection of Font Software components as
|
|
41
|
+
distributed by the Copyright Holder(s).
|
|
42
|
+
|
|
43
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
44
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
45
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
46
|
+
new environment.
|
|
47
|
+
|
|
48
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
49
|
+
writer or other person who contributed to the Font Software.
|
|
50
|
+
|
|
51
|
+
PERMISSION & CONDITIONS
|
|
52
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
53
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
54
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
55
|
+
Software, subject to the following conditions:
|
|
56
|
+
|
|
57
|
+
1) Neither the Font Software nor any of its individual components,
|
|
58
|
+
in Original or Modified Versions, may be sold by itself.
|
|
59
|
+
|
|
60
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
61
|
+
redistributed and/or sold with any software, provided that each copy
|
|
62
|
+
contains the above copyright notice and this license. These can be
|
|
63
|
+
included either as stand-alone text files, human-readable headers or
|
|
64
|
+
in the appropriate machine-readable metadata fields within text or
|
|
65
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
66
|
+
|
|
67
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
68
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
69
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
70
|
+
presented to the users.
|
|
71
|
+
|
|
72
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
73
|
+
Software shall not be used to promote, endorse or advertise any
|
|
74
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
75
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
76
|
+
permission.
|
|
77
|
+
|
|
78
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
79
|
+
must be distributed entirely under this license, and must not be
|
|
80
|
+
distributed under any other license. The requirement for fonts to
|
|
81
|
+
remain under this license does not apply to any document created
|
|
82
|
+
using the Font Software.
|
|
83
|
+
|
|
84
|
+
TERMINATION
|
|
85
|
+
This license becomes null and void if any of the above conditions are
|
|
86
|
+
not met.
|
|
87
|
+
|
|
88
|
+
DISCLAIMER
|
|
89
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
90
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
91
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
92
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
93
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
94
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
95
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
96
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
97
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: memorium-cli
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Your reasoning, kept. A forensic journal of every Claude Code session.
|
|
5
|
+
Author: Rayane Hassani
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/RayaneHassani/memorium
|
|
8
|
+
Project-URL: Repository, https://github.com/RayaneHassani/memorium
|
|
9
|
+
Project-URL: Issues, https://github.com/RayaneHassani/memorium/issues
|
|
10
|
+
Keywords: claude-code,claude,llm,session,journal,static-site,cli
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Classifier: Topic :: Text Processing :: Markup :: HTML
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
License-File: OFL.txt
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="https://raw.githubusercontent.com/RayaneHassani/memorium/main/docs/assets/banner.svg" width="800" alt="Memorium — Your reasoning, kept.">
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
# Memorium
|
|
35
|
+
|
|
36
|
+
**Your reasoning, kept.** A forensic journal of every Claude Code session.
|
|
37
|
+
|
|
38
|
+
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.
|
|
39
|
+
|
|
40
|
+
[](https://github.com/RayaneHassani/memorium/actions/workflows/ci.yml)
|
|
41
|
+
[](https://github.com/RayaneHassani/memorium/blob/main/LICENSE)
|
|
42
|
+
[](https://github.com/astral-sh/ruff)
|
|
43
|
+
|
|
44
|
+
## See it in action
|
|
45
|
+
https://github.com/user-attachments/assets/bc92e37f-8ab9-45e2-a43d-f57990237f4b
|
|
46
|
+
|
|
47
|
+
- **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.
|
|
48
|
+
- **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.
|
|
49
|
+
- **Make it yours.** Highlight, comment, rename and regroup sessions. Your source logs are never touched.
|
|
50
|
+
|
|
51
|
+
## Quick start
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pipx install memorium-cli
|
|
55
|
+
memorium # reads ~/.claude/projects, writes ./export, opens the browser
|
|
56
|
+
memorium init # once: stop the 30-day purge and archive every session as it ends
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
No server, no database, no account. One Python file, standard library only, and a static site you can open anywhere, even on a plane.
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
- **Readable transcripts.** Prompts, answers, tool calls and terminal output, typeset for long-form reading.
|
|
64
|
+
- **Full-text search** across every session, from a search index built once at export.
|
|
65
|
+
- **Highlights and comments** in five colours, with a margin view and a per-session recap.
|
|
66
|
+
- **Logical organization.** Rename sessions and folders, move sessions between folders.
|
|
67
|
+
- **A dashboard that remembers.** Weekly activity and the latest sessions of every project.
|
|
68
|
+
- **Offline by design.** Fonts are embedded in the page, nothing is fetched from the network.
|
|
69
|
+
|
|
70
|
+
## How it works
|
|
71
|
+
|
|
72
|
+
`~/.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.
|
|
73
|
+
|
|
74
|
+
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](https://github.com/RayaneHassani/memorium/tree/main/docs/adr).
|
|
75
|
+
|
|
76
|
+
## Archive and restore
|
|
77
|
+
|
|
78
|
+
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.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
memorium archive # gzip every raw session into ~/.memorium/archive, incremental
|
|
82
|
+
memorium restore <id-prefix> # put one back into ~/.claude/projects, so `claude --resume` works
|
|
83
|
+
memorium restore <id-prefix> --force # overwrite a session that diverged locally
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`restore` also moves a session to another machine, or brings back one Claude Code has already purged. Set `MEMORIUM_ARCHIVE_DIR` to archive elsewhere.
|
|
87
|
+
|
|
88
|
+
To update, upgrade and re-run in the same output directory. Only the generated pages are rewritten; your `export/data/` is never touched.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pipx upgrade memorium-cli && memorium
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## By the numbers
|
|
95
|
+
|
|
96
|
+
- **2,479 lines, one file, zero dependencies**: CLI, HTML generator, search index and viewer.
|
|
97
|
+
- **68 sessions exported in 2 s** from a real multi-month history (872 raw log files scanned).
|
|
98
|
+
- **243 KB** for the whole app shell, embedded fonts included.
|
|
99
|
+
- **CI on Python 3.8 to 3.13** on every push: Ruff lint, byte-compile and a smoke test on a fixture corpus.
|
|
100
|
+
|
|
101
|
+
## Development
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
python export.py # same as the installed command
|
|
105
|
+
python -m unittest discover -s tests
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT, see [LICENSE](https://github.com/RayaneHassani/memorium/blob/main/LICENSE). The embedded fonts (Fraunces, Atkinson Hyperlegible Next, JetBrains Mono) are under the SIL Open Font License, see [OFL.txt](https://github.com/RayaneHassani/memorium/blob/main/OFL.txt).
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/RayaneHassani/memorium/main/docs/assets/banner.svg" width="800" alt="Memorium — Your reasoning, kept.">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Memorium
|
|
6
|
+
|
|
7
|
+
**Your reasoning, kept.** A forensic journal of every Claude Code session.
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
[](https://github.com/RayaneHassani/memorium/actions/workflows/ci.yml)
|
|
12
|
+
[](https://github.com/RayaneHassani/memorium/blob/main/LICENSE)
|
|
13
|
+
[](https://github.com/astral-sh/ruff)
|
|
14
|
+
|
|
15
|
+
## See it in action
|
|
16
|
+
https://github.com/user-attachments/assets/bc92e37f-8ab9-45e2-a43d-f57990237f4b
|
|
17
|
+
|
|
18
|
+
- **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.
|
|
19
|
+
- **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.
|
|
20
|
+
- **Make it yours.** Highlight, comment, rename and regroup sessions. Your source logs are never touched.
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pipx install memorium-cli
|
|
26
|
+
memorium # reads ~/.claude/projects, writes ./export, opens the browser
|
|
27
|
+
memorium init # once: stop the 30-day purge and archive every session as it ends
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
No server, no database, no account. One Python file, standard library only, and a static site you can open anywhere, even on a plane.
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- **Readable transcripts.** Prompts, answers, tool calls and terminal output, typeset for long-form reading.
|
|
35
|
+
- **Full-text search** across every session, from a search index built once at export.
|
|
36
|
+
- **Highlights and comments** in five colours, with a margin view and a per-session recap.
|
|
37
|
+
- **Logical organization.** Rename sessions and folders, move sessions between folders.
|
|
38
|
+
- **A dashboard that remembers.** Weekly activity and the latest sessions of every project.
|
|
39
|
+
- **Offline by design.** Fonts are embedded in the page, nothing is fetched from the network.
|
|
40
|
+
|
|
41
|
+
## How it works
|
|
42
|
+
|
|
43
|
+
`~/.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.
|
|
44
|
+
|
|
45
|
+
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](https://github.com/RayaneHassani/memorium/tree/main/docs/adr).
|
|
46
|
+
|
|
47
|
+
## Archive and restore
|
|
48
|
+
|
|
49
|
+
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.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
memorium archive # gzip every raw session into ~/.memorium/archive, incremental
|
|
53
|
+
memorium restore <id-prefix> # put one back into ~/.claude/projects, so `claude --resume` works
|
|
54
|
+
memorium restore <id-prefix> --force # overwrite a session that diverged locally
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`restore` also moves a session to another machine, or brings back one Claude Code has already purged. Set `MEMORIUM_ARCHIVE_DIR` to archive elsewhere.
|
|
58
|
+
|
|
59
|
+
To update, upgrade and re-run in the same output directory. Only the generated pages are rewritten; your `export/data/` is never touched.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pipx upgrade memorium-cli && memorium
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## By the numbers
|
|
66
|
+
|
|
67
|
+
- **2,479 lines, one file, zero dependencies**: CLI, HTML generator, search index and viewer.
|
|
68
|
+
- **68 sessions exported in 2 s** from a real multi-month history (872 raw log files scanned).
|
|
69
|
+
- **243 KB** for the whole app shell, embedded fonts included.
|
|
70
|
+
- **CI on Python 3.8 to 3.13** on every push: Ruff lint, byte-compile and a smoke test on a fixture corpus.
|
|
71
|
+
|
|
72
|
+
## Development
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
python export.py # same as the installed command
|
|
76
|
+
python -m unittest discover -s tests
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
MIT, see [LICENSE](https://github.com/RayaneHassani/memorium/blob/main/LICENSE). The embedded fonts (Fraunces, Atkinson Hyperlegible Next, JetBrains Mono) are under the SIL Open Font License, see [OFL.txt](https://github.com/RayaneHassani/memorium/blob/main/OFL.txt).
|