A Python CLI for managing standardized .memory workspaces.
Project description
super-memory-kit
🧠 super-memory-kit 是一个基于 Python 3.12+ 的命令行工具,用来管理项目中的 .memory 标准目录结构。
它聚焦一件事:让项目记忆有统一入口、清晰分层、低成本维护,方便 AI 协作、上下文整理和长期记忆复用。
✨ 项目简介
在实际协作中,项目记忆往往散落在不同文档里,不容易维护,也不方便复用。super-memory-kit 提供一套固定的 .memory 结构,并用 mem 命令完成初始化、修复、导出和替换。
当前已支持:
mem init:初始化标准.memorymem fix:补齐缺失结构mem remove:删除当前.memorymem long:导出长期记忆mem insert <path>:替换长期记忆目录
🚀 项目特点
- 标准化
.memory目录结构,便于协作和迁移 - 使用
src布局与pyproject.toml,适合开发和发布 - 命令行接口简单直接,基于标准库
argparse - 长期记忆与当前项目记忆分层管理
cache.md专门用于低 token 快速读取
📁 .memory 标准结构
.memory/
├─ memory.md
├─ rule.md
├─ long_term/
│ ├─ memory.md
│ ├─ cache.md
│ └─ archive.md
└─ current_project/
├─ memory.md
├─ cache.md
└─ archive.md
📦 安装方式
本地开发安装:
pip install -e .
安装后查看帮助:
mem --help
如果当前终端还没有立即识别 mem,可以重新打开终端,或临时使用:
python -m super_memory.cli --help
开发时安装打包工具:
pip install -e .[dev]
后续普通安装方式:
pip install super-memory-kit
🛠 命令用法
初始化 .memory:
mem init
修复缺失结构:
mem fix
删除 .memory:
mem remove
导出长期记忆到 long_term_export/:
mem long
用外部长期记忆目录替换当前项目的 long_term/:
mem insert ./long_term_export
查看帮助:
mem --help
🔧 最小使用示例
在一个新项目目录里:
mem init
mem fix
mem long
mem insert ./long_term_export
一个最常见的使用流程是:先用 mem init 建立标准结构,再根据需要用 mem fix 补齐缺失项,用 mem long 导出长期记忆,最后通过 mem insert 在其他项目中复用。
🧭 设计理念
memory.md是入口文件,负责说明整个.memory的读取顺序和用途rule.md是规则文件,定义长期记忆、项目记忆、缓存更新与归档原则long_term与current_project分层存放,分别承载稳定知识和当前项目上下文cache.md用于低 token 快速读取,帮助在进入任务前先抓住最关键的信息
🔮 后续规划
- 支持更完整的导入导出形式,例如 zip 包
- 继续补充记忆写入与维护相关命令
- 优化跨项目复用体验
📚 开发与测试
当前项目使用标准库 unittest:
python -m unittest discover -s tests -t .
License
当前仓库中尚未提供单独的 LICENSE 文件。若计划公开发布,建议补充明确许可证后再对外分发。
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 super_memory_kit-0.1.0.tar.gz.
File metadata
- Download URL: super_memory_kit-0.1.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8137a81f779eb58f9df8f0dd04a41e0afaeee14960df165d16ebaf53a7219cab
|
|
| MD5 |
790632826af866dbbf20bfda8750a56b
|
|
| BLAKE2b-256 |
d6947ec2c5ffeb522f1a5d4523dc1f18540c26fa364e19c162336e70908fd790
|
File details
Details for the file super_memory_kit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: super_memory_kit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c779e4aa5942bd0ebcf8d6b61de688ae5c3b7b4f48ef6a1cbc8568a43977a58
|
|
| MD5 |
aeb8ec00802f971865c4c006198acfb4
|
|
| BLAKE2b-256 |
3030c6526f36348b58a50728fe2add73c34c0dacb6c76e7c0dafa8cd312b770b
|