AI编码上下文记忆工具

ContextMemory是一款为开发者和团队设计的持久化AI编码上下文记忆工具,能够跟踪和保存开发过程中的意图历史,避免重复解释架构和决策。

  • by AkashKobal
  • TypeScript
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 AkashKobal/contextmemory

使用说明

上下文记忆🧠

为开发人员和团队提供持久的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