使用说明
ContextFS
AI代理的持久内存 -为您的AI工具提供跨会话持续的内存。
安装
# With pip
pip install contextfs
# With uv (recommended)
uv pip install contextfs
# Run directly without installing
uvx contextfs
快速开始
# Initialize your repo for indexing
contextfs index init
# Save a memory
contextfs memory save "Use PostgreSQL for database" --type decision
# Search memories
contextfs memory search "database"
# Index your codebase for semantic search
contextfs index index
MCP集成
添加到AI工具的MCP配置中:
{
"mcpServers": {
"contextfs": {
"command": "uvx",
"args": ["contextfs"]
}
}
}
适用于: Claude Code、Claude Desktop、Cursor、VS Code和任何兼容MCP的客户端。
看 工具特定设置指南 详细说明。
主要特点
- 语义搜索 -使用自然语言查找相关记忆
- 自动代码索引 -为上下文感知AI的整个代码库建立索引
- 跨会话内存 -决策、事实和模式在对话中持续存在
- 多工具同步 -在Claude、Cursor、VS Code等之间共享内存
开发包
from contextfs import ContextFS
ctx = ContextFS()
# Save
ctx.save("Use JWT for auth", type="decision", tags=["auth"])
# Search
results = ctx.search("authentication")
云同步
启用跨设备内存同步:
contextfs cloud login
contextfs cloud sync
注册地址: contextfs.ai 对于云功能。
文档
访问 contextfs.ai/docs 用于:
- 每个AI工具的安装指南
- api参考
- 内存类型和最佳实践
- 云同步设置
许可证
麻省理工学院-Matthew Long和YonedaAI合作