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>:替换长期记忆目录mem status:只读检查当前.memory状态
🚀 项目特点
- 标准化
.memory目录结构,便于协作和迁移 - 使用
src布局与pyproject.toml,适合开发和发布 - 命令行接口简单直接,基于标准库
argparse - CLI 输出包含命令名、状态和可操作提示,便于定位问题
- 长期记忆与当前项目记忆分层管理
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
PyPI 发布包名是 super-memory-kit。
🛠 命令用法
初始化 .memory:
mem init
修复缺失结构:
mem fix
只读检查当前 .memory 状态:
mem status
删除 .memory:
mem remove
导出长期记忆到 long_term_export/:
mem long
用外部长期记忆目录替换当前项目的 long_term/:
mem insert ./long_term_export
mem insert 会在替换前保留当前 .memory/long_term 的备份策略,缺少必要文件或源目录不存在时会中止并给出提示。
查看帮助:
mem --help
🔧 最小使用示例
在一个新项目目录里:
mem init
mem status
mem fix
mem long
mem insert ./long_term_export
一个最常见的使用流程是:先用 mem init 建立标准结构,用 mem status 检查当前状态,再根据需要用 mem fix 补齐缺失项,用 mem long 导出长期记忆,最后通过 mem insert 在其他项目中复用。
CLI 在遇到权限、删除、复制、导出目录创建等文件系统问题时,会输出简洁错误和下一步建议。缺少 .memory、导入目录不完整等兼容性场景仍按原有报告式流程处理,不会破坏已有正常用法。
🧭 设计理念
memory.md是入口文件,负责说明整个.memory的读取顺序和用途rule.md是规则文件,定义长期记忆、项目记忆、缓存更新与归档原则long_term与current_project分层存放,分别承载稳定知识和当前项目上下文cache.md用于低 token 快速读取,帮助在进入任务前先抓住最关键的信息
🔮 后续规划
- 支持更完整的导入导出形式,例如 zip 包
- 继续补充记忆写入与维护相关命令
- 优化跨项目复用体验
📚 开发与测试
当前项目使用标准库 unittest:
python -m unittest discover -s tests -t .
🚢 发布流程
- Pull Request 会触发 GitHub Actions CI。
- 合并到
main后,先更新pyproject.toml中的版本号。 - 打
vX.Y.Z格式的 tag,例如v0.1.0。 - GitHub Actions 会构建包并自动发布到 PyPI。
- 项目使用 PyPI Trusted Publishing,不需要在仓库里保存 PyPI token。
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.1.tar.gz.
File metadata
- Download URL: super_memory_kit-0.1.1.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef27546a60ca9ed474c1367a1917661867d86175c3938c9b993f352d8c8d24f9
|
|
| MD5 |
2fd7f82ede254bcc05723643adf58581
|
|
| BLAKE2b-256 |
7317ac833d7c97813ea9f2f67a3efbd3b5ed57ac032fc7e71eb06f39d25b2841
|
Provenance
The following attestation bundles were made for super_memory_kit-0.1.1.tar.gz:
Publisher:
publish.yml on lemonmindyes/super-memory-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
super_memory_kit-0.1.1.tar.gz -
Subject digest:
ef27546a60ca9ed474c1367a1917661867d86175c3938c9b993f352d8c8d24f9 - Sigstore transparency entry: 1396292958
- Sigstore integration time:
-
Permalink:
lemonmindyes/super-memory-kit@a1e79f7955193de67d03b9374b37efa76905ee3f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/lemonmindyes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a1e79f7955193de67d03b9374b37efa76905ee3f -
Trigger Event:
push
-
Statement type:
File details
Details for the file super_memory_kit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: super_memory_kit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1ce702c688b66e5edd462472bef8c7b6a9cdb36e013ab06e4a7fd641ffaf69b
|
|
| MD5 |
5580946506d50d19f1a9c9458bafcf4e
|
|
| BLAKE2b-256 |
d83b6d11d49fd832d993a2822d479d2c98b7187a4c55b54554660891d56d6953
|
Provenance
The following attestation bundles were made for super_memory_kit-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on lemonmindyes/super-memory-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
super_memory_kit-0.1.1-py3-none-any.whl -
Subject digest:
a1ce702c688b66e5edd462472bef8c7b6a9cdb36e013ab06e4a7fd641ffaf69b - Sigstore transparency entry: 1396292966
- Sigstore integration time:
-
Permalink:
lemonmindyes/super-memory-kit@a1e79f7955193de67d03b9374b37efa76905ee3f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/lemonmindyes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a1e79f7955193de67d03b9374b37efa76905ee3f -
Trigger Event:
push
-
Statement type: