上下文记忆🧠
为开发人员和团队提供持久的AI编码上下文记忆。Git跟踪你的代码历史。 ContextMemory跟踪您的意图历史。 永远不要再向人工智能助手重新解释你的架构、决策或进展。
您正在深入Cursor会话中重构支付服务。您已经解释了架构,尝试了3种方法,最终找到了正确的方法。会话结束。第二天早上,或者更糟糕的是,你的队友拿起它,而人工智能的记忆为零。你花了15分钟重新解释一切。每一个。单身。时间。
这在每个AI编码工具中都有体现:Cursor、Claude Code、Copilot、Windsurf——它们都没有在会话、编辑器或团队成员之间持久化上下文。
______________________________________________________________________
🚀 安装
从npm全局安装:
npm install -g @akashkobal/contextmemory验证安装:
contextmemory --help______________________________________________________________________
⚡ 快速开始
在项目内部初始化:
contextmemory init保存您的工作环境:
contextmemory save快速保存:
contextmemory save "Implemented multi-model execution"恢复您的上下文:
contextmemory resume这会将格式化的提示复制到剪贴板。\ 将其粘贴到ChatGPT、Cursor、Claude或任何AI编码工具中。
______________________________________________________________________
🧠 运作原理
ContextMemory创建:
.contextmemory/
├── context.json
├── history/
│ ├── entry-1.json
│ ├── entry-2.json每个条目都包含:
- 任务
- 目标
- 方法
- 决策
- 当前状态
- 后续步骤
______________________________________________________________________
📦 命令
核心
contextmemory init
contextmemory save
contextmemory resume
contextmemory log
contextmemory diff自动化
contextmemory watch
contextmemory hook install
contextmemory handoff @username______________________________________________________________________
🔌 MCP集成(可选)
添加到MCP配置中:
{
"mcpServers": {
"contextmemory": {
"command": "npx",
"args": ["-y", "@akashkobal/contextmemory", "mcp"]
}
}
}______________________________________________________________________
🏗 使用
- Spring Boot
- 反应
- Node.js
- python
- 微服务
- Monoreps
AI工具:
- ChatGPT
- 光标
- 克劳德
- 副驾驶
- 帆板运动
______________________________________________________________________
📄 许可证
麻省理工学院
______________________________________________________________________
👨💻 作者
阿卡什·科巴尔\ github:https://github.com/AkashKobal
